Select to view content in your preferred language

Identify seems only to work with point geometries with BETA 2

2086
2
Jump to solution
04-09-2012 02:24 PM
Jan-Tschada
Esri Contributor
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
0 Kudos
1 Solution

Accepted Solutions
RalfGottschalk
Esri Contributor
Hi Jan,

I am able to get identify to work with an envelope at Pre-Release.  Could you please try your code at Pre-Release?

View solution in original post

0 Kudos
2 Replies
RalfGottschalk
Esri Contributor
Hi Jan,

I am able to get identify to work with an envelope at Pre-Release.  Could you please try your code at Pre-Release?
0 Kudos
Jan-Tschada
Esri Contributor
Hi Ralf,

Works like a charm with the Pre-Release version.

[ATTACH=CONFIG]14631[/ATTACH]

Thank you,
Jan
Product Manager
Developers and Location Services
Germany and Switzerland
0 Kudos