Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add custom marker for gmap.js?

I am currently trying to add custom marker for for a map that I am using and I was wondering if anyone has had managed to add a customer marker when using gmap.js?

like image 971
ramesh Avatar asked Jul 01 '13 19:07

ramesh


1 Answers

map.addMarker({
    lat: latlng.lat(),
    lng: latlng.lng(),
    icon: "/images/mapicon.png"
});

or we can initialize:

var marker = new google.maps.Marker({
  position: myLatLng,
  map: map,
  icon: 'schools_maps.png',
  shadow: 'schools_maps.shadow.png'
});
like image 168
Praveen Avatar answered Sep 23 '22 03:09

Praveen