openSUSE Forums > Archives > SF Archives > ARCHIVES - Programming & Scripting » Accessing A Google Map Info Via A Link?

Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Programming & Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22-May-2008, 17:23
zak89
Guest
 
Posts: n/a
Default

This is very un-linux related, but I figured that maybe someone around here might have a better idea than me. I am trying to set up a link to a Google map on another site. I would like to set it up so that the link takes the user to the map, centered on a certain point, with the pop up "info bubble" displayed. I am wondering if this would be possible using javascript in the address bar (java script:dadadada....). Is this possible?

I think the info bubble might be too much to ask, so I may have to settle for centering the map.
  #2 (permalink)  
Old 23-May-2008, 11:34
wnj92996
Guest
 
Posts: n/a
Default

Quote:
This is very un-linux related, but I figured that maybe someone around here might have a better idea than me. I am trying to set up a link to a Google map on another site. I would like to set it up so that the link takes the user to the map, centered on a certain point, with the pop up "info bubble" displayed. I am wondering if this would be possible using javascript in the address bar (java script:dadadada....). Is this possible?

I think the info bubble might be too much to ask, so I may have to settle for centering the map.
[/b]
Well, I don't have a ton of experience with Google Maps, but I did have to do a project for school dealing with them once. Basically, what I did was to create a long string that held all of the javascript needed for the map, and when the user supplied the information he/she desired, the string was created, inserted into a html file, and then opened in a browser. I did the string building/replacement with Java (required), but you could do it with other languages.

It sounds like you have an idea on how to do that part, though. The pop-up and centering are not really hard; have a look at the Google Map API, and you should be able to see what you need.

And don't be too proud to look at some of the example code out there. If you are still lost, let me know, and I will try to help out later when I have some more time.
  #3 (permalink)  
Old 24-May-2008, 22:59
zak89
Guest
 
Posts: n/a
Default

Yeah, I have been reading Scott Davis's book on the Google map API. Cool stuff.

By the way, I think I am getting somewhere. I can use javascript in the address bar (or link) to center the map over a specific point. The problem is that I am doing this via a "java script:etc,etc" for the link. But I need to take the user to the page, then run the javascript! So I am trying to create a two stage link... hahah.

Quote:
Basically, what I did was to create a long string that held all of the javascript needed for the map, and when the user supplied the information he/she desired, the string was created, inserted into a html file, and then opened in a browser. I did the string building/replacement with Java (required), but you could do it with other languages.
[/b]
Nice to know you are using Java. I am using Groovy on Grails (Ruby on Rails for the Java platform). Anyway, I am not sure I understand your method. Are you creating the map when the user clicks the link? I am trying to link to an existing map on another site.

Beside the point, if you are interested in Java, maybe you could check out this site. My brother and I just launched it a while ago. It's a searchable listing of java user groups. If you are serious about Java, you should check out a JUG; my dad leads one, and it's tons of fun to be around all these smart folks!
  #4 (permalink)  
Old 24-May-2008, 23:39
zak89
Guest
 
Posts: n/a
Default

Got it! Try this link.
That's our Java User Group meeting location.
Used the Google map url parameters from the mapiki article here..

Cool stuff!
  #5 (permalink)  
Old 25-May-2008, 22:12
wnj92996
Guest
 
Posts: n/a
Default

Yeah, a second read of your initial post shows me that I misunderstood your query. I assumed that you were wanting to create a unique view of an area, and open it in google maps after clicking a link.

Glad you got it going!
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2