Re: Custom GMarker
On Jul 24, 11:45 am, Fabrizio <f...@speno.ch> wrote:
> Yes but the BIG problem of goggle documentation is that the examples
> code are always made with random position of the points and i not have
> a random position...
So you need to read the reference, not the examples.
You want to alter the appearance of the marker, which you create here:
map.addOverlay(new GMarker(new GLatLng(78.37268,17.024919)));
The bit which creates the marker is
new GMarker(new GLatLng(78.37268,17.024919))
so you need to look at http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMarker
That tells you there are options:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMarkerOptions
And that tells you that you need an "icon" option.
new GMarker(new GLatLng(78.37268,17.024919),{icon:baseIcon})
which says "create a new GMarker at this location and using this
icon". Then you bundle it up in your addOverlay call, which the group
interface will split over more than one line:
map.addOverlay(new GMarker(new GLatLng(78.37268,17.024919),
{icon:baseIcon}));
--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home