POST
|
I'm looking at the docs for FormTemplates and FeatureColumns for editing feature classes (with either Feature Forms or Feature Tables), and I'm not sure if what I need to do is possible. Feature Template Feature Column I have about 26 different feature classes that need to be edited with either FeatureForm or FeatureTable, and they only have a few fields in common. Is there some syntax that would allow me to just enable all fields for editing in a template, except for a few specifically named fields (like Custom_ID?) that they all have in common? I've tried experimenting with "*" and "%" in the sandbox but so far no results. I would rather not make 26 different editor form templates covering every field in each feature - is it possible to do this with just one template or feature column configuration?
... View more
01-04-2021
01:03 PM
|
1
|
0
|
410
|
POST
|
So, the default "hybrid" basemap (the one with the "hybrid" well-known ID) only has place labels and no street labels. My clients always want to see street labels, too, but that isn't one of the well-known basemap options. For this project we were using a custom map box basemap, but they just sent me this screenshot that shows "tears" in the mapbox imagery which look like the city is on fire. So I'm back to trying an Esri version - but I'm struggling to make it work. I found this: https://www.arcgis.com/home/item.html?id=28f49811a6974659988fd279de5ce39f However, when I add it along with the other basemaps to the basemap gallery, the thumbnail aspect ratio doesn't match the others that I am pulling in with "fromId("topo"), etc. It also has this bizarre popup when they click on the map, which I don't want to show up at all. My code: //this version has the weird thumbnail and popup
var labeledStreetsBasemap = new Basemap({
portalItem: {
id: "28f49811a6974659988fd279de5ce39f"
},
thumbnailUrl: "/images/imageryhybridthumb.png" //this doesn't seem to do anything
});
//custom basemap attempt: this doesn't work either (in actual code it's commented out now)
//the basemap appears blank/white - templateUrl problem?
var labeledStreetsBasemap = new Basemap({
baseLayers: [
new WebTileLayer({
urlTemplate: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/{level}/{col}/{row}.png",
subDomains: ['a', 'b', 'c', 'd'],
copyright: "Source: Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community."
})
],
referenceLayers: [
//hybrid refrence layer: https://www.arcgis.com/home/item.html?id=30d6b8271e1849cd9c3042060001f425
new WebTileLayer({
urlTemplate: "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/{level}/{col}/{row}.png",
subDomains: ['a', 'b', 'c', 'd']
})
],
title: "Imagery Reference Hybrid",
thumbnailUrl: "/images/imageryhybridthumb.png"
});
//... other code
// base map gallery
var basemapGallery = new BasemapGallery({
view: view,
container: document.createElement("div"),
source: [
mapboxImagery,
labeledStreetsBasemap,
Basemap.fromId("streets-navigation-vector"),
Basemap.fromId("topo"),
Basemap.fromId("hybrid")
]
});
How do I get a basemap with street labels?
... View more
06-05-2019
11:43 AM
|
0
|
1
|
1859
|
POST
|
Thanks, that did the trick. It must have been defaulting to "top," although somehow I was expecting that to return only the topmost feature instead of all the overlapping features in that sublayer. Looks like the "visible" option still isn't fixed though (I think in the past I had to get the visible layers and put that into the layerIds array).
... View more
05-31-2019
12:57 PM
|
0
|
0
|
1135
|
POST
|
I am trying to use identify task with layerOption "all" ("visible" would be better but IIRC that has never worked and I don't have time to deal with that right now) to return items from all the layers in a map service when the user clicks the map. If multiple points from one layer are overlapping, it returns those, but if there are overlapping items from multiple layers in the MapImageService it only returns a response with items from that one layer. I think dynamic layers are enabled in the map service, but I am not using that functionality in my script. var fieldDataImageLayer = new MapImageLayer({
url: "https://myRESTurl/MapServer/",
title: "Field Data"
}); function executeIdentifyTask(event) {
//set up identify task for different layer types.
tasks = [];
fieldDataIdentifyTask = new IdentifyTask({
url: fieldDataImageLayer.url,
layerOption: "all",
//layerIds: [0,1,2,3,4,5,6,7,8,9,] - this didn't help
});
tasks.push(fieldDataIdentifyTask);
//common parameters
params = new IdentifyParameters();
params.tolerance = 12;
params.returnGeometry = true;
params.width = view.width;
params.height = view.height;
//allow picking top layer only (default behavior)
params.geometry = event.mapPoint;
params.mapExtent = view.extent;
//process and resolve multiple promises at once
var promises = [];
for (i = 0; i < tasks.length; i++) {
promises.push(tasks[i].execute(params));
}
var responses = new all(promises);
return responses;
} the promises thing initially made more sense when I was targeting multiple map image services Do I just need to convert everything to 10 different feature layers and just use HitTest() at this point? Would that mess up the layerlist groupings and map render speed? There are thousands of points. ETA: It looks like when I specify the "layerIds: [5]" or whatever single sublayer, and click on an item from another sublayer, it still returns results even thought that layerId isn't in the array.
... View more
05-31-2019
10:56 AM
|
0
|
2
|
1408
|
POST
|
Think I figured out the issue, there were multiple problems: 1) As you mentioned, I did need to use POST because the JSON was too large; 2) While I was debugging, I enabled dynamic map services hoping that would fix it, and then kept them on - that was a mistake. It worked once I turned them off again. See this thread for reference: PrintTask. Bug with layer definitions and/or standardized queries? We are still using ArcServer 10.3, however, so you'd think #2 wouldn't be a problem since everyone thinks it started with 10.5 in the other thread.
... View more
09-28-2018
05:10 PM
|
0
|
0
|
1307
|
POST
|
Update: it seems the definition queries are valid and do show data at the center of the extent, at least when I try using the same definition queries in the mxd for the map service. When I use the print service without the definition query but the same extent, it shows the data (along with everything else). I'm not sure what's going on, or why the POST method wouldn't be showing anything but the basemap.
... View more
09-26-2018
01:25 PM
|
0
|
1
|
1307
|
POST
|
We are trying to get a map image to include in a report - without displaying the map on the website. The user just wants to click a single button to get the report. I think I will have to use the JS API somewhat, to get the extent of the data and create the definition query, but I won't have an actual map I can pass to the print service. We are probably going to just use the print task and pass the resulting image url to the report. I tried deleting other parts of the json and also using POST, and both of those sort of seem to be working (or at any rate, I'm not getting a 404), except I don't see any of the data now. I'm going to try messing around with the definition query some more and see if that helps.
... View more
09-25-2018
01:11 PM
|
0
|
0
|
1307
|
POST
|
I'm building a custom WebMapAsJson to pass to a print service, and for whatever reason, when I add the "layerDefinition" part, I am getting a 404. If I remove the layerDefinition objects, it seems to return the printed image just fine. "operationalLayers": [ { ... }, { "id": "MapService", "title": "Field Report", "opacity": 1, "minScale": 0, "maxScale": 0, "layers": [ { "name": "FieldReport", //does this need to be the layer name? "id": 0, "layerDefinition": { "definitionExpression": "ReportID='[GUID]'" } }, { "name": "PhotoInfo", "id": 1, "layerDefinition": { "definitionExpression": "FeatureID ='[GUID]'" } } ], "url": "xxxx" //(public service) } ] Do I need to enable something like dynamic map services, or have a certain version of arcgis server for this to work? Trying to follow the instructions here: ExportWebMap specification—ArcGIS REST API: Services Directory | ArcGIS for Developers
... View more
09-24-2018
05:12 PM
|
0
|
6
|
1686
|
POST
|
Is there no better solution now, in 2018, perhaps using DynamicLayerInfos? I'm trying this with no luck(attempting to remove layer 0 from the sublayers in the LayerList): dynamicLayerInfos = [ new DynamicLayerInfo({ id: -1, subLayerIds: [1,2,3,4,5]}), new DynamicLayerInfo({ id: 1 }), new DynamicLayerInfo({ id: 2 }), new DynamicLayerInfo({ id: 3 }), new DynamicLayerInfo({ id: 4 }), new DynamicLayerInfo({ id: 5 }) ]; dynamicMapServiceLayer.setDynamicLayerInfos(dynamicLayerInfos); Having to resort to DOM manipulation is really kind of awful.
... View more
08-02-2018
11:12 AM
|
0
|
1
|
256
|
POST
|
var fineRenderer = new UniqueValueRenderer(defaultSymbol, "Overstory", "Understory");
fineRenderer.fieldDelimiter = ":";
... View more
07-31-2018
06:54 PM
|
0
|
0
|
654
|
POST
|
What you are looking for is "<Null>" "value" : '<Null>, Prospect' It took us a ridiculous amount of time to get this. So much pain and frustration for a couple of carats!
... View more
07-31-2018
06:41 PM
|
0
|
1
|
249
|
POST
|
I basically copied one of ESRI's samples with the intention of modifying it. However, it doesn't seem to recognize the "on" in the "require" statement. I'm not sure what I'm doing wrong here. Console error: TypeError: Cannot read property 'on' of undefined at l (init.js:122) at symbology-picker.js:48 symbology-picker.js: require([ "dojo/parser", "dojo/ready", "dojo/dom", "dojo/dom-construct", "dojo/_base/array", "dojo/_base/json", "dijit/registry", "dojo/on", "dojo/_base/connect", "esri/dijit/editing/TemplatePicker", "esri/arcgis/Portal", "esri/domUtils", "esri/config", "esri/request", "esri/symbols/jsonUtils", "esri/symbols/Symbol", "esri/lang", "dojo/store/Memory", "dijit/form/ComboBox", "dijit/layout/BorderContainer", "dijit/layout/ContentPane" ], function ( parser, ready, dom, domConstruct, array, dojoJson, registry, on, connect, TemplatePicker, arcgisPortal, domUtils, config, esriRequest, jsonUtils, Symbol, esriLang, Memory ) { var templatePicker, store; ready(function () { parser.parse(); var portalUrl = document.location.protocol + "//www.arcgis.com"; on(registry.byId("symbolList"), "change", updateSymbolDisplay); //<-- erroring here ...(more code) }); in my scripts section: <script src="https://js.arcgis.com/3.22/"></script> <script src="~/Scripts/symbology-picker.js"></script> Sample: ArcGIS API for JavaScript Sandbox The only idea I have right now is maybe some sort of conflict with jQuery, but we are using it successfully in other parts of our project which include a map page. If I were to call "on" using its class, how would I do that? "dojo.on()" doesn't seem to work.
... View more
12-11-2017
05:23 PM
|
0
|
1
|
2845
|
POST
|
Oops, just realized it was a typo. It was supposed to be "defaultSymbol," not "defaultsymbol." I'll leave the question up as an example of how to do this, though, in case it's helpful to anyone else.
... View more
05-18-2017
10:19 AM
|
1
|
0
|
1206
|
POST
|
I need to create a unique value renderer that shows null values as one symbol, and all other values as another (I don't want to list out each possible value when all that matters is that it isn't null). Here's what I've tried: //set up unique value render for feature layer //two kinds of symbols: segment comments and regular location comments //--symbols var commentSymbol = new SimpleMarkerSymbol({ style: "round", color: "blue", size: "12px" }); var segmentCommentSymbol = new SimpleMarkerSymbol({ style: "round", color: "cyan", size: "12px" }); //--renderer var renderer = new UniqueValueRenderer({ field: "SegmentId", defaultsymbol: segmentCommentSymbol }); renderer.addUniqueValueInfo({ value: null, symbol: commentSymbol }); In the debugger it appears that the non-null segment graphics are being added properly to my graphics array for the feature layer. However, only the blue null values (for commentSymbol) are being displayed - the non-null value points are all missing from the map. What am I doing wrong?
... View more
05-18-2017
10:12 AM
|
1
|
1
|
2271
|
POST
|
I believe it was just upgraded to 10.3.1, perhaps I should have specified that - where would I find it? Looks like I'm wrong, it's still 10.3 only. Thanks for letting me know.
... View more
04-26-2017
02:04 PM
|
0
|
0
|
534
|
Title | Kudos | Posted |
---|---|---|
1 | 01-04-2021 01:03 PM | |
1 | 05-18-2017 10:19 AM | |
1 | 05-18-2017 10:12 AM |
Online Status |
Offline
|
Date Last Visited |
01-04-2021
09:22 PM
|