Search in sources :

Example 1 with LayerGroup

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();
}
Also used : EPSG3857(org.discotools.gwt.leaflet.client.crs.epsg.EPSG3857) MapOptions(org.discotools.gwt.leaflet.client.map.MapOptions) Options(org.discotools.gwt.leaflet.client.Options) TileLayer(org.discotools.gwt.leaflet.client.layers.raster.TileLayer) MapOptions(org.discotools.gwt.leaflet.client.map.MapOptions) ILayer(org.discotools.gwt.leaflet.client.layers.ILayer) AiLatLng(org.activityinfo.model.type.geo.AiLatLng) LayerGroup(org.discotools.gwt.leaflet.client.layers.others.LayerGroup) Extents(org.activityinfo.model.type.geo.Extents) Map(org.discotools.gwt.leaflet.client.map.Map)

Aggregations

AiLatLng (org.activityinfo.model.type.geo.AiLatLng)1 Extents (org.activityinfo.model.type.geo.Extents)1 Options (org.discotools.gwt.leaflet.client.Options)1 EPSG3857 (org.discotools.gwt.leaflet.client.crs.epsg.EPSG3857)1 ILayer (org.discotools.gwt.leaflet.client.layers.ILayer)1 LayerGroup (org.discotools.gwt.leaflet.client.layers.others.LayerGroup)1 TileLayer (org.discotools.gwt.leaflet.client.layers.raster.TileLayer)1 Map (org.discotools.gwt.leaflet.client.map.Map)1 MapOptions (org.discotools.gwt.leaflet.client.map.MapOptions)1