Using jquery-ui-map, I try to use personnalized icon. I works fine this way :
$("#gmap_" + parent).gmap('addMarker', {
"id": "marker-"+m.id,
'position': new google.maps.LatLng(m.lat, m.lon),
'bounds':true,
'icon': '/images/'+m.icon
})
As my icon is just an url. But I want to put all my icons in a sprite, so I have to set other option :
$("#gmap_" + parent).gmap('addMarker', {
"id": "marker-"+m.id,
'position': new google.maps.LatLng(m.lat, m.lon),
'bounds':true,
'icon': new google.maps.MarkerImage( {
'url' : "http://crm.brunet.pro/images/markers.png",
'origin': new google.maps.Point(m.pos, 0),
'size' : new google.maps.Size(20, 34)
})
})
I get this error :
GET http://mysite.com/[object%20Object] 400 (Bad Request)
So it looks like the icon option only accepts a string. But you can see in the api that it should accept a MarkerImage object.
What did I wrong ?
Thanks