Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Location
    Portland Oregon
    Posts
    690
    Thanks
    44
    Thanked 63 Times in 62 Posts

    modifying google maps

    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

  • #2
    Regular Coder
    Join Date
    Mar 2009
    Location
    Portland Oregon
    Posts
    690
    Thanks
    44
    Thanked 63 Times in 62 Posts
    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...
    http://h1.ripway.com/stirfry/maps/iframe/index.html
    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.

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,412
    Thanks
    11
    Thanked 595 Times in 575 Posts
    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...
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%

  • #4
    Regular Coder
    Join Date
    Mar 2009
    Location
    Portland Oregon
    Posts
    690
    Thanks
    44
    Thanked 63 Times in 62 Posts
    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!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •