we progress!  the part with  Link directly to this page by index
(position in gmarkers array) WORKS !

So I have a bug, now when I use the basic link :
http://greglg.free.fr/exemple_gmap/index2.html

I have an infowindow open ..

and the second part of code with - Link directly to this page by id
(id in xml file also entry "name" in sidebar menu)

get the fine url but can't read it, I have an alert with Id not found.


On Oct 9, 6:41 pm, "[email protected]" <[email protected]>
wrote:
> On Oct 9, 4:34 am, Greg45 <[email protected]> wrote:
>
> > yes the marker id it's correct but the script don't find the ID
> > after pass in url.
>
> Here is a combined 
> example:http://www.geocodezip.com/v3_MW_example_linktomap.html?id=Marker%20On...
>
>   -- Larry
>
>
>
> > and the alert box come from the original script :
> > I think this code:
>
> >  if (index > -1) {
> >             if (index < gmarkers.length) {
> >               google.maps.event.trigger(gmarkers[index],"click");
> >                           alert("marker "+lastmarker+" test ");
> >             } else {
> >               alert("marker "+index+" does not exist");
> > <-------------- HERE
> >             }
> >           }
>
> > I think, this code don't get the same ID of marker because the ID in
> > the url come form the xml. Probably the script for load ID don't use
> > this method.
>
> > But I don't know how make this
>
> > On Oct 8, 8:07 pm, Nathan Raley <[email protected]> wrote:
>
> > > Your information appeared to be sent through to thelinkcorrectly.
>
> > > Are you sure your not showing the alert box before the marker has been
> > > created when you load thelink?
>
> > > On Fri, Oct 8, 2010 at 12:40 PM, Greg45 <[email protected]> wrote:
>
> > > > I'm don't progress with my problem
>
> > > > I think understand why mylinkdon't work,
>
> > > >http://greglg.free.fr/exemple_gmap/markers2.html
>
> > > > 1) createlink-> I create thelinkwith the ID of the marker , this
> > > > ID come from my xml and it's fine !
>
> > > > 2 ) exploit thelink-> for me the problem it's here, because when I
> > > > uselinkfor open the info window of the marker, the script have a
> > > > problem
>
> > > > What do you think ?
>
> > > > On Oct 7, 7:26 pm, "[email protected]" <[email protected]>
> > > > wrote:
> > > > > On Oct 7, 10:16 am, Greg45 <[email protected]> wrote:
>
> > > > > > I try different code inside
> > > > > > " g.event.addListener(marker, "click", function() {"
>
> > > > > > like
> > > > > > lastmarker= index;
>
> > > > > > but I get the value '-1' and I don"t now why
> > > > > > if I try this
>
> > > > > > lastmarker= id;
> > > > > > I get a value but it's wrong.
>
> > > > > > what do you thinks ?
>
> > > > > inside the marker click handler, set lastmarker = marker.id
>
> > > > > when you create thelinkdo "&id="+lastmarker
>
> > > > > I don't see the query processing code to handle either &marker= or
> > > > > &id= in your live map.
>
> > > > >   -- Larry
>
> > > > > > On Oct 6, 9:53 pm, "[email protected]" <[email protected]>
> > > > > > wrote:
>
> > > > > > > On Oct 6, 12:30 pm, Greg45 <[email protected]> wrote:
>
> > > > > > > > Ok thx , this function works now .
>
> > > > > > > > but I'm block for create thelink:
>
> > > > > > > >  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 ?
>
> > > > > > > The simple fix is create a global variable "lastmarker"
> > > > > > > Set that in the marker click (or mouseover) handler (whatever 
> > > > > > > opens
> > > > > > > the infowindow that you want tolinkto) to be either the id or the
> > > > > > > index of the marker.
>
> > > > > > > Use it in the "&marker="+lastmarker
>
> > > > > > >   -- Larry
>
> > > > > > > > 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
>
> ...
>
> read more »

-- 
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.

Reply via email to