androidgoogle-mapsandroid-layoutitemizedoverlayandroid-view

ANDROID: How make custom view(layout) for marker on Google Maps


How to make custom view for marker or how to make custom layout. like this... enter image description here and please look at screenshot:

enter image description here


Solution

  • I don't code android yet, so this is based largely on the last code block here: http://code.google.com/apis/maps/articles/android_v3.html

    Where it ends up being just a regular map implementation, so you'd do the following to add a marker to an existing map:

    var myIcon=new google.maps.MarkerImage('my_icon.png');
    var point=new google.maps.LatLng(someLatitude,someLongitude);
    var marker = new google.maps.Marker({position: point,map: map, icon:mc});