View Full Version : modifying google maps

05-08-2009, 12:46 PM
I made a great script and it works perfect even in IE, but I don't want to violate google user agreements because I had to use a couple of the private method calls to pass some variables. Is it OK to look at the contents of a script by doing this, for instance
javascript:for(i in map)document.write(i+":"+map[i]+"<br>")
I needed to find out how to pass the current window settings of the map to an iframe i was opening
the coordinates were pretty obvious with getCenter() so I just needed to find the right function to return the value of the zoom setting.

I don't want to get in trouble for messing with their code if I was picking too deep.

Can anyone tell me what the line is? I don't want to cross it. LOL

Here's a picture of the script working

05-09-2009, 07:30 AM
Bad news. It only works client side on a local machine. The API does not allow the same actions when using the script from servers. Too bad...
Here's the spawner page without the ability to pass the map state onto the new map, but you can still make multiple maps on one page so you can highlight trouble spots for those using your directions. if you right click on the iframes you can choose select all...next, right click again and select view selection source(FF only). the Divs in the selection will be saved and you can pick out the container and the lose all but the images. I'll post an example. I'm going to work on a popup page that gets the HTML from the iframes and from a text editor I made.

rnd me
05-10-2009, 12:08 AM
it works for me in firefox three.

google doesn't mind you digging thought their code. your supposed to.

monitor the actual calls of your main window in firebug's Net tab, and see what settings are doing what, and you can figure out what to do with the iframe urls...

05-10-2009, 01:09 AM
I tried everything. The script I made on the local machine would send the map location and zoom level to the new iframe so when it opens it's already positioned. Then you use the map in the upper left corrner to do another one. So you're always moving around on one map and opening the new ones in new iframes.

I'm going to try to move the map where the new frame would open and put the new iframe where the map was. LOL fun!!