POST
|
Our WPF app has multiple windows one of which hosts a map control with graphics drawn on it. I was investigating being able to drag a graphics from the the map and drop on another window (each graphic has custom data that we want to show in another window). The control has a DragEnter event but it never seems to fire. I tried setting IsPanEnabled to false but the event still does not fire. I could use the mouse events but I want to set the drop data in DragEnter and drop it on another window that is looking for the standard Windows drop events. Is there not a "standard" way to drag a graphic and enable Windows drag/drop?
... View more
09-17-2019
11:56 AM
|
0
|
1
|
599
|
POST
|
Thanks, setting the InitialViewpoint worked. I misread the exception I was getting calling SetViewpoint(), it was because I forgot to set the spatial reference for the point.
... View more
08-30-2019
10:43 AM
|
0
|
0
|
660
|
POST
|
We are working on an app where we persist the current viewport (x, y, scale) for the map. When the app is restarted we were going to call SetViewpoint(). The problem we encountered is that you cannot call SetViewpoint() until the map has been loaded or will an exception will be thrown. There is a constructor for the map class that allows you to set the initial viewpoint but it takes level of detail not scale: public Map(BasemapType basemapType, double latitude, double longitude, int levelOfDetail); Yes we can subscribe to the Load event on the MapView and not call SetViewpoint() until then but it would be easier if we could use the Map constructor that accept the initial viewpoint. We get the current viewpoint by call GetCurrentViewpoint() which has the scale but not the level of detail. Is there a way to get the current level of detail or convert the scale to level of detail? If Esri is reading this how about adding constructor to map that also accepts scale.
... View more
08-30-2019
08:47 AM
|
0
|
3
|
822
|
POST
|
We are using the SketchEditor to allow users to draw polygons on the map and the geometry is being saved to SQL Server. By default the geometry returned from the SketchEditor is wkid 102100. We have existing geometry data in the database whose wkid is 4326. We want all the data in the database to have the same SRID. I did not see a way to specify the spatial reference used by the SketchEditor. The spatial reference for the Map property is null so assuming 102100 is the default. Is there a way to change the spatial reference used by the SketchEditor?
... View more
07-11-2019
02:14 PM
|
0
|
1
|
435
|
POST
|
We are using the API to sketch shapes (polygon, point, etc) on the map. I found that the the Graphics object has a ToJson() for the geometry and symbol data so looking into using that. I will also look into FeatureCollection.
... View more
07-01-2019
02:01 PM
|
0
|
2
|
988
|
POST
|
We would like to save the graphics overlays on a map and allow a user to add them back to a map at a later time. I did not see any functionality in the SDK for persisting the overlays. Without writing a lot of custom code, is it possible to save the overlays or even the complete map with the overlays?
... View more
06-28-2019
01:11 PM
|
0
|
4
|
1168
|
POST
|
We are doing some testing of the SDK Runtime using C# & WPF. I started with the "Display point, line, and polygon graphics" tutorial and added the following code: private void DisplayPoints(SqlGeography geometry, Color pointColor, bool displayOnMap = true) { var numGeometries = geometry.STNumGeometries(); for (int i = 0; i < geometry.STNumGeometries(); i++) { var polygonPoints = new Esri.ArcGISRuntime.Geometry.PointCollection(SpatialReferences.Wgs84); var numSTPoints = geometry.STGeometryN(i + 1).STNumPoints(); for (int j = 1; j <= numSTPoints; j++) { var point = geometry.STPointN(j); pointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle.Circle, pointColor, 5); pointSymbol.Outline = new SimpleLineSymbol(SimpleLineSymbolStyle.Null, pointColor, 1); var pointGraphic = new Graphic(new MapPoint((double)point.Long, (double)point.Lat, SpatialReferences.Wgs84), pointSymbol); MapGraphics.Graphics.Add(pointGraphic); } } } } I am loading some geography data from a db and displaying on the map. Everything works except the points are always the same color no matter what color is passed in. I determined that whatever is the last color of the last point added wins. If I want to add a bunch of points (or polygons) what is the proper way to set the colors if I need them to be different.
... View more
05-31-2019
12:11 PM
|
0
|
1
|
703
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|