That explains my question perfectly, thank you for your help Larry I
am in your debt!

Merry Christmas!

On Dec 7, 11:10 pm, "[email protected]" <[email protected]>
wrote:
> On Dec 7, 2:56 pm, Struggling Cartographer <[email protected]>
> wrote:
>
> > Yes, what I want to do is really quite simple, how is the "label"
> > variable assigned in that example?
>
> What "label" variable?
>
> Did you look at the source?
>
> It uses this array to create the markers:
> var beaches = [
>   ['Bondi Beach', -33.890542, 151.274856, "red"],
>   ['Coogee Beach', -33.923036, 151.259052, "blue"],
>   ['Cronulla Beach', -34.028249, 151.157507, "green"],
>   ['Manly Beach', -33.80010128657071, 151.28747820854187, "yellow"],
>   ['Maroubra Beach', -33.950198, 151.259302, "orange"]
> ];
>
> And calls the createMarker function:
> function createMarker(map, latlng, label, html, color) {
>
> with these arguments:
>     var marker =
> createMarker(map,myLatLng,beach[0],beach[0],beach[3]);
>
> So, I believe the answer to your question is it is beach[0].
>
> If you add a [4] element to the array, you would do:
>     var marker =
> createMarker(map,myLatLng,beach[4],beach[0],beach[3]);
>
> To get your desired results, you might need to change the way the
> createMarker function populates the infoWindow, right now it is:
>     var contentString = '<b>'+label+'</b><br>'+html;
>
>   -- Larry
>
>
>
>
>
>
>
>
>
> > If I could get at that I would be laughing (so to speak).
>
> > Apologies, JS is certainly not my "first language" ;-)
>
> > On Dec 7, 10:25 pm, "[email protected]" <[email protected]>
> > wrote:
>
> > > On Dec 7, 1:28 pm, Struggling Cartographer <[email protected]>
> > > wrote:
>
> > > > I have come across those bits before,
>
> > > Have you seen this:http://www.geocodezip.com/v3_markers_infowindows.html
>
> > >   -- Larry
>
> > > > essentially this is what I want
> > > > to work:
>
> > > > Something that works (all info boxes say hello):
> > > > google.maps.event.addListener(marker, 'click', function() {
> > > >         infowindow.setContent('hello');
> > > >         infowindow.open(map,marker);
> > > >         });
>
> > > > }
>
> > > > Something that doesn't work (no info boxes):
> > > > google.maps.event.addListener(marker, 'click', function() {
> > > >         infowindow.setContent(beach[4]);
> > > >         infowindow.open(map,marker);
> > > >         });
>
> > > > }
>
> > > > Do you see what I am getting at?
>
> > > > On Dec 7, 8:57 pm, Marc Ridey <[email protected]> wrote:
>
> > > > > Does these help:
>
> > > > > Multiple Markers with multiple infowindows and 
> > > > > StreetViewhttp://blog.mridey.com/2010/11/maps-api-javascript-v3-multiple-marker...
>
> > > > > Multiple Markers, InfoWindow and StreetView
> > > > > <http://blog.mridey.com/2010/11/maps-api-javascript-v3-multiple-marker...>http://blog.mridey.com/2010/11/maps-api-javascript-v3-multiple-marker...
> > > > > <http://blog.mridey.com/2010/11/maps-api-javascript-v3-multiple-marker...>
>
> > > > > On Wed, Dec 8, 2010 at 7:15 AM, Struggling Cartographer <
>
> > > > > [email protected]> wrote:
> > > > > > Hi, I am having real trouble adding info windows to my marker array.
>
> > > > > > To take the basic example here:
>
> > > > > >http://code.google.com/apis/maps/documentation/javascript/examples/ic...
>
> > > > > > What would the correct code be if for example I stored the info for
> > > > > > the infobox in beach[4] ?
>
> > > > > > Thanks in advance
>
> > > > > > --
> > > > > > 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%2B
> > > > > >  [email protected]>
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.-Hidequotedtext
> > > > > > -
>
> > > > - 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].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to