Domanda

I am trying to add a different pin image to client side marker. I tried Icon: and picture: (the same way pictures are assigned in the controller side) but non of them seem to work

var tempmarker = {lat: lat, lng: lng, "infowindow":"hello:, picture:"assets/pin.png"}

I tried to find more information in the gmaps4rails docs but could not find any list of attributes.

Thank you

È stato utile?

Soluzione

Sample of expected json:

{
"lat":50.8503396,
"lng":4.3517103,
"picture":
  {
   "url":"/logo.png",
   "width":32,
   "height":32
  },
"infowindow":"Bar"
}

Source code is pretty clear.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top