On Feb 22, 9:33 am, LarsM <[email protected]> wrote:
> Hi Andrew,
>
> I am sorry.
> I have a hard time to put together these fragmentary code snippets and
> comments.
>
> I do have a list of locations.
>
> Obviously I can for each one create a marker with an infoWindow.
>
> And these should maybe be saved in an array called 'markers' that exist
> somewhere...?
> But how?
>
> What do I do with this:
>
> Where is the function createMarker called? How do you get the parameters
> (map,latlng,label,html, color) into the function?
>
> var infowindow = new google.maps.InfoWindow(
>   {
>     size: new google.maps.Size(150,50)
>   });
>
>  function createMarker(map, latlng, label, html, color) {
>     var contentString = label;
>     marker = new google.maps.Marker({
>         position: latlng,
>         map: map,
>         icon: getMarkerImage(color),
>         shape: iconShape,
>         zIndex: Math.round(latlng.lat()*-100000)<<5
>         });
>
>     google.maps.event.addListener(marker, 'click', function() {
>         infowindow.setContent(contentString);
>         infowindow.open(map,markers);
>         });
>
>   markers.push(marker);  //* *is this the right position for this?
>
> }
>
> *Maybe you have the possibility to point at a more comprehensive example of
> creating markers with infoWindow i V3? *

Like this?
http://www.geocodezip.com/v3_MW_example_map1.html

  -- Larry

>
> Would very much appreciate that...
>
> /LarsM**

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