Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Gmap3 custom Icon

$
0
0
Hi to all,

I am trying to customize the default marker.png by defining GIcon with a
custom xxx.png but it just doesn´t want to show up in my map.
The default marker.png is shown without problems. I am getting no errors.
Can someone help me out on this one? I am using wicket 6.8.0 with
wicketstuff-gmap3 6.8.0.

My code is:

gmap = new ExtendedGmap("gmap");
add(gmap);

gmap.setOutputMarkupId(true);
gmap.setPanControlEnabled(true);
gmap.setMapType(GMapType.ROADMAP);
gmap.setDraggingEnabled(true);
gmap.setMapTypeControlEnabled(true);
gmap.setStreetViewControlEnabled(true);
gmap.setScaleControlEnabled(true);
gmap.setScrollWheelZoomEnabled(true);

GIcon hotelIcon = new GIcon("Hotel.png");
GLatLng centerLatLng = new
GLatLng(offerModel.getObject().getHotel().getLatitude(),
offerModel.getObject().getHotel().getLongitude());
GMarkerOptions centerOptions = new GMarkerOptions(gmap, centerLatLng,
"Hotel", hotelIcon, null);
GMarker centerMarker = new GMarker(centerOptions);
gmap.addOverlay(centerMarker);
gmap.setCenter(centerLatLng);

Thanks for your advice.

Tom

Viewing all articles
Browse latest Browse all 5648

Trending Articles