POST
|
I want to show current scene scale while scrolling the scene by mouse. My mouse event handlers in MainWindow.xaml.cs: private void MySceneView_MouseScroll(object sender, MouseWheelEventArgs e) { Viewpoint current = MySceneView.GetCurrentViewpoint(ViewpointType.CenterAndScale); ((SceneViewModel)DataContext).Scale = System.Math.Round(current.TargetScale, 2);//I try to write the current scale on the interface TextBlock } But it seems that event doesnt work while scrolling scene by mouse(map scaling) so i dont get the current Scene scale value. I also tried another event MouseWheel and it doesn't triggers also when i try to scroll the scene: private void MySceneView_MouseWheel(object sender, MouseWheelEventArgs e) { Viewpoint current = MySceneView.GetCurrentViewpoint(ViewpointType.CenterAndScale); ((SceneViewModel)DataContext).Scale = System.Math.Round(current.TargetScale, 2); } My SceneView definition in the MainWindow.xaml: <esri:SceneView Grid.Column ="0" x:Name ="MySceneView" Scene="{Binding Scene}" MouseWheel="MySceneView_MouseWheel" MouseMove="MySceneView_MouseMove" Margin="0,0,0,-0.4" HorizontalAlignment="Left" Width="774"/> How can i solve it?
... View more
04-05-2022
01:24 PM
|
0
|
1
|
506
|
POST
|
I want create an Arc on the Scene with given radius between two azimuths. Can i do it?
... View more
12-01-2021
01:44 AM
|
0
|
1
|
462
|
POST
|
Hi, Mark. Yes the line should continues to point in the same direction. The direction should be provided by the azimuth. So first of all the line is drawn on the Scene with starting point, given azimuth and the primary length. Then the length of the line could be changed(extended or reduced) by mouse but still in the same direction.
... View more
11-23-2021
11:11 PM
|
0
|
0
|
1239
|
POST
|
I don't think the measure tool can help. The line should be conracted or extended by mouse along the given azimuth. The main purpose is not to only measure the distance but in the displaying of the distance along the given azimuth on the scene using the line.
... View more
11-23-2021
11:06 PM
|
0
|
0
|
1239
|
POST
|
Hi, I want to use it on the Scene. (like ruler but without changing of the direction)
... View more
11-23-2021
12:11 AM
|
0
|
2
|
1254
|
POST
|
I want to create a line with movable length. With one end is fixed and with the other end that could be dragged by mouse(increasing or decreasing the line length by dragging one end of the line by the mouse). Is it possible? PointCollection polylinePoints = new PointCollection(SpatialReferences.getWgs84()); polylinePoints.add(new Point(0, 0)); polylinePoints.add(new Point(10, 10));//this point should be able to be dragged by mouse along the line Polyline polyline = new Polyline(polylinePoints); SimpleLineSymbol polylineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, 0xFF0063FF, 3); Line = new Graphic(polyline, polylineSymbol); graphicsOverlay.getGraphics().add(Line);
... View more
11-21-2021
10:42 AM
|
0
|
7
|
1306
|
POST
|
Im my case i used delete button on the interface boolean isDeleteElement = false; @FXML private void DeleteElementbyClick() { if(isDeleteElement ==true) { isDeleteElement = false; } else { isDeleteElement = true; } } //And i used the mouse handler for deleting clicked object from the scene sceneView.setInteractionListener(new SceneView.DefaultInteractionListener(sceneView) { public void onMousePressed(javafx.scene.input.MouseEvent e) { if(e.getButton() == MouseButton.PRIMARY) { if(isDeleteElement ==true) { javafx.geometry.Point2D screenPoint = new javafx.geometry.Point2D(Math.round(e.getX()), Math.round(e.getY())); com.esri.arcgisruntime.geometry.Point surfacePoint = sceneView.screenToBaseSurface(screenPoint); // identify graphics on the graphics overlay identifyGraphics = sceneView.identifyGraphicsOverlayAsync(graphicsOverlay, screenPoint, 10, false); identifyGraphics.addDoneListener(() -> { try { // get the list of graphics returned by identify IdentifyGraphicsOverlayResult result = identifyGraphics.get(); List<Graphic> graphics = result.getGraphics(); if (!graphics.isEmpty()) { for(int i = 0; i<graphics.size(); i++) { if(myGraphics.contains(graphics.get(i))) { for (int j = 0; j < myGraphics.size(); j++) graphicsOverlay.getGraphics().remove(myGraphics.get(j)); myGraphics.clear(); } else { graphicsOverlay.getGraphics().remove(graphics.get(i));//just delete a part of the complex graphic object you clicked on by mouse } } } } catch (Exception ex) { ex.printStackTrace(); } }); } } else { // let the default listener you've overridden deal with other events super.onMousePressed(e); } } myGraphic is an ArrayList<Graphic> that contains all graphic elements of some graphical object you want to delete(for example trapezium that consists of 4 lines).
... View more
11-10-2021
11:43 PM
|
0
|
0
|
956
|
POST
|
I want to draw a line with an arrow on the end. PointCollection polylinePoints = new PointCollection(SpatialReferences.getWgs84()); polylinePoints.add(new Point(10, 10)); polylinePoints.add(new Point(20, 20)); Polyline polyline = new Polyline(polylinePoints); SimpleLineSymbol lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, 0xFF0063FF, 7, SimpleLineSymbol.MarkerStyle.ARROW, SimpleLineSymbol.MarkerPlacement.END); Graphic polylineGraphic = new Graphic(polyline, lineSymbol); //as i read the sceneView should be in Static rendering mode for using SimpleLineSymbol.MarkerStyle.ARROW sceneView.getArcGISScene().getLoadSettings().setPreferredPolylineFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC); sceneView.getArcGISScene().getLoadSettings().setPreferredPointFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC); sceneView.getArcGISScene().getLoadSettings().setPreferredPolygonFeatureRenderingMode(FeatureLayer.RenderingMode.STATIC); graphicsOverlay.getGraphics().add(polylineGraphic); But it doen't work. Line is drawn but without arrow on its head How to draw a line with an arrow on the Scene using arcgis runtime api for Java?
... View more
11-10-2021
11:14 PM
|
0
|
2
|
1186
|
POST
|
I want to choose icense level for application i develop. In my application i use SceneView with .tiff data layer(local 500gb of .tif Earth surface imagery), graphic elements, images, height matrix (for relief). As i see on the site https://developers.arcgis.com/java/license-and-deployment/license/#licensing-capabilities there are 4 types of licenses Lite, Basic, Standard and Advanced. I have tried Lite license but it seems it doesn't support adding of local .tif data. So which one of them should i choose?
... View more
10-13-2021
06:15 AM
|
0
|
1
|
563
|
POST
|
I want to delete any scene image by clicking on it or nearby. How can i do it? For example i have a method for adding an image to the Scene public void AddImage(String imgPath, double longitude, double latitude) { GraphicsOverlay graphicsOverlay = new GraphicsOverlay(); sceneView.getGraphicsOverlays().add(graphicsOverlay); PictureMarkerSymbol markerSymbol = new PictureMarkerSymbol(imgPath); markerSymbol.setHeight(20); markerSymbol.setWidth(20); markerSymbol.loadAsync(); markerSymbol.addDoneLoadingListener(() -> { if (markerSymbol.getLoadStatus() == com.esri.arcgisruntime.loadable.LoadStatus.LOADED) { com.esri.arcgisruntime.geometry.Point symbolPoint = new com.esri.arcgisruntime.geometry.Point(longitude, latitude, SpatialReferences.getWgs84()); Graphic symbolGraphic = new Graphic(symbolPoint, markerSymbol); graphicsOverlay.getGraphics().add(symbolGraphic); sceneView.getGraphicsOverlays().add(graphicsOverlay); } else { System.out.println("Failed to load: " + markerSymbol.getLoadError().getCause()); } }); } Also i want to have a method to delete image from the Scene by clicking button Delete and clicking on that image icon on the Scene after that. public void DeleteBtn_Click(javafx.event.ActionEvent actionEvent) { sceneView.setInteractionListener(new SceneView.DefaultInteractionListener(sceneView) { public void onMousePressed(javafx.scene.input.MouseEvent e) { javafx.geometry.Point2D screenPoint = new javafx.geometry.Point2D(Math.round(e.getX()), Math.round(e.getY())); DeleteImage(screenPoint);///so i need a method that get screenPoint and deletes an image near the screenPoint coordinates } }); } So i need a method that gets javafx.geometry.Point2D point and deletes an image located near the coordinates of this point. I didnt find any java arcgis api functions suitable for this.
... View more
08-30-2021
02:47 AM
|
0
|
1
|
1092
|
POST
|
I try to add jar file created by Maven to Scene Builder. But i have only AttributionControl tag in the Import dialog. What could be the problem becouse of which i can't see my MapArcgis.jar custom control inside Import Dialog window?
... View more
08-16-2021
01:28 AM
|
0
|
1
|
1430
|
POST
|
I have a problem with opening fxml file inside Intellij Idea Scene Builder When i click on the Scene Builder button i get "failed to open the file in the Scene Builder"
... View more
06-08-2021
01:48 AM
|
0
|
2
|
14535
|
Online Status |
Offline
|
Date Last Visited |
04-11-2022
04:10 AM
|