Custom markers on Google Maps

Google did a great job with Google Maps from developers point of view. Recent V3 version of Maps API is very simple to use in projects. Recently I created an example how to embed map on the site and display custom markers on it. Markers handle mouse onClick event as well.

This example is using Google Maps API Version 3. You can see the result below.

Custom marker example

Markers have mouse click support. Aren't these little penguins cute ? Try to find all of them ), they handle clicks as well.


Google maps custom marker code

All the code is 25 lines on JavaScript below.


Download javascript google maps marker code

Do not forget to include Google Maps API into your page

<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>

See also my post for capturing Google Maps regions to image file like png or jpeg

.

3 comments

  1. Yeah, it can be pretty useful. Where is the JS sample code? Good to have it in the post. 😉
    I need to try it for “I’ve been here” kinda image.

  2. Thanks, I fixed an unclosed /divm thats why Chrome did not display the code itself.

  3. Pingback: Google Maps Setting Marker Icon Only Duplicates Over Default Icon - Popular Cordova Questions

Leave a Reply

Your email address will not be published.