Tag Info

Hot answers tagged

3

The spatial reference for a map is defined either by the extent passed to the map constructor or by the first layer added to the map. Checkout the any projection sample to see how to specify different spatial references for a map. If you're using the basemap or center and zoom options with the map constructor, the map's spatial reference will be web ...


2

You have to wait until the map is ready to have those methods attached to it. This disables the navigation. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Simple ...


2

i'm not sure why .disableMouseEvents() stopped working after 3.9, but you can use map.setInfoWindowOnClick() instead. here's a working sample.


1

As per the response syntax and example in the documentation here, ArcGIS Server should definitely be returning the spatialReference to you explicitly. see this thread for more info about the confirmed bug.


1

As far as I can tell, you'll need to just zoom in on the selected area and print it, assuming you're using the Print Task found here: https://developers.arcgis.com/javascript/jsapi/printtask-amd.html. It doesn't look like there's an option to print only part of what's visible. Note: The PrintTask requires an ArcGIS Server 10.1 Export Web Map Task. So make ...


1

I changed the URL call to my arcgis server to the ip address and the map finally prints. Probably a problem with the web adaptor.


1

I managed to get the text by the side of the symbol I have modified style in the sample code from esri https://developers.arcgis.com/javascript/jssamples/ed_template_picker.html You can find the updated code at http://jsfiddle.net/DineshAtPowel/025kv88y/1/


1

It looks like you just had some JavaScript errors. You were missing commas in your layerInfos: layerInfos: [{layer: BOE30, title: "BOE30", slider: true}, {layer: APESections, title: "Sections", slider: true}, {layer: NDMTWellBores, title: "ND, MT Well Bores"}, {layer: EOXDSUs, title: "EOX DSUs"}, ...


1

You also have the option of moving the div which contains your custom basemap using JavaScript. The following code moves the basemap div to the top of the gallery: on(gallery, "load", function() { var nd = document.getElementById("galleryNode_myBasemap"); nd.parentElement.insertBefore(nd, nd.parentElement.firstElementChild); } Where "myBasemap" is ...


1

I just finished doing something very similar so perhaps this will help you. I'm not using map.setExtent though (except as a fallback). Instead I'm using map.centerAndZoom. Right after I add the graphic, I have this bit of code. I'm thinking this may point you in the right direction (instead of maxZoom, you may be able to plug that zoom level 6 in?). One ...


1

All layers in Esri's JS API have minScale and maxScale properties. This includes graphics layers. Once you've created a layer, you can you set minScale and maxScale directly (probably not recommended) or use one of the methods like setMinScale, setMaxScale or setScaleRange. It looks like you were getting close to this with the stuff in your bulleted list ...


1

have you taken a look at this article? Printing maps that contain secured services http://resources.arcgis.com/en/help/main/10.2/#/Printing_maps_that_contain_secured_services/0154000005q3000000/ in general, its not sufficient to try and supply proxied urls in the WebmapJSON because the PrintService is ultimately going to have to make its own entirely ...


1

My best advise is to tear down your code to the most basic component (or even a few lines to successfully load a map) and put back together the features one by one. You'll notice which feature breaks as you go along and you can fix them separately. Also consult the "release notes" starting with 3.6 up. You can try upgrading one minor version at a time ...


1

You can use esri.request to retrieve information about a service. For example: http://services.arcgisonline.com/arcgis/rest/services/Demographics/USA_1990-2000_Population_Change/MapServer?f=pjson the response is (an extract): . . "copyrightText": "Copyright:© 2013 ESRI", "supportsDynamicLayers": false, "layers": [ { "id": 0, "name": "USA 1990-2000 ...


1

Yes you need to build the drop down manually. When a featureclass contains a field to which the coded value domain is setup, in that case, you get only the index values, and not the description as the attribute value. If you look at the fields object on the query response, you'll see that it contains the domain, and using that, manually you'll have to set ...


1

I tested the sample application with latest version of ArcGIS JavaScript API i.e. 3.11 and was able to print text element. So please update the version of ArcGIS JavaScript API to 3.11 and correct the following line: var font = new Font("20px", Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLDER,"Ariel"); I tested the sample application with latest ...



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