Tag Info

New answers tagged

1

The problem was that I was calculating the angle for the marker symbol variable, rather than each instance of the symbol added to the graphics array. I changed the loop where the graphics are added, so that each new addition created a new instance of the marker symbol with its own angle calculated. Now the orientation of the symbol stays consistent.


1

You only have one table in the configuration with two of each property (title, queryOptions, etc). The effective result is that only the second property with the same name is evaluated and used. To fix this, you need to add a closing curly brace } to end the configuration object for the first table followed by a comma. Then an opening curly brace { is ...


0

i see a couple issues with your query: the geometry parameter does not expect Point coordinate values to be passed inside an array. (see doc for more info). CONTAINS in this context would mean parcels that are contained by your input query point. the more appropriate spatial operator would be INTERSECTS you can find a working example here.


0

Try this attached Code. it should work.


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.


0

The graphics are not necessarily available when load triggers. To be sure the graphics array is populated you need to listen to the layer update-end event. So something like: on(layer, 'update-end', function(){ var graphicstmp = layer.graphics; });


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: ...


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 ...


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


0

Why not use graphicUtils.graphicsExtent Simply pass in the array of graphics and you will get the extent.


0

So I finally found the solution to this problem. You have to override the spatialReferences array of the WMSLayer object right before adding it to the map. wmsLayer.spatialReferences[0] = 3857; map.addLayers([wmsLayer]); This worked with a layer using EPSG:3857 and another layer using ESPG:4326.


0

So I finally found the solution to this problem. You have to override the spatialReferences array of the WMSLayer object right before adding it to the map. wmsLayer.spatialReferences[0] = 3857; map.addLayers([wmsLayer]); This worked with a layer using EPSG:3857 and another layer using ESPG:4326.


1

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


-1

Haven't tested this, but you can use the Copy Features tool to make a feature class from a feature layer.


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

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 ...


0

my best bet is that adding other layers from the same ArcGIS Server instance is triggering a CORS check by the JSAPI and that since both the server and your browser support CORS, the proxy isn't necessary. https://developers.arcgis.com/javascript/jshelp/ags_proxy.html


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 ...


0

It looks like the EPSG code on your geoserver is incorrect. 102100 is not an EPSG code; that's an ESRI code. 3857 is the EPSG equivalent. You'll need to somehow define the SRID on your geoserver as 102100:ESRI or 3857:EPSG. edit: It looks like you just need to assign the right WKID (4326) to your WMS layer: var resourceInfo = { extent: new ...


0

you have to add the layer to the map before you call applyEdits() and you have to wait for the onLoad event before all properties will be appropriately hydrated. var fl = new FeatureLayer(..); map.addLayer(fl); fl.on("load", function(evt){ //inspect evt.layer properties and/or call fl.applyEdits() }); this is because adding the layer to the map triggers ...


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) { ...


0

Here are the layer types that CMV currently supports. From there you can see that the layer type mapimage is still untested so it may not work at all. If you do get it to work or if a change to CMV is required, please submit an issue or preferably a Pull Request at the GitHub repo. The layer type tiled is not valid for a web tiled layer. That type is used ...


0

have you tried to change the css rule for the titlePane-Class yet? for example: .esriPopup .titlePane { color: #ffffff; cursor: default; line-height: 20px; background: green !important; }


2

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


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.



Top 50 recent answers are included