Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Special Interests > Web Design and Development
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Jun 16, 2007, 03:37 PM   #1
Makosuke
macrumors 68040
 
Join Date: Aug 2001
Location: The Cool Part of CA, USA
Intercept Embedded Google Maps Clicks?

This is an involved enough question that I'm not hopeful for an answer, but can't hurt to try:

I'm working on a site as a favor with an embedded Google map. And I've basically learned enough of the Maps API to do what I want--embed several maps that somebody else is working on in Google's MyMaps as layers that can be turned on and off with some checkboxes. This is the rough mockup:

http://explorejefferson.jsdi.org/embedmaptest.html

Now, the trick comes with links in the little "word balloons" that pop up when you click a marker. I want those links to pop up a new window with more info. Except I can't seem to figure out how to intercept the relevant clicks from the Maps API with some Javascript to create the new window.

I know it can be done, since (aside from the fact that you can do pretty much anything with the Maps API) MyMapsPlus.com (neat service) is doing exactly that--they auto-build a map for an iFrame for you, and to avoid the links opening in the iFrame they automatically open a new window.

I've tried to figure out how MyMapsPlus is doing it, but I'm a rank amateur at Javascript and their code is pretty dense, so I couldn't figure it out.

Covering what seem to me to be the obvious alternatives, MyMapsPlus doesn't do the layers, I can't insert the Javascript directly into the maps popup bubbles because MyMaps seems to strip out any fancy formatting, and I can't put everything in the bubble because there's too much and I want it to be easily printable anyway.

Is there some obvious way of doing this that I'm overlooking because I suck at Javascript, or is the right answer "Sit down and learn Javascript and the Maps API before asking questions, you lazy punk."?
Makosuke is offline   Reply With Quote
Old Jun 16, 2007, 11:31 PM   #2
mnkeybsness
macrumors 68030
 
mnkeybsness's Avatar
 
Join Date: Jun 2001
Location: Moneyapolis, Minnesota
Send a message via AIM to mnkeybsness
I think the easiest reply is "Sit down and learn Javascript and the Maps API" (not the lazy punk part)...

Javascript can be intimidating, but once you get into it, it's a lot of fun and not that complicated.
__________________
Scribbls - a collaborative drawing community designed to combine drawings into outcomes—no talent required.
mnkeybsness is offline   Reply With Quote

Reply

Mac Forums > Special Interests > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:12 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC