use of org.gwtopenmaps.openlayers.client.Map in project geo-platform by geosdi.
the class CatalogMapMoveListenerProvider method get.
@Override
public MapMoveEndListener get() {
return new MapMoveEndListener() {
@Override
public void onMapMoveEnd(MapMoveEndEvent eventObject) {
Map map = eventObject.getSource();
fireCatalogBBoxChangeEvent(CatalogMapExtentReprojector.reprojects(new Projection(map.getProjection()), map.getExtent()));
}
};
}
use of org.gwtopenmaps.openlayers.client.Map in project geo-platform by geosdi.
the class GPFeatureInfoWidget method refreshFeatures.
@Override
public void refreshFeatures(Layer layer) {
FeatureInfoFlyWeight.getInstance().refreshFeatures(layer);
IGPFeatureInfoElement element = FeatureInfoFlyWeight.getInstance().get(layer);
Map map = this.mapWidget.getMap();
map.addControl(element.getElementControl());
if (this.featureCaller.isActivated()) {
element.getElementControl().activate();
}
}
use of org.gwtopenmaps.openlayers.client.Map in project geo-platform by geosdi.
the class Utility method generateMapLiteURL.
public static String generateMapLiteURL() {
IGPAccountDetail accountDetail = Registry.get(UserSessionEnum.ACCOUNT_DETAIL_IN_SESSION.name());
GPClientProject clientProject = (GPClientProject) Registry.get(UserSessionEnum.CURRENT_PROJECT_ON_TREE.name());
StringBuilder mapLiteURL = new StringBuilder();
mapLiteURL.append(MapLiteModuleConstants.INSTANCE.MAP_LITE_APPLICATION_URL());
mapLiteURL.append("?mapID=");
mapLiteURL.append(clientProject.getId());
mapLiteURL.append("-");
mapLiteURL.append(accountDetail.getId());
mapLiteURL.append("&x=");
Map map = GPApplicationMap.getInstance().getApplicationMap().getMap();
LonLat lonLat = map.getCenter();
lonLat.transform(map.getProjection(), GPCoordinateReferenceSystem.WGS_84.getCode());
mapLiteURL.append(lonLat.lon());
mapLiteURL.append("&y=");
mapLiteURL.append(lonLat.lat());
mapLiteURL.append("&zoom=");
mapLiteURL.append(map.getZoom());
mapLiteURL.append("&baseMap=");
mapLiteURL.append(accountDetail.getBaseLayer());
return mapLiteURL.toString();
}
use of org.gwtopenmaps.openlayers.client.Map in project geo-platform by geosdi.
the class GPFeatureInfoWidget method removeLayer.
@Override
public void removeLayer(Layer layer) {
if (FeatureInfoFlyWeight.getInstance().contains(layer)) {
Map map = this.mapWidget.getMap();
IGPFeatureInfoElement featureInfoElement = FeatureInfoFlyWeight.getInstance().get(layer);
featureInfoElement.getElementControl().deactivate();
map.removeControl(featureInfoElement.getElementControl());
FeatureInfoFlyWeight.getInstance().remove(layer);
}
}
use of org.gwtopenmaps.openlayers.client.Map in project geo-platform by geosdi.
the class GPFeatureInfoWidget method addLayer.
@Override
public void addLayer(Layer layer) {
if (!FeatureInfoFlyWeight.getInstance().contains(layer)) {
IGPFeatureInfoElement element = FeatureInfoFlyWeight.getInstance().get(layer);
Map map = this.mapWidget.getMap();
map.addControl(element.getElementControl());
if (this.featureCaller.isActivated()) {
element.getElementControl().activate();
}
}
}
Aggregations