POST
|
Hi community, Is there an easy way to get the JSON for the map layers for the LocalLayers widget? When using the LocalLayers widget I am struggling to understand what information is required for the layers json configuration. I was hoping there might be a way to write out the JSON for this.map._layers or something along that line to a text file, and see if that provides the necessary configuration for LocalLayers to properly build my layer list with nested layers and groups. Using JavaScript 3.28 API. Thanks for your help, Garry
... View more
06-19-2019
12:54 PM
|
0
|
0
|
194
|
POST
|
Nevermind, that was a dumb question … of course you can that's what a GIS is all about.
... View more
06-18-2019
07:05 AM
|
1
|
0
|
434
|
POST
|
Hi Robert, can you use a selection geometry with a QueryTask? Thanks,
... View more
06-18-2019
07:01 AM
|
0
|
1
|
434
|
POST
|
Hi Robert. I took a look at the code and see it is using the jimu.js SelectionManager.js class, which uses a the geometry engine and a feature layer to locate features, and then as you said adds a graphics layer for the selection results. So yes, we should be able to just new a FeatureLayer on the fly with the url, and run the select which should add a graphics layer on top of the map image and still give us access to individual features if needed. I'm pretty green to this, so I apologize if I'm rambling nonsense. I appreciate your assistance greatly.
... View more
06-18-2019
06:43 AM
|
0
|
3
|
3137
|
POST
|
Thank you Robert, I appreciate your patience and expertise. It sounds like we may have to load an initial map, and then add explicit FeatureLayers to the loaded map, so we can interact with them performing feature selection and highlighting, etc.
... View more
06-18-2019
06:11 AM
|
0
|
5
|
3137
|
POST
|
Hi Robert, again thank you so much for your fast reply. We are serving a web map through portal, and so the web app builder is using the portal url and web map id to load the map into the web application (map viewer). I can access individual feature layers on the map using the url and adding the id number of the layer ... https://gisserver.domain.com/secure/rest/services/MyCustomMap/MapServer/0 I know this because I previously used the LocalLayers widget to explicitly load individual FeatureLayers from the map service using the above url syntax... and my map loaded fine and we were able to interact with the feature layers. However, I don't want to have to predefine my layers in configuration. I simply want the map in portal to open in my web application. And then be able to find a layer in that loaded map using the layer name. Was hoping for something simple like this.map.getLayer("LayerNameHere") but it seems this gets only the first level layers. Anything nested requires a recursive loop like I do in my code. Or at least that's what I think is required. Thanks again, I'm pretty green with this ..
... View more
06-17-2019
01:16 PM
|
0
|
7
|
3137
|
POST
|
Hi Robert, I appreciate your input, however that doesn't answer why I am not getting the feature layer that has already been added to the map. The break statement causes the code to exit the loop and the return at the end does return the "new" feature layer, but not the one that's currently in the map. The return statement is the last thing to happen in my code, as it is best practice in programming to have only one exit point from a function. Any other thoughts on how to get a layer that is in the map using layer name or layerInfo for that matter? Thanks so much. Garry
... View more
06-17-2019
12:54 PM
|
0
|
9
|
3137
|
POST
|
Hi, I'm working with the javascript 3.2 api, and have a map that loads from a pre-defined web map. I'm now wanting to get a handle to a layer in the map using the layer name. I've managed to write some javacript code that locates the layerInfo for the said layer, but I have no idea how to get the actual layer from the map. _getFeatureLayer: function(layerName) {
var layer;
for (var j = 0, jl = this.map.layerIds.length; j < jl; j++)
{
var currentLayerName = this.map.layerIds ;
var currentLayer = this.map.getLayer(currentLayerName);
if (currentLayer.layerInfos.length > 0)
{
layer = this._findSubLayerByName(currentLayer, layerName);
if (layer != null)
{
break;
}
}
}
return layer;
},
_findSubLayerByName: function (parentLayer, subLayerName)
{
var layer;
for (var j = 0, jl = parentLayer.layerInfos.length; j < jl; j++)
{
var layerInfo = parentLayer.layerInfos ;
if (layerInfo.name == subLayerName)
{
/* The correct layer is located, but how do I actually get the layer, this does not work. */
var subLayerUrl = parentLayer.url + "/" + j;
layer = new FeatureLayer(subLayerUrl); /* This doesn't give me the layer that is already added to the map */
break;
}
}
return layer;
}
... View more
06-17-2019
12:30 PM
|
0
|
11
|
4176
|
POST
|
I submitted the question to Esri Canada Technical Support, and here's their response. Thank you Chris! Hi Garry, Thank you for contacting Esri Canada Technical Support. The incident number XXXXXX has been assigned to your support request. My name is Chris and I will be assisting you with this matter. Basically, the licensing works as you mentioned...as long as the tool does not require an extension, the Engine Runtime license will cover it. The important thing to remember, however, is to set the appropriate license level of the application to match the license level of the tools being used in the application. The Engine Runtime is functionally equivalent to Desktop, thus the best way to see which license level is required is to look up the tool in the Desktop help. For example, the Desktop help link for the FeaturetoPolygon tool is here: http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000003n000000 At the bottom of each geoprocessing tool is the license level required. As you will see from the above link, this tool requires Advanced level licensing, thus you must check off Advanced in the License Control. Please see the following help links for more information: License Control http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000002z3000000 License Options (This is for Java, but its the same for .NET, this link just explains it better) http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/index.html#//000100000576000000 Please let me know if you have any questions. Chris
... View more
07-25-2013
08:58 AM
|
0
|
0
|
156
|
POST
|
Hi, We have a map viewer built using the ArcEngine map controls, and now I'd like to start using some of the Geoprocessing tools to generate layers for display in the map viewer. I'm wondering if I can use the ESRI.ArcGIS.DataManagementTools library (eg. FeatureToPolygon tool) from a stand-alone .net application built on ArcEngine and deployed to a target machine that only has an ArcEngine Run-time license? To make matters worse, the help topics on this site are showing "Document not found" for several of the links under the "Geoprocessor library and tool reference". Can all of these tools under the "Geoprocessing library and tool reference" be used with an ArcEngine Run-time license? (Excepting the obvious ones that require additional extensions like Spatial Analyst). After navigating much of the online documentation I've come to the conclusion that using the above library within ArcGIS requires the Advanced license level (ArcInfo). But I'm hoping the full functionality is opened with the ArcEngine Run-time licensing. Thank you so much for your assistance, and sorry if this was confusing.
... View more
07-23-2013
11:57 AM
|
0
|
1
|
606
|
Title | Kudos | Posted |
---|---|---|
1 | 06-18-2019 07:05 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|