|
POST
|
Hi, I have some graphics (using a sketch tool, polyline) that I want to be shown in a PNG image export. I have added these graphics as overlay graphics as they are temporary only. However when I try to export the PNG - they do not show up in the exported image. Please help - but I'm guessing I have to use a proper graphics layer and have it added to the TOC - I didn't really want to do this as it is a temporary sketch and adding a graphics layers seem a bit more persisted. The code below is showing how I create the export image: public static Task<bool> ExportMapToImage(Geometry geometry, string fileName)
{
return QueuedTask.Run(() =>
{
MapView map = MapView.Active;
string tempPath = GeneralUtils.GetTempPath();
string filePath = System.IO.Path.Combine(tempPath, fileName);
if (File.Exists(filePath))
{
File.Delete(filePath);
}
//Create PNG format with appropriate settings
PNGFormat PNG = new PNGFormat();
PNG.Resolution = 150;
PNG.Height = 500;// geometry.Extent.Height;
PNG.Width = 800;// geometry.Extent.Width;
PNG.OutputFileName = filePath;
//Export active map view
if (PNG.ValidateOutputFilePath())
{
map.Export(PNG);
}
return true;
});
} This code shows how I am adding the graphics to the overlay: _graphicList.Add(mapView.AddOverlay(polyline, SymbolFactory.Instance.ConstructLineSymbol(ColorFactory.Instance.CreateRGBColor(0, 0, 0), 2, SimpleLineStyle.Solid).MakeSymbolReference()));
... View more
06-16-2021
11:51 AM
|
0
|
2
|
3144
|
|
POST
|
Wolf, seems like a good solution - although I found it doesn't seem to work that well when you want attribute fields brought back. The JSON returned explicitly creates a field the same as the out-field name when it's converted to a C# class - so your code becomes very tethered to the feature-service you are querying and the naming of it's fields - it's very unlikely your fields of interest will be called the same name especially over many different feature services - resulting in limited use for this class. Have you any ideas how you can get round this?
... View more
06-03-2021
05:31 AM
|
0
|
1
|
10726
|
|
POST
|
Ideally I want to issue rest requests via C# - and send my geometry along as the input - can that be done? If so do you have any links to docs or example code?
... View more
05-27-2021
03:18 PM
|
0
|
0
|
3568
|
|
POST
|
@RudyProsser Can this be done with a Feature Layer hosted in ArcGIS Online?
... View more
05-27-2021
10:41 AM
|
0
|
2
|
3573
|
|
POST
|
How do you query a feature service with many hundreds of points? I want a return a value from a field (let's call in "COUNTRY_NAME") that returns a country name (surprisingly!) for each point, and that's really important. I need a value for each point, 1 for 1. I have tried sending a multipoint query but it breaks (probably URL length). Even when I cut down the amount of points - if it finds values that are the same it seems to coalesce them all into one - very annoying and not useful. Here is a screenshot of what I have done for multipoint queries. Any help or pointers would be much appreciated as I am still finding my way with all this stuff.
... View more
05-27-2021
10:01 AM
|
1
|
0
|
898
|
|
POST
|
Is there anyone from ESRI who can give an official line on this - at the moment my add-in behaviour is horrible and clunky - I am having to add 10 rasters to my map before I can do my queries which is taking an inordinate amount of time and it looks clunky to the user. Plus I have to clean up and remove the layers after I have queried my rasters. It's just not an acceptable user experience.
... View more
05-05-2021
01:32 AM
|
1
|
0
|
4621
|
|
POST
|
It does work, I've tried it too - unfortunately it adds it to the map. Maybe I'll have to work with this until there is a better solution from ESRI. Thanks for your help on this though.
... View more
04-29-2021
07:08 AM
|
0
|
0
|
4654
|
|
POST
|
I think thats the same sort of solution in the link provided before - again, its dealing with FeatureLayers - but here we are dealing with rasters, specifically ImageServer. Also the example adds it to the map which I don't really want to do.
... View more
04-29-2021
06:55 AM
|
0
|
3
|
4658
|
|
POST
|
Hi, Thanks for your reply - I think the LayerParams only works with feature data, not rasters. But the second part of your reply looks good.
... View more
04-29-2021
05:00 AM
|
0
|
5
|
4662
|
|
POST
|
Hi I have a raster published in AGOL and it’s URL is like this https://tiledimageservices1.arcgis.com/IB7Kf2F8K18M2LKr/arcgis/rest/services/fooRaster/ImageServer I want to access the raster via the Pro SDK but NOT add it to the map, and the only example code I can find is below: string dataSoureUrl = @”https://tiledimageservices1.arcgis.com/IB7Kf2F8K18M2LKr/arcgis/rest/services/fooRaster/ImageServer”; ImageServiceLayer rasterLayer = null; await QueuedTask.Run(() => { // Create a layer based on the url. In this case the layer we are creating is an image service layer. rasterLayer = (ImageServiceLayer)LayerFactory.Instance.CreateLayer(new Uri(dataSoureUrl), myMap); }); The reason I don’t want to add it to the map – is because I am doing a “drill down” on about 10 rasters based on an x,y coordinate the user has selected on the map (with some background mapping of the world) – and extract the pixel value at that coordinate. It’s too much unnecessary overhead to load the rasters into Pro and do the analysis after the event. Is there a way to query a pixel value in memory based on the an x,y location??
... View more
04-28-2021
03:46 AM
|
0
|
8
|
4720
|
|
POST
|
For some reason the custom popup dialog looks like this: However, I would like to change the title from "Pop-up" to something else. Is there a way to do this in the Pro SDK?
... View more
04-14-2021
01:37 AM
|
0
|
2
|
1156
|
|
POST
|
How do you change the title of the dialog ("Pop-up") for custom popups?
... View more
04-13-2021
11:25 AM
|
0
|
1
|
881
|
|
IDEA
|
@jcarlson I still don't think that's a valid reason - there should be a way for AGOL to discern from the request the client type and if it's Pro asking for data then it should provide date that has not been downgraded. I'm sure this is technically possible.
... View more
03-31-2021
01:01 AM
|
0
|
0
|
5321
|
|
IDEA
|
Further to the comment made on tiles: Vector Tile Services should just read Basemap Services - they really offer limited functionality from what I can see.
... View more
03-30-2021
09:23 AM
|
0
|
0
|
5399
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-17-2025 03:28 AM | |
| 1 | 12-18-2023 10:11 AM | |
| 1 | 08-22-2025 02:27 AM | |
| 2 | 12-19-2023 01:36 AM | |
| 1 | 12-21-2023 04:02 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|