Runtime10.1 to 100.1 - IdentifyTask .mpk File

729
3
08-25-2017 12:58 PM
DenisO_Connor
New Contributor

Trying to upgrade from Runtime WPF 10.1 to NET 100.1.0 - original code to query local .MPK file used mouse click point in IdentifyParameters - Executed IdentifyTask with the results Graphic picked up on ExecuteCompleted and displayed on Graphics Layer 

Cannot find any example of this in 100.1 - how can this be done in 100.1 ??

#MicroWorks

Tags (1)
0 Kudos
3 Replies
dotMorten_esri
Esri Notable Contributor

You no longer need to deal with the identify task per layer. You just use the IdentifyAsync method directly on the MapView/SceneView, and we'll handle all the different layer types for you.

0 Kudos
DenisO_Connor
New Contributor

Our Runtime WPF 10.1 application was designed to display TPK layers of polygons and line features - some of which have thematic symbols. The design held paralell MPK files with the same polygons and lines - these were not displayed on the map as they generated very slowly due to the multiple polygons (thousands) and multiple vertices (hundreds) in each polygon. 

 

When the user clicked on on the Tiled Layer, the 10.1 IdentifyTask queried the MPK file and retrieved the single polygon or line feature and information and displayed the feature as a graphic on the graphics layer.

 

We have now identified how to use IdentifyLayerAsync in 100.1 to query the MPK on the GeoTapped Event - our initial error was that we expected the IdentifyLayerAsync to return the polgons/lines as Results.GeoElements - this was not correct - the polygons/lines are returned under the Results.SublayerResults.GeoElements. This is the case even if there is only 1 Layer in the MPK file.

 

The problem with the 100.1 approach is that the MPK layers must be visible to the user to allow the IdentifyLayerAsync to query them. The 10.1 IdentifyTask operated on the MPK files in the background.

 

Can you advise if it is possible to query the MPK files in 100.1 without the need to make these visible? Or do we need to redesign the architecture to accommodate an alternative 100.1 technique?  

0 Kudos
DenisO_Connor
New Contributor

Our Runtime WPF 10.1 application was designed to display TPK layers of polygons and line features - some of which have thematic symbols. The design held paralell MPK files with the same polygons and lines - these were not displayed on the map as they generated very slowly due to the multiple polygons (thousands) and multiple vertices (hundreds) in each polygon. 

When the user clicked on on the Tiled Layer, the 10.1 IdentifyTask queried the MPK file and retrieved the single polygon or line feature and information and displayed the feature as a graphic on the graphics layer.

We have now identified how to use IdentifyLayerAsync in 100.1 to query the MPK on the GeoTapped Event - our initial error was that we expected the IdentifyLayerAsync to return the polgons/lines as Results.GeoElements - this was not correct - the polygons/lines are returned under the Results.SublayerResults.GeoElements. This is the case even if there is only 1 Layer in the MPK file.

The problem with the 100.1 approach is that the MPK layers must be visible to the user to allow the IdentifyLayerAsync to query them. The 10.1 IdentifyTask operated on the MPK files in the background.

Can you advise if it is possible to query the MPK files in 100.1 without the need to make these visible? Or do we need to redesign the architecture to accommodate an alternative 100.1 technique?  

0 Kudos