use of org.discotools.gwt.leaflet.client.layers.others.LayerGroup in project activityinfo by bedatadriven.
the class LocationMap method afterRender.
@Override
protected void afterRender() {
super.afterRender();
Extents countryBounds = searchPresenter.getCountryBounds();
MapOptions mapOptions = new MapOptions();
mapOptions.setCenter(new LatLng(countryBounds.getCenterY(), countryBounds.getCenterX()));
mapOptions.setZoom(6);
mapOptions.setProperty("crs", new EPSG3857());
TileLayer baseLayer = new TileLayer(MapboxLayers.MAPBOX_STREETS, new Options());
markerLayer = new LayerGroup(new ILayer[0]);
map = new Map(getElement().getElementsByTagName("div").getItem(0), mapOptions);
map.addLayer(baseLayer);
map.addLayer(markerLayer);
bindEvents();
}
Aggregations