I would think it has to do with the line: + "&marker=" + map.getIdmarker()
You want to access the marker and pull the ID from the marker you created. If you added an ID property when the marker was created then you can do this by calling marker.ID; otherwise during marker creation you need to add an ID property to it like: marker = new google.maps.marker(markerOptions); marker.ID = ID; Then assuming your marker variable has the right scope you can access the marker ID by doing as you were but instead you would use: + "&marker=" + marker.ID; On Wed, Oct 6, 2010 at 2:30 PM, Greg45 <[email protected]> wrote: > Ok thx , this function works now . > > but I'm block for create the link : > > function makeLink() { > var a="http://www.geopeche.fr/markers2.html" > + "?lat=" + map.getCenter().lat().toFixed(6) > + "&lng=" + map.getCenter().lng().toFixed(6) > + "&zoom=" + map.getZoom() > ----> + "&marker=" + map.getIdmarker() > + "&ty=" + MapTypeId2UrlValue(map.getMapTypeId()); > > > I can't get the id of the marker ? do you know why ? > > On Oct 6, 8:25 pm, "[email protected]" <[email protected]> > wrote: > > On Oct 6, 10:47 am, Greg45 <[email protected]> wrote: > > > > > > > > > thx Larry , this code work fine ! > > > > > But I can search and read the code I don't understand how it's works . > > > > > I want to get thelinkof a marker and the configuration of the map > > > ( zoom level, maptype). > > > > > so 2 solution : > > > > > 1) get the lat, lng, zoom and maptype > > > 2) get the id of the marker > > > > > this 2 solution work alone. > > > > > So if I use the fist solution I get all but my infowindow isn't > > > open(it's normal but I can't get my marker) > > > > > and if I use the second solution I get infowindow but not lat,lng, > > > zoom and maptype > > > > > and I want get lat, lng, zoom, maptype And infowindows of the marker. > > > > > I try to modify this 2 code but I not undestand how it's work and I > > > don't know how to make this. > > > > > can you explain to me or help me please ? > > > > I will be combining them at some point. If you look in both you will > > see the code that process the query string: > > // split the rest at each "&" character to give a list of > > "argname=value" pairs > > var pairs = query.split("&"); > > for (var i=0; i<pairs.length; i++) { > > > > You just have to add the code from one page into the other pages loop > > that processes them. > > > > Hope that helps. > > > > -- Larry > > > > > > > > > thanks > > > > > On Oct 6, 3:43 pm, "[email protected]" <[email protected]> > > > wrote: > > > > > > On Oct 5, 1:03 pm, Greg45 <[email protected]> wrote: > > > > > > > I do know how to convert this code ( v2) to google maps api v3 > > > > > > >http://econym.org.uk/gmap/example_linktomarker.htm?marker=1 > > > > > > Quick port: > http://www.geocodezip.com/v3_MW_example_linktomarker.html?id=Marker%2... > > > > > > Hope it helps > > > > -- Larry > > > > > > >http://econym.org.uk/gmap/linktothis.htm > > > > > > > On Oct 5, 9:14 pm, Nathan Raley <[email protected]> wrote: > > > > > > > > Sorry, what are you wanting to do with the id of the marker? > > > > > > > > On Tue, Oct 5, 2010 at 1:55 PM, Greg45 <[email protected]> wrote: > > > > > > > hummm ... sorry I retest and this work fine ! no problem with > this > > > > > > > code sorry ! > > > > > > > > > So do you know how to modify the other code into V3 for use > only the > > > > > > > Id of the marker ? > > > > > > > > > On Oct 5, 6:29 pm, Nathan Raley <[email protected]> wrote: > > > > > > > > Yourlinkto this page seems to be capturing the correct lat > and lon, > > > > > > > what > > > > > > > > issue are you having? > > > > > > > > > > On Tue, Oct 5, 2010 at 11:27 AM, Greg45 <[email protected]> > wrote: > > > > > > > > > Hello, > > > > > > > > > > > Larry did you create an example of this script withlinkto > marker ? > > > > > > > > > > > I want to use this script but there are a problem, because > if I put > > > > > > > > > this code in my main page. > > > > > > > > > > > The guest show that : > > > > > > > > >http://www.geocodezip.com/v3_MW_example_linktothis.html > > > > > > > > > > > because the var lat, lng and zoom are at 0 ! And if I > modify this > > > > > > > > > value Mylinkto the current maps doesn't work. > > > > > > > > > > > Do you have an idea ? > > > > > > > > > > > regards > > > > > > > > > > > On Aug 25, 1:32 am, "[email protected]" < > [email protected]> > > > > > > > > > wrote: > > > > > > > > > > On Aug 24, 11:49 am, "[email protected]" < > [email protected]> > > > > > > > > > > wrote: > > > > > > > > > > > > > On Aug 24, 11:41 am, Brad C <[email protected]> wrote: > > > > > > > > > > > > > > Doh, I completely forgot that was on the same page as > Grok linked > > > > > > > to > > > > > > > > > > > > above. Thanx Rossko. Now I can get back to work! > > > > > > > > > > > > > > Anyone know off hand what is deprecated in that > tutorial for > > > > > > > linking > > > > > > > > > > > > to markers? I know the "G" has been changed but I'm > wondering > > > > > > > what > > > > > > > > > > > > else might no longer work in v3. > > > > > > > > > > > > > Lots of stuff has changed and some stuff is not > implemented yet. I > > > > > > > > > > > would suggest just trying it. It isn't too difficult > to port from > > > > > > > v2 > > > > > > > > > > > to v3. > > > > > > > > > > > > Here is a quick port of Mike'slinkto this page: > > > > > > > > > > http://www.geocodezip.com/v3_MW_example_linktothis.html?lat=42.359783. > > > > > > > .. > > > > > > > > > > > > It doesn't have "linkto a marker" (because there aren't > any markers), > > > > > > > > > > but that shouldn't be too hard to add. I will probably > create an > > > > > > > > > > example of that at some point. > > > > > > > > > > > > -- Larry > > > > > > > > > > > > > > Oh also... In the tutorial when "example.xml" is > requested... > > > > > > > Will > > > > > > > > > I > > > > > > > > > > > > be able to use my genxml.php file in place of the > example.xml > > > > > > > inside > > > > > > > > > > > > of that function or might genxml.php require a > different > > > > > > > function? > > > > > > > > > > > > > Yes. But v3 doesn't have a GDownloadUrl function built > in. But > > > > > > > there > > > > > > > > > > > are samples with a downloadUrl function in a standalone > javascript > > > > > > > > > > > file you can copy and use. Search the group and the > examples and > > > > > > > you > > > > > > > > > > > will find it. > > > > > > > > > > > > > -- Larry > > > > > > > > > > > > > > I'll give it a try but if someone give me a heads up > that would > > > > > > > be > > > > > > > > > > > > great. :) > > > > > > > > > > > > > > As always the replies are hugely appreciated. I > can't wait to > > > > > > > get > > > > > > > > > > > > this project all wrapped up. Yeesh! > > > > > > > > > > > > > > On Aug 24, 12:51 pm, Rossko < > [email protected]> wrote: > > > > > > > > > > > > > > > >I'm fairly certain that I've seen a tutorial about > this > > > > > > > > > > > > > > online somewhere but if there is I can't seem to > find it. > > > > > > > > > > > > > > > This one? > > > > > > > > > > > > > http://econym.org.uk/gmap/linktothis.htm > > > > > > > > > > > > > it is for V2 but that doesn't affect the parameter > passing > > > > > > > side.- > > > > > > > > > Hide quoted text - > > > > > > > > > > > > > > - Show quoted text -- Hide quoted text - > > > > > > > > > > > > > - Show quoted text - > > > > > > > > > > > -- > > > > > > > > > You received this message because you are subscribed to the > Google > > > > > > > Groups > > > > > > > > > "Google Maps JavaScript API v3" group. > > > > > > > > > To post to this group, send email to > > > > > > > > > [email protected]. > > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > > [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B > [email protected]> > > > > > > > <google-maps-js-api-v3%[email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3 > %[email protected]> > > > > > > > > > > > . > > > > > > > > > For more options, visit this group at > > > > > > > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > > > > > > > > -- > > > > > > > You received this message because you are subscribed to the > Google Groups > > > > > > > "Google Maps JavaScript API v3" group. > > > > > > > To post to this group, send email to > > > > > > > [email protected]. > > > > > > > To unsubscribe from this group, send email to > > > > > > > [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B > [email protected]> > > > > > > > . > > > > > > > For more options, visit this group at > > > > > > > > http://groups.google.com/group/google-maps-js-api-v3?hl=en.-Hide quoted > text - > > > > > - Show quoted text - > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
