]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Possibility to show elevation while hoovering on map 13/3113/2
authorjsimomaa <jani.simomaa@gmail.com>
Mon, 19 Aug 2019 05:50:43 +0000 (08:50 +0300)
committerJani Simomaa <jani.simomaa@semantum.fi>
Mon, 19 Aug 2019 05:51:01 +0000 (05:51 +0000)
gitlab #45
APROS-15550

Change-Id: If9a99a32d10d33d7fc584b3554071cacae8fabfc

org.simantics.district.maps/META-INF/MANIFEST.MF
org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java

index c7858653d4beb8c168254032804ecdc735beb92c..5a51674830c444fbd19d4997130129f1c4e5d0c4 100644 (file)
@@ -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,
index c081c92336c692c75d5031fa5ea46e8523713208..790ebbe01b7550155a6040042439dde96d30ae64 100644 (file)
@@ -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();