From: jsimomaa Date: Mon, 19 Aug 2019 05:50:43 +0000 (+0300) Subject: Possibility to show elevation while hoovering on map X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=9fa24b6d5f87afcd3bd54dc30d2eca81d21e5b1e;p=simantics%2Fdistrict.git Possibility to show elevation while hoovering on map gitlab #45 APROS-15550 Change-Id: If9a99a32d10d33d7fc584b3554071cacae8fabfc --- diff --git a/org.simantics.district.maps/META-INF/MANIFEST.MF b/org.simantics.district.maps/META-INF/MANIFEST.MF index c7858653..5a516748 100644 --- a/org.simantics.district.maps/META-INF/MANIFEST.MF +++ b/org.simantics.district.maps/META-INF/MANIFEST.MF @@ -13,7 +13,8 @@ Require-Bundle: org.simantics.scenegraph, org.eclipse.ui.ide, org.eclipse.ui.workbench, org.simantics.district.geotools;bundle-version="1.0.0", - org.slf4j.api;bundle-version="1.7.25" + org.slf4j.api;bundle-version="1.7.25", + org.simantics.maps.elevation.server Export-Package: org.simantics.maps, org.simantics.maps.debug, org.simantics.maps.eclipse, diff --git a/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java b/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java index c081c923..790ebbe0 100644 --- a/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java +++ b/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java @@ -13,7 +13,7 @@ import java.util.Locale; import org.simantics.g2d.participant.MouseUtil; import org.simantics.g2d.participant.MouseUtil.MouseInfo; -import org.simantics.maps.MapScalingTransform; +import org.simantics.maps.elevation.server.SingletonTiffTileInterface; import org.simantics.scenegraph.g2d.G2DNode; import org.simantics.scenegraph.utils.DPIUtil; @@ -49,7 +49,6 @@ public class MapLocationZoomInfoNode extends G2DNode { if (bounds == null) return; // FIXME - int zoomLevel = MapScalingTransform.zoomLevel(ot); MouseInfo mouseInfo = util.getMouseInfo(0); double startLat; @@ -65,7 +64,7 @@ public class MapLocationZoomInfoNode extends G2DNode { startLat = 0; startLon = 0; } - + Number zoomLevel = SingletonTiffTileInterface.lookup(startLat, startLon); String str = "X: " + formatValue(startLon, MAX_DIGITS) + ", Y: " + formatValue(startLat, MAX_DIGITS) + ", Z: " + zoomLevel; g2d.setFont(rulerFont); FontMetrics fm = g2d.getFontMetrics();