POST
|
here is the code in order to show wmts tiles protected override Task<Uri> GetTileUriAsync(int level, int row, int column, CancellationToken cancellationToken)
{
row = (int)(Math.Pow(2, level) - row - 1);
string uriString = tilesUri + $"/{level}/{column}/{row}.png";
return Task.FromResult(new Uri(uriString, UriKind.Absolute));
}
... View more
05-04-2017
01:29 AM
|
0
|
0
|
1738
|
POST
|
Hi, thanks for your answer. In fact, I can understand that a .mpk file has to use the same spatial reference as the MapView, but I only expected to get some error message. In my MapView, I has one elevation layer of WGS84(4326) from an arcgis server + graphics layer + openstreetmap layer. In the mpk, I had WGS84(4326) layer. I reproject it to epsg:3857 to be able to visualise it.
... View more
04-26-2017
05:10 AM
|
0
|
0
|
728
|
POST
|
I got it, the data have to be projected to mercator, if not, it is not visualised. I don't know if it is an error or a prerequest for the localserver
... View more
04-21-2017
07:03 AM
|
0
|
2
|
728
|
POST
|
Just to add some details that may help finding a solution : When I look to the Image layer parameters, I find this in the "Spatial reference" field : SpatialReference = 'localServiceLayer.SpatialReference' threw an exception of type 'System.InvalidOperationException' If I use mpkx file (resulted from arcgis pro), I got : Failed to create service delme MapServer. Service failed to initialize: IObjectConstruct::Construct (MapServer) hr=0x80043000 (ErrorInfo did not include a description)
... View more
04-21-2017
06:29 AM
|
0
|
0
|
728
|
POST
|
Hello, I am trying to use the local server. The service is starting without errors, but it is not visible when added to the map. private Esri.ArcGISRuntime.LocalServices.LocalServer _localServer;
ArcGISMapImageLayer localServiceLayer;
private async void StartLocalServer()
{
// Get the singleton LocalServer object using the static "Instance" property
_localServer = Esri.ArcGISRuntime.LocalServices.LocalServer.Instance;
//_localServer.AppDataPath = @"C:\Temp\localserver";
// Handle the StatusChanged event to react when the server is started
_localServer.StatusChanged += ServerStatusChanged;
// Start the local server instance
await _localServer.StartAsync();
}
private void ServerStatusChanged(object sender, Esri.ArcGISRuntime.LocalServices.StatusChangedEventArgs e)
{
// Check if the server started successfully
if (e.Status == Esri.ArcGISRuntime.LocalServices.LocalServerStatus.Started)
{
LocalMapService localmapService = new LocalMapService(@"G:\GISData\myData.mpk");
//MessageBox.Show(localmapService.Status.ToString());
localmapService.StatusChanged += (svc, args) =>
{
//MessageBox.Show(localmapService.Status.ToString());
// If started successfully, add a layer from the service
if (args.Status == LocalServerStatus.Started)
{
// Get the service URL
var mapServiceUrl = (svc as LocalMapService).Url;
// Create a new ArcGISMapImageLayer
localServiceLayer = new ArcGISMapImageLayer(mapServiceUrl);
localServiceLayer.LoadAsync();
// Set layer opacity to semi-transparent
localServiceLayer.Opacity = 1;
// Add the layer to the map
MainMapView.Map.OperationalLayers.Add(localServiceLayer);
}
};
// Start the local map service
localmapService.StartAsync();
}
}
... View more
04-21-2017
02:27 AM
|
0
|
4
|
1327
|
POST
|
I got it from here https://community.esri.com/thread/187238-how-do-i-add-an-wmts-layer
... View more
04-06-2017
09:28 AM
|
0
|
0
|
515
|
POST
|
I have stored tiles that I need to use. I used webtiledLayer for my javascript project, OpenStreetMapLayer for my .net 10.2.7 project. What about the version 100. Is there any way to add an OpenStreetMap Layer to the map?
... View more
04-06-2017
08:48 AM
|
0
|
2
|
1386
|
POST
|
But what I found a little bit strange, that I can't identify a layer without being added to the mapView and if I put the visibility or the opacity to zero, I get no results.
... View more
04-04-2017
08:46 AM
|
0
|
0
|
725
|
POST
|
Thanks for the answer, my problem was the way I used to show the results
... View more
04-04-2017
07:59 AM
|
0
|
0
|
725
|
POST
|
I tried to do an identify var task = MainMapView.IdentifyLayerAsync(srtmValueLayer, e.GetPosition(MainMapView), 0,false ,1); I get this error in the task result of the task : Error = {"Invalid argument: Identify parameters do not specify a region in the view extent."} According to the list that shows the implemented functionalities in the version 100: Choosing the right version | ArcGIS for Developers The ImageServiceLayer is not implemented. So do I have to change to the version 10.2.7 in order to have an identify function?
... View more
03-30-2017
09:31 AM
|
0
|
4
|
1509
|
POST
|
Here is the code to produce fishnet with a 0.0001 DD step fishNetSymbol = new esri.symbol.SimpleLineSymbol().setColor(new dojo.Color("white")); var FishNetLayer = new GraphicsLayer({ "id": nameLayer.fishNet }); FishNetLayer.on("visibility-change", function (evt) { if (map.getLevel() > 17 && evt.visible) showFishNetLayer(0.0001); }); var showFishNetLayer = function (precision) { var upperLeftPoint; var lowerRightPoint require([ "esri/geometry/webMercatorUtils", "dojo/dom", "dojo/domReady!" ], function ( webMercatorUtils, dom ) { upperLeftPoint = webMercatorUtils.xyToLngLat(map.extent.xmin, map.extent.ymax); lowerRightPoint = webMercatorUtils.xyToLngLat(map.extent.xmax, map.extent.ymin); }); var mapXMin = floor(upperLeftPoint[0], precision); var mapXMax = ceiling(lowerRightPoint[0], precision); var mapYMin = floor(lowerRightPoint[1], precision); var mapYMax = ceiling(upperLeftPoint[1], precision); showFishnet(mapXMin, mapYMax, mapXMax, mapYMin, precision); } var showFishnet = function (mapXMin, mapYMax, mapXMax, mapYMin, precision) { mapXMin = parseFloat(mapXMin); mapYMax = parseFloat(mapYMax); mapXMax = parseFloat(mapXMax); mapYMin = parseFloat(mapYMin); precision = parseFloat(precision); require([ "esri/layers/GraphicsLayer", "esri/geometry/Polyline", "esri/graphic", "dojo/dom", "dojo/domReady!" ], function ( GraphicsLayer, Graphic, Polyline, domConstruct,dom ) { for (var x = mapXMin + precision / 2; x < mapXMax; x = x + precision) { var singlePathPolyline = new Polyline(); singlePathPolyline.addPath([[x, mapYMin], [x, mapYMax]]); var graphic = new esri.Graphic(singlePathPolyline, fishNetSymbol); map.getLayer(nameLayer.fishNet).add(graphic); } for (var y = mapYMin + precision/2; y < mapYMax; y = y + precision) { var singlePathPolyline = new Polyline(); singlePathPolyline.addPath([[mapXMin, y], [mapXMax, y]]); var graphic = new esri.Graphic(singlePathPolyline, fishNetSymbol); map.getLayer(nameLayer.fishNet).add(graphic); } }); }
... View more
03-15-2017
08:55 AM
|
2
|
0
|
276
|
POST
|
To resolve the problem, I have to export it as a png image then publish it
... View more
02-27-2017
06:53 AM
|
1
|
0
|
231
|
POST
|
To resolve the problem, I have to export it to a png image then publish it
... View more
02-27-2017
06:53 AM
|
0
|
0
|
239
|
POST
|
02-27-2017
06:26 AM
|
0
|
1
|
239
|
POST
|
I generate the hillshade from the elevation then I publish it and view it using ArcGISDynamicMapServiceLayer. I got transparent pixels.In ArcMap, there is no problem, its only when the layer is visualised. I tried to put white color on NoData pixels, but it doesn't work
... View more
02-27-2017
06:15 AM
|
0
|
1
|
858
|
Title | Kudos | Posted |
---|---|---|
1 | 02-27-2017 06:53 AM | |
2 | 03-15-2017 08:55 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|