Tag Info

New answers tagged

0

You can turn off navigation via the mouse scroll wheel. The map has a boolean setting for it and functions to enable and disable it. Your code would look something like this: function openMapTab() { ... map.enableScrollWheelZoom(); } function openNotTheMapTab() { ... map.disableScrollWheelZoom(); }


0

edit: i did a bit of fiddling and realized that my original answer is incorrect. you need to loop through individual graphics and add() them one at a time because the graphics property of GraphicsLayer is not 'settable'. that being said, its important to note that there would be no performance benefit of the API exposing a technique to loading graphics in ...


1

You may want to use a Geometry Service on your server to accomplish this. See the example here: https://developers.arcgis.com/javascript/jssamples/util_buffergraphic.html That will allow you to create a buffer that's the same shape as the geometry you're creating a buffer for. However, it is possible to create a circle based on a polygon because a polygon ...


1

Tend to agree with @chris-w, if you look at the National Map, NED data) are not projected - though projections vary across the Survey, many times based on regional project needs (and if it's part of Mapping, Biology, Water, etc.). The USGS is spread across the landscape, typically with at least one office in each State, all with national, regional or local ...


3

The short answer is no, the projection used by the USGS varies with product (map series), application (paper vs web vs GIS data), and department/region/whatever. If you really want some detail, they publish a document on projections called Map Projections: A Working Manual you can find at http://pubs.er.usgs.gov/publication/pp1395


1

As John said, map.infoWindow is an instance of esri/dijit/Popup, not esri/dijit/InfoWindow like it was many releases ago. You can specify anchor directly: map.infoWindow.anchor = "top"; Or use set(): map.infoWindow.set("anchor", "top"); All valid values are listed in the API ref for the popup's anchor property.


1

the doc you linked to has information at the top about Popup now being assigned to the map by default. Popup https://developers.arcgis.com/javascript/jsapi/popup-amd.html you could either go the route of trying to see whether it's possible to set the 'anchor' property on Popup or declare explicitly that you want esri.dijit.InfoWindow to be assigned ...


0

Here is ESRI's Web App Builder http://doc.arcgis.com/en/web-appbuilder/ It does require an AGS account.


1

The last line of the getTextContent function in that sample shows how an infoWindow can contain HTML: return "<b>" + commName + "</b><br /><a target='_blank' href=http://en.wikipedia.org/wiki/" + sciName +">Wikipedia Entry</a>"; You can set this using infoWindow.setContent, and point to the location of the video. From this ...


1

This question is a year old but this alternate solution may be helpful to others. If you are using the Popup class you can set the Popup to a global variable so that you can set it not to show the window while updating. To prevent getting the "No information available" window, just set visibleWhenEmpty to false and hideDelay to 0: var popup = new ...


0

I have found a way to change the text to an icon. What I did is changed the data in the object: app.printer. app.printer._printButton.buttonNode.innerHTML = '<div id="dijit_form_ComboButton_0_button" class="dijitReset dijitButtonContents" data-dojo-attach-point="titleNode" role="button" aria-labelledby="dijit_form_ComboButton_0_label" ...


1

Ok.. After a morning of messing with this and trying to find a property to accomplish what I need, I was able to do this through the URL parameter of the geocoder. When creating the array of geocoding services to add to the Geocoder widget, I needed to append that URL with the token information. var myGeocoders = [{url: ...


0

Late response, but should it not be an Array of Graphic objects and it might be wise to add callback and errback functions even if they are optional, to get information on the error that occurs. https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#applyedits


0

Your code to create the legend: var legend = new Legend({ map: map, layerInfos:(arcgisUtils.getLegendLayers(response)) }, "legendDiv"); legend.startup(); is running before the createMap response is available. It needs to be inside your the function that runs when mapDeferred is resolved like so: var mapDeferred = ...


2

this is the sample you should start by taking a look at. in general, you need to use esriRequest to fetch your data, and then parse as appropriate before passing to a FeatureLayer or creating your own graphics and adding them to the map.


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 changed the URL call to my arcgis server to the ip address and the map finally prints. Probably a problem with the web adaptor.


0

here is a sample script for drawing a cirlce on a specified radius. var circleSymb = new SimpleFillSymbol( SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SHORTDASHDOTDOT, new Color([105, 105, 105]), 2 ), new Color([255, 255, 0, 0.25]) ); var circle; //when the map is ...


0

CMV does not support the exclusion of a dynamic service layer. You have to make some changes. config\viewer.js add layerControlLayerInfos identifyLayerInfos: {         layerIds: [2, 4, 5, 8, 12, 21] }, layerControlLayerInfos: {         visibilityLayerInfos: ...


0

I got where the problem is, I didn't add a class name called claro to the parent div of the all layers, I added like this: <div class="claro" > <div id="layersDiv> </div> </div> And it works after that.


0

i'd be willing to bet you're just missing the esri.css <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> check out this sample edit: after rereading your question, i can see clearly that you were already loading 'esri.css' from your own web server. does the network traffic show any indication that this wasn't successful? ...


0

Change your code to use on of the ESRI basemaps, does this work? Then it is a problem wit your map service I think. If so you can look at the rest endpoint javascript viewer to make sure are all the tiles there. Maybe the caching process didn't finish correctly: MYDOMAINHERE.COM/arcgis/rest/services/BaseMaps/OURCONTENT/MapServer?f=jsapi If the caching ...


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.


0

Chances are you already have a line like this first one in this block that connects the click event with the identifytask event function. map.on("click", executeIdentifyTask); map.on("click", makePopupDraggable); identifyTask = new IdentifyTask("http://your.arcgisserver.com:6080/arcgis/rest/services/folder/service/MapServer"); Add another one that ...



Top 50 recent answers are included