Tag Info

Hot answers tagged

4

This is the precise use case for a geoprocessing service. Write your script and add it to a geoprocessing toolbox on the server as a script tool. You can test it on the server while developing the script by hard coding the parameters. Once you're comfortable with your code, replace those hard coded parameters with arcpy.GetParameterAsText(), add to a ...


3

Inside your map DIV tag, add another DIV tag with the image inside. You can set the transparency and float anywhere inside. Or since using a PNG, make it semi-transparent in advance. Example without CSS part below. <div id='map'> <div id='floating'> <img src="image.png"> </div> </div>


2

When you're adding one layer, as you're doing, the map triggers the layer-add event. When adding a list of layers through map.addLayers(), it triggers the layers-add-result event. If you know you're going to be adding more layers, and want to use the map.addLayers() method to load them all at once, then you can do as Dan suggested: ...


2

Since you are listening for the layers-add-result event, you need to add layers with the addLayers method (not addLayer). So change this: map.addLayer(wmsLayer) To this: map.addLayers([wmsLayer])


2

up until yesterday you would have had to invoke a web request to a geometry service to validate the topological correctness of your feature before passing the edit, but as of 3.13 you can now use the local geometry engine and call simplify()


2

[I'm sure I've posted this answer somewhere before, but I can't find it] I'd really recommend against parsing the output messages. For one, it'll be tedious. And more importantly, 2, you have INFO level messages on. INFO level displays path information to resources on the Server machine. Many people would consider this a security risk (leaving this level of ...


2

Do you have the WKT (Well-Known Text)? If so, you may be able to brute force parse looking for "UNIT". EDIT: Here's a hack for you. You can retrieve the WKT from a WKID by going to this address: http://spatialreference.org/ref/epsg/{wkid}/esriwkt/ For example, http://spatialreference.org/ref/epsg/2283/esriwkt/ returns: PROJCS["NAD83 / Virginia North ...


1

Have you looked at the Spatial Reference class on the API? This has a isWebMercator() method. Can you explain what you mean by "units"?


1

The modules in your require are not matching with the variables in the function. You need to move the modules "dijit/layout/BorderContainer", "dijit/layout/ContentPane", and "dijit/TitlePane" to after "esri/symbols/SimpleFillSymbol"


1

This help article seems to answer your question. Specifically this section: "The PrintingTools service can print layouts that use multiple data frames. The service only replaces the map in the active data frame; however, if the data frames have some relationship between them, such as an extent rectangle, that relationship is honored by PrintingTools."


1

According to the documentation for the layer "update-end" event, it fires every time the layer finishes updating. Every time the user pans, zooms in or out, this event will be triggered. The problem is, the layerInfo.defaultVisibility that you use to define the checkbox state doesn't change when you change the visibility of the layer. It only shows whether ...


1

edit: amended answer because ray kendo was on the right track and i gave incorrect information initially. paths can either be composed of an array of Point objects or raw coordinate pairs. we assume wgs84 when no spatial reference is provided for individual points, but you need to declare the spatialReference of the empty polyline as WGS84 as well if you'd ...


1

Having trouble adding a comment from my phone, so posting here... I would recommend that you become familiar with JSON, if not already. I would develop your service to return a JSON object that contains key/value pairs that hold the results of your calculation. That JSON object can be easily parsed in your javascript, placed into existing html or used to ...


1

I contacted Esri tech support about this question. They reminded me that the setExtentfunction takes two input variables: setExtent(extent, fit?). The fit variable is set to false by default, but according to the function documentation, it guarantees any map with tiled map service layers will "fit" on the screen. So, I have been able to fix this issue ...


1

To clarify Rorro's answer, the layer id is not the same as the layer name. You can save yourself a lot of time using the following code (where mylayer references your map service layer): var legendLayer = new esri.tasks.LegendLayer(); legendLayer.layerId = mylayer.id; The layer id will differ depending on how you consume the service. E.g. Rorro said his ...



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