|
POST
|
I use - map.setExtent(unionExtent.expand(1.5)); I don't use - map.setExtent(unionExtent.expand(1.5), true); The top one works perfectly for me... And just to clarify, I'm using it with version 2.8 of the API. Ken
... View more
07-26-2012
01:11 PM
|
0
|
0
|
1505
|
|
POST
|
Hi Alan, Here is a function I wrote which will apply a definition query on a featureLayer based upon the selected value in a combo box. I then select features within the featureLayer based on the definition query, and then union the extent of each selected feature. function selectAnimal(item) {
//apply a definition expression to the layer to only display trees of the selected species
var query = "Animal_ID LIKE'${name}'";
homerangeLayer.setDefinitionExpression(esri.substitute({
name: dojo.trim(item.value)
}, query));
homerangeLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function(results) {
var unionExtent;
for (var i = 0, il = results.length; i < il; i++) {
if (unionExtent) {
//if extent already initialized, union it with new feature extent
unionExtent = unionExtent.union(new esri.geometry.Extent(results.geometry.getExtent()));
}
else {
//if extent not initialized, set it to feature's extent
unionExtent = new esri.geometry.Extent(new esri.geometry.Extent(results.geometry.getExtent()));
}
console.log(unionExtent);
}
//zoom to the extent of all polygons.
map.setExtent(unionExtent.expand(1.5));
});
} Hopefully this code makes sense to you! Ken
... View more
07-26-2012
10:41 AM
|
0
|
0
|
1505
|
|
POST
|
I'll concur - I don't care for the new format at all! I searched for "javascript" to try and filter out relevant blog posts. It didn't even come up with the most recent blog posts that I was reading two weeks ago! I'll try to keep an open mind, but I'm not liking what I'm seeing! Ken
... View more
03-05-2012
11:17 AM
|
0
|
0
|
1200
|
|
POST
|
Thanks Derek, Can I set the infotemplate for each layer, and then pass that to the popup somehow? Ken
... View more
02-16-2012
06:39 PM
|
0
|
0
|
430
|
|
POST
|
I've implemented popups in one of my applications, but recently encountered a problem. I'm trying to implement popups on more than one feature layer, but I can't get it to work. It will work for the first feature layer created, but none of the additional feature layers. Is there an efficient way to implement popups for many layers? Do you have to somehow create/destroy popups and feature layers, so that only one is present in the project at a time? This project will have 2 ArcGISDynamicMapServiceLayers, each of which will contain 2 point layers. So we're talking a total of 4 point layers. Each have different attributes. So I'd like 4 different popups to accomodate all layers. Any suggestions? Am I missing something simple? Thanks, Ken
... View more
02-16-2012
02:43 PM
|
0
|
2
|
733
|
|
POST
|
Hi Jared, The link that Kelly provided is a good starting point. Spend some time googling "dojo.data.ItemFileWriteStore" and reading as much as you can about it. There are many examples of how it works. I use dojo.data.ItemFileWriteStore a lot to allow clients to enter/update attributes in a tabular grid format. These attributes are then associated with map graphics (essentially assigning a Lat/Long coordinate to each row in the grid). I then pass these map graphics to a geoprocessing service, which appends the data to an underlying geodatabase feature class. Essentially, it allows the end-user to "append" data in bulk. Rather than editing one feature at a time like some of the ESRI samples show, a user can populate 20 or 30 or more records in one pass. What you are trying to do could be easily implemented with the "dojo.data.ItemFileWriteStore." You could also just use individual controls like "dijit.form.TextBox" or "dijit.form.FilteringSelect" and then string together their values into a query.where statement. Ken
... View more
02-16-2012
09:10 AM
|
0
|
1
|
1212
|
|
POST
|
Garmin has developed a javascript api based upon Prototype. It allows end-users to upload/download their Garmin gps units to a website. It's up to you as a developer, to determine what to do with the data. All that it requires from the end-user is that they install a "Plugin" developed by Garmin. I have successfully embedded this Garmin GPS functionality in some of my internal ArcGIS Server Javascript API applications. My work flow allows the end user to connect their Garmin GPS units, "download" the waypoints, which ends up populating a dropdown list in my app. The user can select a waypoint from the dropdown, fill in associated attributes, and then create a map graphic. I then append the map graphics to a feature class (using a geoprocessing service). My workflow allows biologists to collect wildlife observation data (species, quantity, male/female, age, etc.) and associate those attributes to the XY coordinate (waypoint) where the animal was observed. It works great, although I'm struggling with some of the newer Garmin GPS units. Garmin has changed the way that their data is stored and managed on newer devices, and this has created havoc with my application. It still works great with older Garmin devices, but the newer ones are giving me fits! See this link for more info on the Garmin Communicator API. http://developer.garmin.com/web-device/garmin-communicator-plugin/ Ken
... View more
02-03-2012
08:07 AM
|
0
|
0
|
505
|
|
POST
|
I've done something similar using geoprocessing services. The user draws a graphic, or creates a graphic from XY coordinates. That graphic then gets passed to a geoprocessing service that appends the feature to a feature class within a file geodatabase. I use it as a way to "edit" file geodatabases, without using ArcSDE. It works great, but is probably much slower than editing directly into SDE. I allow my users to draw and/or create multiple graphics, which then get appended in a "bulk upload" fashion, so that the time it takes the operation to run is worth their while. I adopted this strategy before feature services were included in the API, and found a sample that ESRI put out showing how to do it. Here's a link. Editing Sample Ken
... View more
01-30-2012
07:21 AM
|
0
|
0
|
352
|
|
POST
|
Derek - We all REALLY appreciate all of your help and input with our questions! You are invaluable! Keep up the great work! Ken
... View more
09-22-2011
08:10 AM
|
0
|
0
|
1165
|
|
POST
|
You might be interested in using the geonames web service to locate places in your application. See this link - geonames I use it in my apps, and works great. Occasionally it will run slowly, but so far I haven't had any real trouble with it. It finds place names, streams, mountains, etc. It doesn't handle street addresses or roads though... Ken
... View more
09-19-2011
09:40 AM
|
0
|
0
|
727
|
|
POST
|
Hi Scott, I don't quite follow what you want to do... Are you looking to create an app that will allow the user to download their gps and display the data right then? There are a few samples out there that allow the user to download to a .csv file or .gpx file (or other formats), upload them to a server, and then display the results on a map. There are also some samples that allow the user to drag and drop files onto the map and display the results (with newer browsers). Another option might be to look into the Garmin Communicator API (if the data is coming from a Garmin gps unit). You could set up an application that allows the user to download data into json format, and use that right in your mapping application. Can you provide a few more details on your project? Ken
... View more
09-19-2011
08:23 AM
|
0
|
0
|
719
|
|
POST
|
You could look at this sample for one idea: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/exp/exp_localstorage.html This will allow the user to save edits on their own computer, but it will only work with some browsers. A better way to go would be to set up a geoprocessing service that appends graphics (created from your .csv file) into a feature class on the server. I do this in some of my applications, when I want to allow bulk uploads of data from the user to a mapservice. There was a sample that ESRI put out (it might have been Sterling Quinn) which included sample data as well as a sample model for publishing to a geoprocessing service. I use this particular sample for many editing tasks, allowing me to edit the FILE GEODATABASE that my data is contained in. It is not the quickest process to run, but if you are appending dozens or hundreds of features at one time, it may end up being quicker than editing one record at a time the built in editing capabilities of the api. Ken
... View more
08-10-2011
07:19 AM
|
0
|
0
|
1549
|
|
POST
|
Can anybody tell me what the best practice is for creating and consuming multiple map layers in a dynamic service... my question centers around whether it is better to create one map service with dozens of different map layers contained within it, but then only make visible a few layers at a time, vs: creating multiple map services and then loading up the few that I need? I have multiple applications that will be consuming these services, but only a select few map services per application... What are the performance pros/cons to having all map layers in one service when only a few are being used in a given application? I'm guessing that results in a lighter load on the server than having multiple map services being called up from the server? The same question applies to geoprocessing services - is it better to have multiple geoprocessing tasks contained within one geoprocessing service, or would it be better to split out each unique task into its own geoprocessing service? Thanks, Ken
... View more
07-28-2011
07:40 AM
|
0
|
1
|
530
|
|
POST
|
Would these tools be useful with the way your data is currently stored? Hi Russel, I'm not the original poster, but I will state that the functionality that you have described would be very useful. I'd like to be able to attach documents to a file geodatabase feature class using ArcToolbox tools or python scripts. My ultimate goal is to expose the attach file functionality through a geoprocessing service in ArcGIS Server. That way, users could add attachments to features by way of a web mapping application. This can currently be done very easily if your data is in SDE. I'd like to use a file geodatabase for my applications...
... View more
05-27-2011
12:28 PM
|
0
|
0
|
1582
|
|
POST
|
You will probably need to create a datagrid for each layer. Then you could display them in a tabcontainer, similar to this sample: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/find/find_drilldown.html Note that this sample utilizes HTML tables instead of dojox.data.datagrids, but the concept should still work just fine... Ken
... View more
05-11-2011
08:23 AM
|
0
|
0
|
610
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-27-2020 11:09 AM | |
| 4 | 07-17-2018 02:38 PM | |
| 1 | 12-06-2013 01:57 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|