Re: [Google Maps API v3] Re: Markers array

2011-06-30 Thread Richard Quadling
On 29 June 2011 16:08, Arnaud upsid...@bluewin.ch wrote: Ok thank you, I will try that. Sounds good. On 29.06.11 15:24, Pil wolf...@gmail.com wrote: This should work (untested pseudocode): function createMarker(id) {  var marker = new google.maps.Marker({    position: latlng,    icon:

[Google Maps API v3] Re: Markers array

2011-06-30 Thread Pil
On Jun 30, 11:53 am, Richard Quadling rquadl...@gmail.com wrote: So, maybe ... myMarkers['this_markers_id'] = singleMarker; You cannot compare a property of a marker with the marker object (or define a marker property as a marker). There is also no comparison operator to compare complex

Re: [Google Maps API v3] Re: Markers array

2011-06-30 Thread Ben Appleton
You can do this by defining a custom .toString method, like: singleMarker.toString = function() { return this.id; }; Then you can write: myMarkers[singleMarker] = singleMarker; - Ben Android brevity On Jun 30, 2011 7:53 PM, Richard Quadling rquadl...@gmail.com wrote: On 29 June 2011 16:08,

[Google Maps API v3] Re: Markers array

2011-06-29 Thread Mike Dolbow
Can you individually assign IDs with the variable you use to define each marker? So instead of var marker = new google.maps.Marker... do var marker01 = new google.maps.Marker... ? Would that work? -- You received this message because you are subscribed to the Google Groups Google Maps

[Google Maps API v3] Re: Markers array

2011-06-29 Thread Pil
This should work (untested pseudocode): function createMarker(id) { var marker = new google.maps.Marker({ position: latlng, icon: image, map: map, title: name, draggable: true, id: id }); gmarkers.push(marker); } Now it should be possible to access every marker in

Re: [Google Maps API v3] Re: Markers array

2011-06-29 Thread Arnaud
Ok thank you, I will try that. Sounds good. On 29.06.11 15:24, Pil wolf...@gmail.com wrote: This should work (untested pseudocode): function createMarker(id) { var marker = new google.maps.Marker({ position: latlng, icon: image, map: map, title: name, draggable: true,