Tag Info

New answers tagged

1

This API link from EPA shows the Watersheds http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/WBD_NP21_Simplified/MapServer?f=jsapi - raw ...


0

Your query is working fine. The error stack trace you've submitted is pointing to the part of your showResults function where the map's graphics layer is told to clear. The this is usually thrown because the map's graphics layer hasn't loaded, which is probably because the map hasn't finished loading yet. Where you have: query.where = "OBJECTID = 1"; ...


1

It looks like you found the service to use ... http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/WBD_NP21_Simplified/MapServer/ Just plug that in to one of the many samples available and start from there. Go Here and click "Browse Samples" https://developers.arcgis.com/javascript/ Find one that does something similar to what you want to do (or ...


0

I don't work with APIs am not exactly sure what you are looking for, but watershed boundary data is available and downloadable as polygon shapefiles from multiple websites. For example, ftp://ftp.ftw.nrcs.usda.gov/wbd/ allows one to download maps at different watershed (HUC) scales. When you say "watershed boundary" you also need to specify at what ...


0

IdentityManager.findServerInfo expects a string, which needs to include a protocol, domain and subdomain. You don't need to include the path to a specific resource. Here's an example using the Identity Manager sample, run this in the console: esri.id.findServerInfo("https://servicesbeta.esri.com"); Path doesn't matter, so this: ...


1

What you can do, is to check the expected Visibility at a particular zoomlevel, and change the layer's VisibleLayers appropriately. The map's zoom-end even is one place where you could check it. Assume that I have a DynamicMapService with 5 Layers in it. I'll define the layervisiblity with something like this: var layerVisibilityInfo=[ {id:0, ...


1

in general, you only get access to the symbology/opacity defined in the service itself. that being said, dynamic layers capability added at 10.1 provides an opportunity to define an entirely new renderer on the clientside for ArcGISDynamicMapServices... Here's a link to the ArcGIS Server help for configuring map services with dynamic layer support: ...


3

Regarding your question as to whether you can edit a feature layer using the REST API, the answer is yes. See the Apply Edits section of the REST API for documentation on how do this this. However, if it's only the status of the alarms which is changing every 15 minutes, you could make the change purely within the web map (without needing to change the ...


1

You don't have to specify a built-in basemap. Add your custom basemap as a layer like so. var map; require(["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "dojo/domReady!"], function (Map, ArcGISTiledMapServiceLayer ) { map = new Map("map", { center: [-76.756, 40.241], zoom: 8 }); var ...


0

Try resizing the border container as well as the map. (For me, I added a small delay to make the map redraw properly.) //Resizes the border container dijit.byId("border-container").resize(); //Resizes the map after 500 ms setTimeout(function () { map.resize(); }, 500);


3

Pass in slider: false as an option when creating the map. Here is the Map Options API Reference. map = new Map("map", { basemap: "streets", slider: false }


0

yes. the extent of a map is accessible via map.extent. the zoom level is accessible via map.getLevel()


3

the full extent of a particular layer can be retrieved by the aptly named 'fullExtent' property. The value it returns can be passed to map.setExtent() in order to accomplish this dynamically if its not sufficient to pass static values to zoom out and view the entire world. See the API reference for more information ...


1

I believe you need to use method's showZoomSlider() / hideZoomSlider() property isZoomSlider. This should show or hide the zoom slider on the map. Help link here. Examples of disabling here.


2

I did it with: on(map, "load", function () { map.hideZoomSlider(); });


0

First thing you need is to set returnGeometry to true, because you need it for the zoom. Then you must, as sugested in the upper comments catch the onChange event in your populatetd Combobox. on(registry.byId("mySelect"),"change",zoomToState); Now the Event is bind to the Combobox and listen for changes. When you choose a state function zoomToState is ...


1

I think the easiest way would be to use map.CenterAndZoom the following: button.on('click', function(){ var location = [-155.79719, 14.03035]; //Any location around the equator map.centerAndZoom(location, 2); }); A zoom level of 2 will show the entire map. If you dont want to use this a second option would be to use the Extent class.


0

Wouldn't you just set the scale dependent visibility in the mxd that you are publishing?


0

It might be the proxy setup, or it might be the code inside the JS you used. There is a proxy parameter esriConfig.defaults.io.alwaysUseProxy. Try setting it to false. You can read about the proxy page here: https://developers.arcgis.com/javascript/jshelp/ags_proxy.html Also you can add more serverUrls to your config since the basemap request goes to your ...


0

You can use the MapQuest Open Directions API Web Service This ... allows you to use OpenStreetMap (OSM) routing data directly over HTTP without having to go through a language-specific SDK. Requests can be submitted as Key-Value pairs, JSON, XML and more. If you look at the API, you can find several samples. The service can return results which ...


2

you are providing an invalid url to your locator service in your code. "https://www.cartotronics.com/ArcGIS93/services/UTC_Viewers/Louisville_AlphaNumeric_Ranges/GeocodeServer" //should be "https://www.cartotronics.com/ArcGIS93/rest/services/UTC_Viewers/Louisville_AlphaNumeric_Ranges/GeocodeServer" just as an aside, it would have been substantially less ...


0

Looking at the code you supplied, nothing immediately obvious is jumping out as being wrong. However, here are some tips to help further debug the problem: Try switching to a SimpleMarkerSymbol and see if this works to rule it out as being a problem with PictureMarkerSymbol. If it works and the issue is with PictureMarkerSymbol, user the browsers debug ...


0

The layer object returned via the createMap response doesn't have the property "setVisibility." However, it does has a property called "layerObject," which seems to be the actual map object. The code snippet below does the trick: layer.layerObject.setVisibility(true)


0

In this situation I think the problem is that you are attempting to dig your layer out of the response itemInfo as opposed to the actual response map. from this sample... var myLayer = map.getLayer("USA_Tapestry_335"); myLayer.setVisibility(false);


0

Option 1: Try republishing the service. I ran into this error when copying over a new mxd file to the server without publishing it. Option 2: Try the unique timestamp workaround already referenced by BinnyN. Below is the code: var uniqueTimestamp = (new Date()).getTime(); query.where += " AND " + uniqueTimestamp + "=" + dirty;


3

syntax could vary from one underlying database to the next, but you need something like this: WHERE > FIELDNAME=(SELECT MAX(FIELDNAME) FROM TABLENAME) in essence 'return to me the feature with a value equal to the highest value for that particular field' ...


0

You may try inspecting the object that has your list of items and building a new one containing the single instance of the strings in the old object. This sounds like what you might be trying to do. If not, then please let me know and i will refine the approach, as appose to simply down voting me ;). The idea is to filter your object with duplicates by ...


0

EDIT I believe the best way to achieve your desired results will be to process your GET return data, rather than using AGS to calculate your maximum value. See this JSFIDDLE using a GET request. Calculating the max POP2007 value from your results based on the input extent appears to be the cleanest approach. If you still wanted to use the outStatistics, ...


0

the JS API doesn't expose the ability to set a rotation property on the exported map directly, but its not too difficult to intercept the request and add the property manually. esriRequest.setRequestPreCallback(myCallbackFunction); function myCallbackFunction(ioArgs) { //make sure we're only manipulating print requests if ...


1

Finally I have the answer for my Query: Here is the solution... (I am posting this; it might help someone) Thank You for your Help and Support. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" ...


1

there is a published sample in the ArcGIS API for JavaScript Resource Center which demonstrates how end users can browse for a file on disc and plot it interactively. Drag and drop to display data https://developers.arcgis.com/javascript/jssamples/exp_dragdrop.html



Top 50 recent answers are included