I didnt put code for custom marker image into markers code because I cant get anything to work! If I put any code - all I get is no markers at all.
I was try put this code first: var baseIcon = new GIcon(); baseIcon.iconSize=new GSize(32,32); baseIcon.shadowSize=new GSize(56,32); baseIcon.iconAnchor=new GPoint(16,32); baseIcon.infoWindowAnchor=new GPoint(16,0); var martini = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon27.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon27s.png"); var plane = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon56.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon56s.png"); var pushpin = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal5/icon14.png", null, "http://maps.google.com/mapfiles/kml/pal5/icon14s.png"); function createMarker(point,html,icon) { var marker = new GMarker(point,icon); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; > > then: var marker1 = createMarker(point,plane) > > in: > var marker1 = new GMarker(new GLatLng(45.59551,17.22064), {title:'Dvorac > grofa Jankovića'}) > GEvent.addListener(marker1,"click", function() { > Shadowbox.open({content: 'dvorac_out.swf', > player: "swf", width: 800, height: 600});});map.addOverlay(marker1); > Result - no markers at all and I have no idea how to ... Dana ponedjeljak, 31. prosinca 2012. 17:44:57 UTC+1, korisnik Rossko napisao je: > > but everything I was try to do I cant get a custom image for a marker for >> Gmap! > > > Can't see anywhere in your code snippet that attempts to use a custom > image, so I don't know what you have tried. > The usual way is to create a GIcon object with custom image, and use the > GIcon with your GMarker. > Documentation > > https://developers.google.com/maps/documentation/javascript/v2/overlays#Icons_overview > Examples > http://econym.org.uk/gmap/basic16.htm > http://econym.org.uk/gmap/geicons.htm > > -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-api/-/ktvz1nwlMSkJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
