|
POST
|
Can you post a link to the showcase imagery viewer that you're referring to? If it's using a query task an assumption is that there is a polygon layer representing metadata about each image (ie, they are serving the Source and Date as attributes in a polygon layer, with the polygons representing the extent of each image). Clicking on the "image" is actually running a query task against the polygon layer, and returning simple attributes.
... View more
07-30-2012
03:36 PM
|
0
|
0
|
1176
|
|
POST
|
Is there a way to use a static image (png) as the initial map, which is of the entire US within a square frame having Canada and Mexico greyed out? Once the user submits a search it switches to a live map which is zoomed in? Not quite what you asked for, but another approach could be to add a coloured polygon layer representing the US. If you used the greyscale basemap, the US would stand out clearly. Then when the user submits a search, remove the polygon layer.
... View more
07-30-2012
03:26 PM
|
0
|
0
|
631
|
|
POST
|
Hi Travis, It's hard to give specific advice without seeing your site. But my experience in doing something similar (I reproduced an ArcGIS JS API site in OpenLayers) was to isolate the parts of my code which were specific to ArcGIS, and replicate them in OpenLayers. Like you I had a lot of non-ArcGIS code which I could re-use - the HTML and CSS were unchanged, and other functions like changing basemaps had an equivalent method in OpenLayers. Once you're familiar with how the ArcGIS JS API works (by playing with the samples), you should have a better feel for the changes you'll need to make. Eg, if your current site adds a polygon overlay to Google Maps, figure out how to do the same thing in ArcGIS. Same with changing basemaps, zooming to a bookmark, adding a KML layer, etc. Cheers, Steve
... View more
07-30-2012
03:21 PM
|
0
|
0
|
1101
|
|
POST
|
The output of the queryTask is a featureSet, which you could iterate through and summarise manually. Stub code:
function functionweiter(featureSet){ var features = featureSet.features;
for(var i=0, il=features.length; i++) {
var feature = features;
//summarise
});
});
... View more
07-26-2012
04:16 PM
|
0
|
0
|
814
|
|
POST
|
ESRI has terribly limited documentation and usually its examples cut out a lot of dependencies. Actually, compared to many other libraries I reckon their doco is pretty good! You've got two dojo.ready functions, which might be a problem. Perhaps try running the addPointToMap function on the map's onLoad event to see if that makes any difference. The help file says that "The graphics object is available to use after the Map.onLoad event." Steve
... View more
07-26-2012
04:10 PM
|
0
|
0
|
905
|
|
POST
|
Assuming that your map is in Web Mercator projection, you probably need to re-project your points from decimal degrees. See the geographicToWebMercator help doco. Steve
... View more
07-26-2012
04:01 PM
|
0
|
0
|
678
|
|
POST
|
I'm trying to trap for the situation when an ArcGIS Server service isn't available because the server is down, so I'm trying to listen for the layer's onError event. I'm finding that this isn't firing when the layer returns a ""NetworkError: 503 Service Temporarily Unavailable" error. To illustrate, try this:
var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_Worl/MapServer");
map.addLayer(layer);
dojo.connect(layer, "onError", function() {console.log("problem with layer");});
This will display the message, since that layer doesn't exist on that server (I removed the D from WORLD). Now try replacing that URL with a service which does exist but which isn't currently running (ie, if you tried to open its URL in a web browser you'd see a 503 error). [ATTACH=CONFIG]16403[/ATTACH] I get a 503 message displayed in the Firebug console, but the layer's onError event does not fire. [ATTACH=CONFIG]16404[/ATTACH] Thanks, Steve
... View more
07-25-2012
04:47 PM
|
0
|
1
|
2020
|
|
POST
|
I'd start by playing around with the Samples page. Then build a basic map based on the ArcGIS API, and gradually add the functionality you need by reading the doco for that function. Having a working Google Maps example should help you to port across the functionality piecemeal, since you'll know what you need to emulate.
... View more
07-25-2012
03:44 PM
|
0
|
0
|
1101
|
|
POST
|
Glad you got it sorted. A tip for these forums is to surround your code in code tags - see the # button at the top right of the editor. This prevents the editor from removing white spaces and indentation and makes your code more readable. Cheers, Steve
... View more
07-25-2012
03:37 PM
|
0
|
0
|
3795
|
|
POST
|
it works just fine, up until 4600 points - any more, and the map simply doesn't draw. Any ideas as to why that might be? Can you post a link to your site, or the code? How are you determining that the problem occurs after exactly 4,600 points? What happens if you use a definition query on the layer to request fewer points? What happens when the map fails - do you see an error message, blank screen, etc? Cheers, Steve
... View more
07-24-2012
03:34 PM
|
0
|
0
|
3795
|
|
POST
|
It looks like your issue is that the csv file is open, and the arcpy function cannot work on the open/locked file. Bingo. Thanks for that. Believe it or not, this answer actually popped into my head while I was brushing my teeth last night.
... View more
07-23-2012
02:35 PM
|
0
|
0
|
923
|
|
POST
|
I have a directory of hundreds of *.csv files, containing code/description pairs for geodatabase domains. I'm trying to automate the creation of these domains using Python. 1) If I manually run the Table to Domain tool using a *.csv file in ArcToolbox, the domain is correctly created 2) If I create a Model using the Table to Domain tool, hard-coding in the input file (and all other parameters) then export this to a Python script, the domain is correctly created when I run the Python script 3) If I try to iterate through all *.csv files in the directory, running the Table to Domain tool for each file, I get the ""Dataset xxx does not exist or is not supported" error message:
Failed to execute. Parameters are not valid.ERROR 000732: Input Table: Dataset C:\temp\01-01.csv does not exist or is not supported
ERROR 000308: Invalid field type
Failed to execute (TableToDomain).
I suspect the problem is due to the path not being correct for the *.csv file, but I can't work out how to get it working. os.path.exists shows that the file does exist, so it may be an internal ArcGIS thing. Note that the *.csv file does work correctly via ArcToolbox and the hard-coded Python script, so it's unlikely that the field type really is invalid. Any help gratefully received. Thanks, Steve
... View more
07-22-2012
11:06 PM
|
0
|
2
|
1081
|
|
POST
|
Hi Tim, Is it an option to simply use ArcGIS.com, as in the link above? You can access the legend and Table of Contents checkboxes at the top left. Re: the trial version of ArcGIS, this is presumably the Desktop version that you've installed on your computer. Check the manual for information on how to add data, including from ArcGIS Online or basemaps from Bing, etc. The trial is a full copy of ArcGIS Desktop so you can edit the legend, by double-clicking on a layer in the Table of Contents. The help file is pretty good, so check out the getting started sections. To customise an online map based on ArcGIS.com check out the Create webmap from ID sample. I don't believe you can export from ArcGIS.com to KML, but I could be wrong. Steve
... View more
07-22-2012
03:25 PM
|
0
|
0
|
1140
|
|
POST
|
It was the extent. Apparently the spatial reference needed to be set in the identify parameters. Everything worked once I added this line of code: identifyParams.spatialReference = new esri.SpatialReference({ wkid: 102100}); Glad you got it sorted - sorry I wasn't able to help with this one. It might be an idea to have a global variable for the projection, to avoid errors like this? Or perhaps you could load the identify's projection from the map's projection? Cheers, Steve
... View more
07-19-2012
05:06 PM
|
0
|
0
|
507
|
|
POST
|
i guess the short answer to why do i need identifyTask is because I saw this method in the samples. Now that I look back, the identifyTask seems to only be necessary if it's a dynamicLayer? There are multiple points atop each other at full scale, and when zoomed in, multiple layers can be selected, so I stuck with the deferred = identifyTask.execute() deferred.addCallback() then switch for each featureLayer name and set infoWindow accordingly. There are also several queryRelatedFeatures tasks for some of the layers. Do you have a sample of an identify tool, I've never seen one? Do you just use a dijit.form.button? thanks! Hi Dan, An alternative way to handle the multiple points might be to cluster them. You could decide not to show the infoWindow unless the user zooms in closer to the point's location. I don't have a sample of an Identify tool, but you could hook your current identifyTask functionality up to a tool using one of the existing samples. When the button is active, the onClick and onHover behaviour of the other layers should be disabled. You can do this using:
//assign the listener to a variable
var listener1 = dojo.connect(........);
//disable the listener by its variable name
dojo.disconnect(listener1);
Cheers, Steve
... View more
07-19-2012
04:05 PM
|
0
|
0
|
1102
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2014 08:45 PM | |
| 1 | 03-15-2011 04:23 PM | |
| 1 | 10-18-2019 12:50 AM | |
| 3 | 01-22-2019 02:33 PM | |
| 1 | 09-26-2011 10:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-20-2022
12:19 AM
|