Vishal Nagra
Vishal Nagra

Reputation: 113

Change the icon of google marker and use image from project image folder

i have a image names maker.png in project folder Image and I want to use it as google maker image how give proper path in Javascript .please help

Upvotes: 1

Views: 2008

Answers (2)

Sandy
Sandy

Reputation: 199

for the Google Map V3 in javascript you can use it in this way

var marker = new google.maps.Marker({
  position : new google.maps.LatLng(42.344333,-76.432333),
  map      : mapObject,
  icon     : 'images/icon.png',
  title    : 'My Marker'
});

This will help you!

Upvotes: 6

verbanicm
verbanicm

Reputation: 2526

Refer to the following URL, there are examples here

https://developers.google.com/maps/documentation/javascript/overlays#Icons

You can just say 'image/marker.png'

Upvotes: 2

Related Questions