Tag Info

New answers tagged

0

I have come up with this solution. But I wish to know if there is a better solution, since when I compared my results with ArcMap there are some areas which has a slight difference in the length of pipes. var query = new Query(); var queryTask = new QueryTask("feature layer with pipes"); query.geometry = selectionGeometryArea; query.returnGeometry = true; ...


0

Using Python and arcpy library is probably the way I'd choose for your task. You might also want to take a look at writing geometries.


1

I'd start with the concepts documentation at http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/ before diving into the API docs. There are lots of samples in the concepts documents. However for your task, I would recommend that you consider using the GeoProcessing tools and either python or model builder to script the task, for the ...


1

This will show you what the current basemap is <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, ...


0

I found the solution - and it was only one or two things that were missing. In the python script I needed to add: - if outRas is not None: arcpy.AddWarning("Made a new raster") tempFile = os.path.join(arcpy.env.scratchGDB, "wibble") arcpy.AddWarning(tempFile) outRas.save(tempFile) arcpy.SetParameterAsText(1, tempFile) #THIS WAS MISSING Then ...


0

Based on how your code looks, your toolbar variable needs to be global. The error makes it look like your toolbar variable is not global or something else is overwriting it. This is one of the reasons you shouldn't use an element's onClick attribute to set up event listeners. Take a look at either the Add graphics to a map or the Drawing tools sample for ...


1

This probably isn't the answer you want, but the Only solution is to do it by Hand. Not only are the API's very different, even the Languages and framework are very different. ActionScript might be a ECMAScript, but to run it as JavaScript, you'll have call JavaScript specific functions, and remove all the FLEX specific code. The UI's that you have built ...


0

A couple of thoughts: If you're using ArcGIS Server for custom raster based services, definitely checkout the Image Service. You put your rasters in a Mosaic dataset, then publish THAT to the server. You can then attach predefined raster functions which correspond to those of Map Algebra / Raster Calculator. ...


3

onExtentChange is an event that is run every time the user changes the extent in your map (you add a dojo listener for this event, which then runs the rest of your code) map.extent is the value of the current value of the view-extent in the map (which you would be saving everytime the onExtentChange event is fired and lastly map.setExtent is the function ...


0

Well, i failed to find a documented solution for this problem, however i did solve it by looping through once the layer is loaded and hiding all the items which did not meet my criteria, as below: dojo.forEach(tmpLayer.items,function(s) //tmpLayer is georsslayer name { var pointDate = new Date(s.attributes['pubDate']); //the graphic ...


2

One idea would be to hide the WMSLayer entirely if the map's extent is outside the layers "valid" extent. Based on this answer, one could listen to the map's extent-change event and check if the map's current extent is acceptable: map.on("extent-change", function () { // Check if map.extent is acceptable, otherwise hide the WMSLayer. if ...


0

you are trying to use Arcgis Extension for Google Maps API version 1.6 (http://help.arcgis.com/en/webapi/javascript/gmaps/help/topics/apiref.htm) with Google Maps API version 3. You should also update the ArcGIS Server extension to the new version: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/arcgislink/docs/examples.html.


2

When you're using the draw tools, use the draw-end event to get to the geometry that was just created. This is shown in a couple of samples: Add graphics to a map and Drawing tools. If you need your geometry in geographic coordinates (AKA wgs84 AKA lat/long), listen to the draw-complete event as the object your callback gets will have a geographicGeometry ...


1

because the widget supports incorporating search results from more than one locator, you actually don't set the placeholder property on the widget itself. as per the documentation, you could specify some custom text for the default Esri World Geocoding service like this: var myGeocoder = { url: ...


0

You could try PrintTask.prototype._getPrintDefinition(map); You may also want to check out this cereal library as well.


0

you need to specify the value of "mapbox.ID" for the tile set you want to load. In the API docs they show an example successful URL: http://api.tiles.mapbox.com/v3/examples.map-zr0njcqy.json


0

There is definitely a REST API for working with ArcGIS Online and Portal. This is the specific operation for publishing a hosted feature service from .csv http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Publish_Item/02r300000080000000/


0

Welcome to GIS Stack Exchange. Thanks for sharing your code - a suggestion is to simplify this and only include the relevant parts of your code (rather than the entire application). In this case, that might be just the loop where you're trying to edit the feature layer. Have you looked at applyEdits in the feature layer help file? This is one way to edit ...


0

so i tried destroying the existing toc and creating a new one like this, but it doesn't seem to work function gpJobComplete(jobinfo){ var mapurl = mapServiceURL + "/" + jobinfo.jobId; var energy = new ArcGISDynamicMapServiceLayer(mapurl,{ id:"Beste Energieformen", "opacity": 0.85 }); ...


1

Have you destroyed your previous TOC? I've found that the legend widget get's confused if you build a new one without first destroying the old one. The legend widget has a destroy method, I'm not sure if the TOC does as well. Try completely removing the old TOC before building a new one. Good Luck. It's essentially something like this. But as I said ...


2

I hate to answer my own question, but I've found a resolution. ESRI is releasing their JavaScript Web Optimizer, which will bundle and optimize everything into one file. That includes custom classes, Dojo itself, and only the required JavaScript API modules. I saw it at the Dev Summit, and it's pretty interesting.


0

EDITED: You can disable navigation for the entire map like so: map.disableMapNavigation(); But the problem with disabling map navigation for the MapOverview when you create your overview map, the code is binding all these events from the main map (zoom-end, pan...). I don't there is a clear way to identify these events so that you could disconnect them. ...


3

Do you have a <div> tag for your Home Button? It should have an ID of HomeButton and be in your HTML somewhere. Here's a jsfiddle showing both an overview map and a home button.


1

When you're using new HomeButton you are actually accidentally invoking new dijit/layout/BorderContainer instead because your require modules aren't lining up with your main function arguments. Try using this: require([ "esri/map", "esri/dijit/OverviewMap", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", ...


0

Cool idea. Accomplishing this will take a couple of steps. I will say I have not tested ANY of the code in this answer. It is possible for errors or syntax issues, but the general idea is there. Here is how you could grab the county extent. var county = document.getElementById("sel_county").value; //Your county select object var queryTask = new ...


0

I think if you'll put the popup content inside the sizer content and if you'll rewrite the actionList like bellow, then everything will work as expected:


0

I haven't tried this, but an idea is to create the feature layer from a feature collection, and base the collection on the result of a queryTask, since the queryTask's query does support a geometry filter.


0

is the problem that 'evt.layers[0].layer' doesn't resolve within the edit initialization function or that you just can't trigger the query when clicking on the map? if the second, check out this blog post/sample code on querying points and polylines by clicking the map. Querying points and lines on click with the ArcGIS JavaScript API ...


0

I think this would be very useful but as far as I am aware there is nothing available at present (version 3.8). The only way I can think to do this is not the best and there are limitations to it. You could perform a queryTask and executeforids which will return more than 1000 features (i.e. it is not limited like the query task by the server). You can then ...


1

Eric Pimpler over at Geospatial Training Services compiled a copious list of articles on Dojo for Web Mapping for the AGS Javascript API 1. However, since it was stacked up in 2009, it might have some bad links and no-longer-relevant content. Also, remember that Dojo is a framework for much more than Web Mapping. Many of the common-sense (and some of the ...



Top 50 recent answers are included