Tag Info

Hot answers tagged

5

As far as I know, there's two problems in this code. First one is, both Query and QueryTask doesn't define outputSpatialreference parameters. So this query returns there own spatialreference geometries instead of map's spatialreference. tasks.Query... queryContentSelect.outSpatialReference = map.spatialReference; tasks.QueryTask... ...


5

Checkout the utility functions in the esri.geometry namespace. You can do areas and lengths client side with functions from there. You can also do point-in-polygon client side with polygon.contains (also see extent.contains).


4

Google does not allow access to their tiles outside of their public APIs, from section 10.1.1 a of the Google Maps/Google Earth APIs Terms of Service: No Access to Maps API(s) except through the Service. You must not access or use the Maps API(s) or any Content through any technology or means other than those provided in the Service, or through other ...


3

There's likely a bug here which I think we have a fix for in the next (3.5) release. In the meantime, instead of using map.options.lods, try specifying minZoom and maxZoom to specify the range of levels you'd like your map to use.


2

I ended up solving this with the following code: mapHandler.gsvc.project([ geometry ], outSR, function(projectedPoints) { var polygonJSON = {"rings": projectedPoints[0].rings, "spatialReference": {"wkid": projectedPoints[0].spatialReference.wkid}}; var polygon = new esri.geometry.Polygon(polygonJSON); });


2

The legend was not being created in the code you posted because you set up an event listener for onLayer*s*AddResult but you're adding layers with addLayer. For onLayersAddResult to fire, you need to use map.addLayer*s*. Regarding require() vs. dojo.require(), you can technically use both at the same time but I would pick one or the other. Otherwise, your ...


2

The symbol for your polygon from your query task is not valid. While it still works within the API, the print task is less tolerant. Change this: // Executes after the query ahs been completed dojo.connect(queryTask, "onComplete", function (results) { //QueryTask returns a featureSet. Loop through features in the featureSet avd add them to the map. ...


2

If you are using ArcServer 10.1 you could create a Geoprocessing service which references either a model or script that you built to do this. The link above gives step by step instructions on how to create the model, then create the services and finally consume it in your app. Alternatively, there is this sample that uses a query to select records, you ...


1

We can use the map's extent property, to get the extent. Usually your map will be in webmercator. we'll have to project the bounds back to EPSG:4326 in that case. You can use the following code: //asuming your map is in web mercator //get the bounds of the current view var bnds=map.extent; //project the bounds from webmercator to latlong var ...


1

Please read the following information. http://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html In the "ASP.NET" section, there is the instruction for IIS, and also you can download "proxypage_net.zip" which include proxy.ashx. Hope this helps you.


1

The legend's layerInfos property has to be an array. You are passing in a function. You're also attempting to create the legend on each loop iteration. What you want to do is loop through your feature layers and create an array that you can pass to layerInfos. The basic legend widget sample shows this using dojo.map. Adapting your code to do this would look ...


1

Your main task is to upload the user given shapefile into your server and append it to your SDE Geodatabase. I'm not sure if actually showing the features to your user on the web map is an actual requirement, so I'll give you two ways of doing this. If You need to show the geometries on the map, then there are two main parts to your User Case: Upload ...


1

It sounds like you are looking for a client-side rendering solution (given you state that the "custom visualization would be updated by hand in response to map events" and that " it is not a layer with simple feature"). So server-side tile creation doesn't sound like an option. If you are open to using a different client JavaScript map visualization library ...


1

Your symbology rendering, scaling, and labeling is defined within your map document. To define layer scales: Right click each layer in the Table of Contents and select Properties Select the General tab and define min and max scale for each layer Save your map document, and then re-publish your service


1

Try connecting it to a dojo handler, like this: dojo.connect(map, "onLayerAddResult", function(layer, error){ if (error) { var content = "Layer could not load: " + layer.id + "<br />" + layer.url + "<br />"; alert("Major Error loading Content", content); } });


1

You're running into a bug in the printTask. Check this esri forum post http://forums.arcgis.com/threads/61448-Problen-with-the-Print-Task?p=254619#post254619 For labeling, I worked around this by adding another separate graphic layer: 1. You can get esri.symbol.TextSymbol to show up by creating another graphic layer and adding it to that layer 2. FYI, the ...


1

I have used similar functionality in my map. -Created doIdentify() function and called on click event. function doIdentify(evt) { app.map.centerAndZoom(evt.mapPoint,6); } You can check sample code at JSFiddle. Please let us know if you get any error message.


1

The webmap returns a featureLayer already instantiated. I haven't tried changing the mode to instantiate a featureLayer with mode selection, but it makes sense that you lose symbology and popups because you set those when instantiating. Solution: I have queried (queryTask) against the featureLayer url based on user drawn polygon (or user click, hover, etc), ...


1

What you can do, is to save the graphics on the local storage of the client browser. Note that local storage or DOM storage, is an HTML5 feature, and older IE browsers do not support it. For a deeper understanding, read this article from Dive into HTML5. Here are two ESRI JS samples which might be useful: Store bookmarks client side Local storage - ...



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