| |
| |
| Module wicketstuff-gmap3 integrates "Google Maps":http://maps.google.com service with Wicket providing component org.wicketstuff.gmap.GMap. If we want to embed Google Maps into one of our pages we just need to add component GMap inside the page. The following snippet is taken from example page SimplePage: |
| |
| *HTML:* |
| |
| {code:html} |
| ... |
| <body> |
| <div wicket:id="map">Map</div> |
| </body> |
| ... |
| {code} |
| |
| *Java code:* |
| |
| {code} |
| public class SimplePage extends WicketExamplePage |
| { |
| public SimplePage() |
| { |
| GMap map = new GMap("map"); |
| map.setStreetViewControlEnabled(false); |
| map.setScaleControlEnabled(true); |
| map.setScrollWheelZoomEnabled(true); |
| map.setCenter(new GLatLng(52.47649, 13.228573)); |
| add(map); |
| } |
| } |
| {code} |
| |
| The component defines a number of setters to customize its behavior and appearance. More info can be found on wiki page "https://github.com/wicketstuff/core/wiki/Gmap3":https://github.com/wicketstuff/core/wiki/Gmap3 . |