Tag Info

Hot answers tagged

2

I just found this post, from your post here and wanted to share some Python code I wrote that helps select a given feature in a JavaScript app. This code is obviously very specific to the Selenium and Python bindings, but I've got good mileage from it across different browsers, OS and screen resolutions. The idea is that if you Know the real world x/y of ...


2

[I'm sure I've posted this answer somewhere before, but I can't find it] I'd really recommend against parsing the output messages. For one, it'll be tedious. And more importantly, 2, you have INFO level messages on. INFO level displays path information to resources on the Server machine. Many people would consider this a security risk (leaving this level of ...


2

This alternative Json notation will work: var myLength = returnedJSON.features[0].attributes['Shape.STLength()'];


2

I used Google to search on "ArcGIS javascript api pricing" and on the first page found The ArcGIS JavaScript API is now available to the public: The new ArcGIS JavaScript API and its accompanying online SDK are now available for public use. ... Everyone can use the ArcGIS JavaScript API. There is no fee for using the ArcGIS JavaScript API or ...


1

since the parameter you mentioned is only available via the asynchronous service documentation you've linked to, your best bet would be to make your call to it via a generic Geoprocessor Task. this approach allows you finer grain control both in defining execution type and specifying parameters by name.


1

because neither your app or the JSAPI inherently know the dimensions of custom print layouts, you'll have to do some math yourself, taking for granted that the print service is going to 'fit' the current map extent ie: if your print layout is twice as wide as tall, you could interrogate the map extent prior to printing and write custom logic to determine: ...


1

You can create a graphic using the HTML Canvas. Here's a project where I did this: https://github.com/WSDOT-GIS/arcgis-map-thumbnail-builder


1

the cryptic error is being thrown because query.outFields expects an array query.outFields = ["*"];


1

the two most common gotchas for Dynamic Layers are: the service itself doesn't support requests to alter symbology. (make sure Supports Dynamic Layers is true in the service metadata) the index position in the layer drawing options array doesn't match the index position of the layer. var sfs = new ...


1

What Mintx has said is correct but to expand and answer your specific question about the base map SRef... It's not possible to change the SRef of a tiled map service, which all of the ESRI base maps are (and I would imagine most base maps are). This is because the tiles have already been created in the specified SRef. The basemap you use sets the spatial ...


1

The problem was that the setTool() method was being called before startup(). It appears that starting with 3.13 you must call startup() before setTool(). My application was built in a way where setTool() was being called to disable the measurement tool, even if it was not active. Prior to 3.13 that worked fine, but it seems that has changed.


1

The modules in your require are not matching with the variables in the function. You need to move the modules "dijit/layout/BorderContainer", "dijit/layout/ContentPane", and "dijit/TitlePane" to after "esri/symbols/SimpleFillSymbol"


1

To clarify Rorro's answer, the layer id is not the same as the layer name. You can save yourself a lot of time using the following code (where mylayer references your map service layer): var legendLayer = new esri.tasks.LegendLayer(); legendLayer.layerId = mylayer.id; The layer id will differ depending on how you consume the service. E.g. Rorro said his ...


1

Realized this is really old, but you could try something like this for those looking at this now. // Creates the Legend from list of Feature Classes shown on map // Dynamically changes depening on scale and what features are visible map.on("layers-add-result", function(evt) { var layerInfo = arrayUtils.map(evt.layers, function(layer, index) { ...



Only top voted, non community-wiki answers of a minimum length are eligible