|
POST
|
I am using Execute Task (Export Web Map Task) to export an image. js is 4.12. If format is PNG32, the file size is 378k which is rather large for a 400x400 image at 96 dpi. The file size should be closer to 140k. I tried switching to JPG which took the size down to 317k. If I include compressionQuality to operationalLayers there is no change in size. How do I get the image size smaller? This is a sample request {"mapOptions":{"showAttribution":false,"extent":{"xmin":479389.87880438194,"ymin":1159369.4997793399,"xmax":479840.91235113516,"ymax":1159594.2281684615,"spatialReference":{"wkid":102659}},"spatialReference":{"wkid":102659},"rotation":0},"operationalLayers":[{"opacity":1,"minScale":0,"maxScale":0,"format":"jpg","compressionQuality":50,"url":"https://www.mymanatee.org/arcgis01/rest/services/basemap/aerials/MapServer"},{"opacity":1,"minScale":0,"maxScale":0,"url":"https://gis.manateepao.com/arcgis/rest/services/Website/WebLayers/MapServer"},{"opacity":1,"minScale":0,"maxScale":0,"url":"https://gis.manateepao.com/arcgis/rest/services/Website/WebLayers/MapServer","layers":[{"id":1,"layerDefinition":{"drawingInfo":{"renderer":{"type":"simple","symbol":{"type":"esriSFS","style":"esriSFSNull","outline":{"type":"esriSLS","style":"esriSLSSolid","color":[66,244,206],"width":3}}}},"source":{"type":"mapLayer","mapLayerId":1},"definitionExpression":"PARID='1014100000'"}}]}],"exportOptions":{"outputSize":[400,400],"dpi":96}}
... View more
02-13-2020
09:09 AM
|
0
|
7
|
1720
|
|
POST
|
How would I get a json result of just the mapName field of a layer using a request? let url = `https://secure.sjrwmd.com/arcgis01/rest/services/SRWMD/CUP_SRWMD_forArcMap/MapServer?f=pjson`; request(url) I only want the mapName field. { "currentVersion": 10.61, "serviceDescription": "Published for SRWMD staff who require view/select on the complete feature class, without requiring Oracle client/DB direct connection.", "mapName": "Layers", "description": "", "copyrightText": "REST Feature Service published by St Johns River Water Management District (SJRWMD), other agencies where applicable.", "supportsDynamicLayers": false, "layers": [ { etc.
... View more
01-16-2020
10:29 AM
|
0
|
0
|
640
|
|
POST
|
I see. Thanks for your response. I was hoping to use the out field as a callback to my request within a parallel process to manage query results. I was able to handle this in my js using an await\async.
... View more
01-16-2020
08:20 AM
|
0
|
0
|
1458
|
|
POST
|
I need an additional field returned using map server query form, but specifying both an out field and the Return Extents Only option to true results in just the extent returned.
... View more
01-16-2020
07:33 AM
|
0
|
2
|
1535
|
|
POST
|
Can I set the Output_File file name when doing an export? var params = { httpMethod: 'POST', Web_Map_as_JSON: Web_Map_as_JSON, Format: 'PNG32', Layout_Template: 'MAP_ONLY', f: 'json' }; Scheme Parameter: Output_File Data Type: GPDataFile Display Name Output_File Description: The output file name. The extension of the file depends on the Format parameter. Direction: esriGPParameterDirectionOutput Default Value: Parameter Type: esriGPParameterTypeRequired Category:
... View more
01-13-2020
02:23 PM
|
0
|
0
|
404
|
|
POST
|
I have a custom popup for when a map is not available in ArcGIS. Each time the map is loaded in this situation, the popup opens. The popup is closed on popup.watch("visible", function (newVal). As part of the customization, I am removing the popup pointer class since there is nothing to point at. I handle this by adding a class "map-not-found-popup" and look for it in the watched event. The trouble I am having is that each time the popup opens, a new user storage is added. How do I stop or clear it? popup.watch("visible", function (newVal) { var nomap = $('.map-not-found-popup'); if(newVal) { // open // remove popup pointer if map not found if(nomap && nomap.length>0) { $('.esri-popup__pointer').addClass('d-none'); } // other handling closeExpandedWidgets(); } else { // closed // remove popup from dom when closed if(nomap && nomap.length>0) { popup.clear(); } // reset popup properties setPopupDefaultProperties(); } }); // end popup.watch
... View more
12-06-2019
02:58 PM
|
0
|
0
|
812
|
|
POST
|
Thanks. Setting the initial long\lat to specific location when a featureset is not found is working out for me. var view = new MapView({ map: map, center: [-82.414233, 27.491344]
... View more
12-06-2019
10:42 AM
|
0
|
0
|
753
|
|
POST
|
How do I get a default or initial extent from my ArcGIS without hard-coding it? For example, whenever a FeatureSet is not populated after executing a QueryTask, the mapview goes to the middle of the ocean instead of somewhere in my map area. If I can get the extent then I could zoom to it. if (featureSet.features && !featureSet.features.length > 0) { view.goTo({ target: view.extent }, ZoomOptions); } The returned extent from the zero results query doesn't have a valid extent, obviously. type:"extent" width:0 xmax:0 xmin:0 ymax:9688.393335133032 ymin:-9688.393335133032 zmax:undefined zmin:undefined I want the exent from here https://gis.manateepao.com/arcgis/rest/services/Website/WebLayers/MapServer/256
... View more
12-06-2019
09:41 AM
|
0
|
2
|
812
|
|
POST
|
I am using AreaMeasurement2D. After a measurement is made the panel stays open. I want to allow the map to be printed with the print widget so the measurement shows up in the printout. The problem is that when the print widget is enabled, the measure panel is behind it. It just looks bad. How can I close the measure panel without losing measurement on view? I can make the measure button not active but cannot get the panel to close. var printExpandWatch = watchUtils.watch(printExpand, "expanded", function (newValue, oldValue) { if (newValue) { if (activeWidget) { document.getElementById("areaButton").classList.remove("active"); } } });
... View more
11-12-2019
03:10 PM
|
0
|
1
|
726
|
|
POST
|
I am constructing a json esriRequest and posting it to Printing Tools Task. The "layers" are in the request. Post: https://gis.foobar.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute? Raw request: {"mapOptions":{"showAttribution":false,"extent":{"xmin":479389.87880438194,"ymin":1159369.4997793399,"xmax":479840.91235113516,"ymax":1159594.2281684615,"spatialReference":{"wkid":102659}},"spatialReference":{"wkid":102659},"rotation":0},"operationalLayers":[{"id":"World_Street_Map_417","title":"World_Street_Map_417","opacity":1,"minScale":0,"maxScale":0,"url":"https://www.foobar.org/arcgis01/rest/services/basemap/aerials/MapServer"},{"id":"WebLayers_2139","title":"WebLayers_2139","opacity":1,"minScale":0,"maxScale":0,"url":"https://gis.foobar.com/arcgis/rest/services/Website/WebLayers/MapServer","layers":[{"id":1,"layerDefinition":{"drawingInfo":{"renderer":{"type":"simple","symbol":{"type":"esriSFS","style":"esriSFSNull","outline":{"type":"esriSLS","style":"esriSLSSolid","color":[66,244,206],"width":3}}}},"source":{"type":"mapLayer","mapLayerId":1},"definitionExpression":"FOOBAR='1014100000'"}}]}],"exportOptions":{"outputSize":[400,400],"dpi":96}} Encoded request: https://gis.foobar.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute?Web_Map_as_JSON=%7B%22mapOptions%22%3A%7B%22showAttribution%22%3Afalse%2C%22extent%22%3A%7B%22xmin%22%3A479389.87880438194%2C%22ymin%22%3A1159369.4997793399%2C%22xmax%22%3A479840.91235113516%2C%22ymax%22%3A1159594.2281684615%2C%22spatialReference%22%3A%7B%22wkid%22%3A102659%7D%7D%2C%22spatialReference%22%3A%7B%22wkid%22%3A102659%7D%2C%22rotation%22%3A0%7D%2C%22operationalLayers%22%3A%5B%7B%22id%22%3A%22World_Street_Map_417%22%2C%22title%22%3A%22World_Street_Map_417%22%2C%22opacity%22%3A1%2C%22minScale%22%3A0%2C%22maxScale%22%3A0%2C%22url%22%3A%22https%3A%2F%2Fwww.foobar.org%2Farcgis01%2Frest%2Fservices%2Fbasemap%2Faerials%2FMapServer%22%7D%2C%7B%22id%22%3A%22WebLayers_2139%22%2C%22title%22%3A%22WebLayers_2139%22%2C%22opacity%22%3A1%2C%22minScale%22%3A0%2C%22maxScale%22%3A0%2C%22url%22%3A%22https%3A%2F%2Fgis.foobar.com%2Farcgis%2Frest%2Fservices%2FWebsite%2FWebLayers%2FMapServer%22%2C%22layers%22%3A%5B%7B%22id%22%3A1%2C%22layerDefinition%22%3A%7B%22drawingInfo%22%3A%7B%22renderer%22%3A%7B%22type%22%3A%22simple%22%2C%22symbol%22%3A%7B%22type%22%3A%22esriSFS%22%2C%22style%22%3A%22esriSFSNull%22%2C%22outline%22%3A%7B%22type%22%3A%22esriSLS%22%2C%22style%22%3A%22esriSLSSolid%22%2C%22color%22%3A%5B66%2C244%2C206%5D%2C%22width%22%3A3%7D%7D%7D%7D%2C%22source%22%3A%7B%22type%22%3A%22mapLayer%22%2C%22mapLayerId%22%3A1%7D%2C%22definitionExpression%22%3A%22FOOBAR%3D%271014100000%27%22%7D%7D%5D%7D%5D%2C%22exportOptions%22%3A%7B%22outputSize%22%3A%5B400%2C400%5D%2C%22dpi%22%3A96%7D%7D&Format=png32&Layout_Template=map_only&env%3AoutSR=&env%3AprocessSR=&returnZ=false&returnM=false&returnTrueCurves=false&returnFeatureCollection=false&context=&f=pjson
... View more
11-12-2019
02:57 PM
|
0
|
2
|
1505
|
|
POST
|
How do I return multiple layers including a map layer that is a definitionExpression when doing an esriRequest? If I request a single map layer that is a definitionExpression, the map layer is returned. { "id": 1, "layerDefinition": { "drawingInfo": drawingInfo, "source": { "type": "mapLayer", "mapLayerId": 1 }, "definitionExpression": "PARID='"+parid+"'" } } If I request two map layers, one with a definitionExpression, no map layers are returned. "layers": [ { "id": 256, "layerDefinition": { "source": { "type": "mapLayer", "mapLayerId": 256 } } }, { "id": 1, "layerDefinition": { "drawingInfo": drawingInfo, "source": { "type": "mapLayer", "mapLayerId": 1 }, "definitionExpression": "PARID='"+parid+"'" } } If I request a single map layer that is not a definitionExpression, the map layer is returned. Example of map a single map layer shown in black text and white background
... View more
11-07-2019
01:58 PM
|
0
|
4
|
1580
|
|
POST
|
I have this expand widget. I want to hide it OR disable it when fullscreen is active. How?? var screenshotExpand = new Expand({ content: dvExpandContent, view: view, expandIconClass: "esri-icon-sketch-rectangle", expandTooltip: 'Screenshot', autoCollapse: true, expanded: false, group: "top-right" }); // end screenshotExpand
... View more
10-28-2019
11:59 AM
|
0
|
0
|
513
|
|
POST
|
Is it possible to query features using ServiceFeatureTable without a map? Is there a Query Task that doesn't require using a map or any sort of user interactin? I tried the C# code that is part of the WPF sample. The sample works as is, but I don't want the map. I get an error "Cannot call this method in this context: Object failed to load, unable to execute task" // basically private async void QueryStateFeature() { ServiceFeatureTable _featureTable = new ServiceFeatureTable(new Uri(_gisUrl)); QueryParameters queryParams = new QueryParameters(); queryParams.WhereClause = "somefield='1234'"; // await _featureTable.LoadAsync(); // doesn't work // here's where the error occurrs FeatureQueryResult queryResult = await _featureTable.QueryFeaturesAsync(queryParams); ...
... View more
10-15-2019
03:19 PM
|
0
|
1
|
684
|
|
POST
|
I am including an exported png map image in a PDF report using the Javascript API printing tools export task. First I use Query to get my map, then I generat a Web_Map_as_JSON request, and then extract the PNG from the json result. The json result returns with a url to the generated image in about 3 seconds, which is too slow for use in an online dynamic PDF report. What I would like to do is export all of my png map images to disk ahead of time so that my dynamic PDF report doesn't have to wait for the export task request to complete. The initial job to save the images would run only one time. My solution was to use a .net HttpWebRequest app that will post the Web_Map_as_JSON request one at a time, and then save the png to disk, but at 3 seconds and over 200k of images to save, the job would take a week. I need a solution to request map images in batches, let's say 100 at a time. Is there a tool in ArcGIS desktop to do this? What technology (.Net, python, etc.) would you use?
... View more
10-15-2019
08:47 AM
|
0
|
0
|
653
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-30-2024 01:32 PM | |
| 1 | 03-18-2024 08:18 AM | |
| 1 | 01-08-2024 07:24 AM | |
| 3 | 12-30-2022 11:36 AM | |
| 1 | 03-13-2023 07:40 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2025
08:09 AM
|