Tag Info

New answers tagged

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()


2

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


1

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


1

Well, I'm going to "answer" my own question -- while the below isn't an ideal solution, it is pretty darn close and meets all 3 of the requirements I outlined in the question. Note that the limitations were: No immediately available access to our own map server (as it turned out), I don't have the know-how to write my own user registration system in only a ...


1

It looks to me like you are trying to use the features array returned by QueryTask when it is empty. I.e. If 'result' is the name of the variable you're using in your QueryTask call back, then result.features is the array of features it returns. You need to check the length of the array, e.g.: if (result.features && result.features.length > 0) ...


0

I've recently posted a blog titled When is the Web Adapter Needed. You will find a cheat sheet to determined if the web adapter is mandatory for your ArcGIS architecture.


0

Since you have not started, I suggest trying to use the Query data without a map developer sample for the ArcGIS API for JavaScript first: This sample demonstrates that you can query data from a map service without displaying the service. Most map services contain datasets with attribute information that can be queried and displayed in a simple ...


1

The following code should work to attach an infoTemplate to a polyline. var infoTemplate = new InfoTemplate(); infoTemplate.setTitle("Your Title"); infoTemplate.setContent("field1 label: w ${field1}<br/>" + "field2 label: ${field1}"); polyline = new FeatureLayer("[Your Rest Endpoint URL]", { ...


0

have you seen this sample? in general, whether you use the TemplatePicker or not, the approach you should take is the same. That is to instantiate a Graphic object using your geometry and attributes and pass the graphic within FeatureLayer.applyEdits(). depending on the argument position of the graphic, this method allows adding new features, editing ...


0

ArcGIS Online for Organization allows to Track edits and restrict edits to feature owners which state: You can have ArcGIS Online keep track of who created the features in the published feature layer and restrict access accordingly. To track the edits, follow the steps to edit web layer details and check Keep track of who created and last updated ...


2

As I understand it, Esri's IdentityManager is designed for managing ArcGIS.com users: This class provides the framework to implement a solution for managing user credentials for (1) ArcGIS Server resources secured using token-based authentication and (2) Secured ArcGIS.com resources (i.e. web maps). Your users would need to register for an Esri global ...


1

The map's default infoWindow should actually be an instance of esri/dijit/Popup, so the way to have it behave as if a user has just clicked on a given feature is to call its setFeatures() method. var point; var query = new esri.tasks.Query(); // TODO: set query paramters var deferred = ...


1

Have you looked at the Basemap Toggle (https://developers.arcgis.com/javascript/jssamples/widget_toggle.html) and the Basemap Gallery (https://developers.arcgis.com/javascript/jssamples/widget_basemap.html) for examples or their widgets? If you use the image you have and assign click events to each 'button', you can change the basemap using code similar to: ...



Top 50 recent answers are included