We are developing a sample application which supports some basic functionality like navigating the map, zoom, identify with flashing and so on. We were not able to get any identify results by using an envelope nor a polygon geometry as spatial restriction. See the commented source code below.Sample map application:[ATTACH=CONFIG]13356[/ATTACH]IdentifyParameters identifyparam = new IdentifyParameters(); // Only works if location represents a point geometry identifyparam.setGeometry(location); . .
The envelope geometry is created the same way as being used by the zoom in tool. The map is able to correctly set the new extent. The create envelope method is implemented as shown below. The MapView is just a custom class offering access to the JMap control.public static Envelope toEnvelope(MapView mapView, Rectangle2D rectangle) { Point topLeftPoint = mapView.getMap().toMapPoint((int) rectangle.getMinX(), (int) rectangle.getMinY()); Point bottomRightPoint = mapView.getMap().toMapPoint((int) rectangle.getMaxX(), (int) rectangle.getMaxY()); return new Envelope(topLeftPoint.getX(), topLeftPoint.getY(), bottomRightPoint.getX(), bottomRightPoint.getY()); }
Would you be so kind and try to examine this?Thanks in advance.
Product Manager
Developers and Location Services
Germany and Switzerland