POST
|
Hello, Yes, you can download the jar from Bintray and add it to your classpath like you are doing with the arcgis-java jar. Hope this helps, Tyler
... View more
09-09-2019
08:10 AM
|
0
|
2
|
521
|
POST
|
Unfortunately, there is no API for identifying on a group of GraphicsOverlays. You can either call GeoView#identifyGraphicsOverlayAsync on each one you are interested in or call GeoView#identifyGraphicsOverlaysAsync and filter the results using IdentifyGraphicsOverlayResult#getGraphicsOverlay .
... View more
09-03-2019
11:15 AM
|
0
|
0
|
1352
|
POST
|
In the "nested" approach I posted above, if you click on a graphic, features (layers) will not be queried: if (identifyGraphicsResults.size() > 0) {
// process the tapped graphic results (don't query features)...
} else {
// no graphics were tapped (query features)... If you want clicked features to have priority, you can query them in the opposite order. If you don't want to prioritize features over graphics or vice versa, you can use the "separate" approach. Currently, the API does not provide a way to query features and graphics simultaneously. For one, IdentifyGraphicsOverlayResult does not share a parent class with IdentifyLayerResult. So it is up to you to determine how you want to combine the queries/results. If you do need this ability, please submit a feature request.
... View more
08-19-2019
09:52 AM
|
0
|
2
|
1352
|
POST
|
Hello, It's likely that your second StackPane is intercepting click, pan, and zoom events before they get to the StackPane with your MapView. Keep the MapView in the bottom StackPane (id: MapPane) and try setting pickOnBounds to false on the second StackPane (id: PanButtonContainerPane). Hope this helps, Tyler
... View more
08-19-2019
09:29 AM
|
0
|
0
|
322
|
POST
|
Hi Asif, I assume that your custom touch listener looks a bit like the one in this sample: https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/identify-graphics/src/main/java/com/esri/arcgisruntime/sample/identifygraphics/MainActivity.java#L110. To get tapped graphics and features, you will need to call both mapView.identifyGraphicsOverlaysAsync and mapView.identifyLayersAsync. There isn't a method which can be used to identify both. You can either process the results in separate doneListeners or nest one inside the other, depending on what you want to do. This should happen in your onSingleTappedConfirmed method. Separate: // identify graphics...
final ListenableFuture<List<IdentifyGraphicsOverlayResult>> identifyGraphicsFuture = mMapView.identifyGraphicsOverlaysAsync(screenPoint, 10.0, false);
identifyGraphicsFuture.addDoneListener(new Runnable() {
@Override
public void run() {
try {
List<IdentifyGraphicsOverlayResult> identifyGraphicsResults = identifyGraphicsFuture.get();
if (identifyGraphicsResults.size() > 0) {
// process the tapped graphic results...
}
} catch(InterruptedException | ExecutionException ie){
ie.printStackTrace();
}
}
});
// identify features...
final ListenableFuture<List<IdentifyLayerResult>> identifyLayersFuture = mMapView.identifyLayersAsync(screenPoint, 10.0, false);
identifyLayersFuture.addDoneListener(new Runnable() {
@Override
public void run() {
try {
List<IdentifyLayerResult> identifyLayerResults = identifyLayersFuture.get();
if (identifyLayerResults.size() > 0) {
// process the tapped feature results...
}
} catch(InterruptedException | ExecutionException ex){
ex.printStackTrace();
}
}
}); Nested: // identify graphics on the graphics overlay
final ListenableFuture<List<IdentifyGraphicsOverlayResult>> identifyGraphicsFuture = mMapView.identifyGraphicsOverlaysAsync(screenPoint, 10.0, false);
identifyGraphicsFuture.addDoneListener(new Runnable() {
@Override
public void run() {
try {
List<IdentifyGraphicsOverlayResult> identifyGraphicsResults = identifyGraphicsFuture.get();
if (identifyGraphicsResults.size() > 0) {
// process the tapped graphic results...
} else {
// no graphics were tapped, try to identify tapped features...
final ListenableFuture<List<IdentifyLayerResult>> identifyLayersFuture = mMapView.identifyLayersAsync(screenPoint, 10.0, false);
identifyLayersFuture.addDoneListener(new Runnable() {
@Override
public void run() {
try {
List<IdentifyLayerResult> identifyLayerResults = identifyLayersFuture.get();
if (identifyLayerResults.size() > 0) {
// process the tapped feature results...
} else {
// no graphics or features were tapped
}
} catch(InterruptedException | ExecutionException ex){
ex.printStackTrace();
}
}
});
}
} catch(InterruptedException | ExecutionException ie){
ie.printStackTrace();
}
}
}); Hope this helps.
... View more
08-06-2019
08:48 AM
|
0
|
4
|
1352
|
POST
|
Hi Edmundo, There are a number of ways to do this depending on your specific use case. If you want to filter the features when they are requested from the server, you can create QueryParameters with a where clause (essentially a SQL query string) and use it to populate the feature layer's feature table. Here is an Android samples that shows this: https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/service-feature-table-manualcache/src/main/java/com/esri/arcgisruntime/samples/servicefeaturetablemanualcache/MainActivity.java#L80. For a feature layer that is already loaded and displayed, you can filter which features are displayed using a definition expression on the feature layer https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setDefinitionExpression(java.lang.String). Here is another sample which shows the definition expression: https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/feature-layer-definition-expression/src/main/java/com/esri/arcgisruntime/samples/featurelayerdefinitionexpression/MainActivity.java#L72. Alternatively, if you'd prefer to show/hide features manually (without a query expression), you can use https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setFeaturesVisible(java.lang.Iterable,boolean). Hope this helps, Tyler
... View more
07-02-2019
09:25 AM
|
1
|
0
|
822
|
POST
|
Yes. I'm pretty sure you would need to create a standard app (extend Application with a stage and scene) for any of our code to work. The MapView probably wouldn't know how to render anything without being in a scene/stage. But again, this is outside of our normal use so I don't have much experience with this kind of workflow. Again, the Java SDK wasn't intended for this use case. You might look into the ArcGIS API for Python. I don't have any experience with it, but I think it is more suited toward this kind of back-end scripting workflow. I believe it can also work with maps on ArcGIS Online and export the map to an image: arcgis.mapping module — arcgis 1.3.0 documentation . If you needed to call it from your Java web app, you might look into Jython for that.
... View more
02-27-2018
03:07 PM
|
0
|
1
|
895
|
POST
|
Glad to hear that code is working for you. As for the use of get(): It should work exactly the same as Java's Futures. We only extend it to add the listeners. I'm almost certain it's not working because some rendering isn't working in a web server environment and so the async operation never completes. The Java SDK is intended only for desktop JavaFX client applications. I also believe this is the only environment our licensing permits. Since our view components (MapView) are all based on top of JavaFX components, they will likely only work where JavaFX components work (on the desktop). If you only want to be able to render maps in your web app's front-end, I would suggest using the Javascript API ArcGIS API for JavaScript | ArcGIS for Developers . If on the back-end, that's probably a bit trickier, and I'm not aware of a solution (I'm just a product engineer). Maybe Eric Bader can help with that? Sorry I couldn't help you more. If you have any more questions about using the SDK with JavaFX in a desktop environment, I'm happy to help. I wrote many of the samples that we have on GitHub. Cheers, Tyler
... View more
02-26-2018
04:08 PM
|
0
|
3
|
895
|
POST
|
Hi Chris, Welcome to the Java SDK! I don't think the problem is with the jniLibs. I would expect your app to throw an exception much earlier with a message like "Failed to location the SDK..." if that were the case. I believe the problem is where you directly create a feature layer from the feature table you created. I have attached the source code for a JavaFX application which does what you want. Most of the logic comes from these samples: arcgis-runtime-samples-java/src/main/java/com/esri/samples/featurelayers/feature_collection_layer at master · Esri/arcgi… , arcgis-runtime-samples-java/src/main/java/com/esri/samples/mapview/take_screen_shot at master · Esri/arcgis-runtime-samp… . Let me know if it doesn't work for you. Cheers, Tyler
... View more
02-23-2018
04:01 PM
|
0
|
0
|
895
|
Title | Kudos | Posted |
---|---|---|
1 | 07-02-2019 09:25 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|