简体   繁体   中英

Add a custom icon to embedded google map

I'm adding maps to a website dynamically, finding the lat and lng by using google's geocoding service. I'd like to put a marker on the position returned by the geocoding service, on top of that, I'd like the marker to be a custom image.

You need to use the GIcon class. Please take a look at this:

http://code.google.com/apis/maps/documentation/javascript/v2/overlays.html#Custom_Icons

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM