javascript - GoogleMaps - multiple markers with multiple colors -


I'm trying to create a good Google map on it with some markers. I have found some really solid solutions in the web, which covers almost every thing: D. I want to paint the pin / marker on the map.

Well, tried to do one thing, but unfortunately, something went wrong: (so you will not see the map, but all the codes are)

  // Markers with multiple markers = [['Marker_name', 51.113882, 17.070474],];  

This part is responsible for showing many markers, can I somehow define the color of the marker (I know that this is possible, because I use the tutorial to mark all the marker colors Change, but I want to say that we call 4-5 different color markers)?

The code is a part of the custom information box for each marker, so maybe this can be done :) Thanks!

You can use something like this:

  var marker = [['Starter', 51.113882, 17.070474, 'icon1.png'],];  

and change your constructor to:

  [...] marker = new google.maps.marker ({status: position, map: map , Title: Marker [i] [0], Icon: Marker [i] [3]});  

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -