POST
|
You have to use the method http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayers'>addLayers() in order to take advantage of the event "onLayersAddResult". You can do this by supplying them in an array instead of one at a time map.addLayers([baseLayer, parcelLayer, serviceLayer]); Also, make sure to check out our legend widget
... View more
08-15-2012
05:02 PM
|
0
|
0
|
457
|
POST
|
i'm not sure how you can correct the display behavior onLoad, but regarding your second question: since the bookmark widget has an 'onClick' event, we can use it to wire up a function which will query to find the dropdown button and call closeDropDown() to close the popup. dojo.connect(bookmarks, 'onClick', function(evt) { dojo.query('.dijitDropDownButton').forEach(function(node,idx){ var btn = dijit.getEnclosingWidget(node); btn.closeDropDown(); }); }); Here's a fiddle which shows the code at work: http://jsfiddle.net/jagravois/r6TdX/1/ Class: Bookmarks (Event: onClick) http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/bookmarks.htm#onClick
... View more
08-15-2012
04:43 PM
|
0
|
0
|
396
|
POST
|
Heres a fiddle which shows how to reproject returned geometries successfully. http://jsfiddle.net/jagravois/nQGdA/ I double checked my previous post and noticed that i had accidently copied the incorrect property name "outSR" in my code rather than "outSpatialReference". I corrected the previous post to avoid further confusion.
... View more
08-15-2012
08:02 AM
|
0
|
0
|
216
|
POST
|
The outSpatialReference property of findParameters is expecting a spatial reference object. The code below demonstrates the proper syntax. ie: var sr = new esri.SpatialReference({wkid:102100});
//findParams.outSR = sr (incorrect)
findParams.outSpatialReference = sr findParameters in the API reference http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/findparameters.htm spatialReference http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/spatialreference.htm
... View more
08-14-2012
04:00 PM
|
0
|
0
|
216
|
POST
|
The important thing to remember is that you have to make sure that no code makes calls to the esri namespace until after the page has loaded. Since functions don't run until they are directed to run, this makes them a safe location. As an example, "dojo.addOnLoad(init)" tells your application to fire the init function as soon as dojo indicates that the page is loaded. calls to esri.* inside init will be fine.
... View more
08-14-2012
10:27 AM
|
0
|
0
|
324
|
POST
|
you mean this sample, correct? http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/mobile_arcgis.html We noticed a couple problems in that sample after updating it to point at a newer version of the compact jQuery library. The development team is aware of the problem and working on fixing the sample. Sorry for the inconvenience.
... View more
08-10-2012
04:35 PM
|
0
|
0
|
149
|
POST
|
Not sure if you're trying to write something more modular, but you could always look in REST at the scale that corresponds with a particular level for your tiled service and then use it to setMaxScale() on the entire DynamicMapService layer. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgisdynamicmapservicelayer.htm#setMaxScale
... View more
08-10-2012
08:34 AM
|
0
|
0
|
163
|
POST
|
I did another quick test and added the following line to the sample and it appears that our Javascript methods for setting scale dependency are working as well. featureLayer.setMaxScale(99999); With a maximum scale of 99999, in conjunction with the minimum scale interpreted from the map service of 100000, the hydrology layer wasn't drawing at all in my tests. If you have any additional details about the error, please let us know.
... View more
08-10-2012
08:15 AM
|
0
|
0
|
216
|
POST
|
I took a look at our Feature Layer On Demand sample (linked below) and when I zoom out, the minimum scale of the Hydrology layer is definitely being honored. Is the problem you are seeing specific to another drawing mode or a particular map/feature service? http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/fl_ondemand.html
... View more
08-10-2012
07:59 AM
|
0
|
0
|
216
|
POST
|
i took a look at the information you posted about the GP service above and perhaps you need to be passing an ObjectID as well? if you hit a wall, i highly recommend testing directly in REST until you can figure out exactly what JSON is expected/required to run the service. its a lot easier to reverse engineer in your Javascript application than it is to discover what REST is looking for. the link below is related to a geocoding task rather than geoprocessing task, but it gives an example of the json for a recordset which has no geometry. http://resources.arcgis.com/en/help/rest/apiref/geocodeaddresses.html
... View more
08-09-2012
01:06 PM
|
0
|
0
|
773
|
POST
|
You are hoping to change the value used to symbolize a feature already published in a service, correct? I don't know of any redlining techniques, but you could definitely accomplish this by publishing a feature service and allowing people to add new attribute information and change a value which would set different predetermined symbology. The editing sample linked below gives an example of this. Just click an existing polygon and change its attribute from "passive" to "active" to see its symbology change. http://help.arcgis.com/en/webapi/javascript/arcgis/demos/ed/ed_default_editingwidget.html
... View more
08-09-2012
09:03 AM
|
0
|
0
|
366
|
POST
|
the first link that i posted is an excellent example of what is returned by a request to geocode a single address (a recordset of AddressCandidates) http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/addresscandidate.htm Typically we loop through the results of a query operation or a geocoding operation and add the results to a graphics collection to draw them on the map, but in your case you would want to pass the results to a GP task which expects a recordset input. I added an attachment which shows what you get when you interrogate the candidates variable after setting a breakpoint in the application. If your GP service isn't expecting all those properties, you may have some additional work on your hands to remove them using a technique like delete(candidates.score); Not to mention the fact that the attributes aren't going to be prepopulated with the exact name value pairs you need. all in all, it may not prove to be a shortcut setting thing up this way.
... View more
08-09-2012
08:54 AM
|
0
|
0
|
773
|
POST
|
I've never tried creating and populating a RecordSet which includes attribute values only, but you should definitely be able to. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/featureset.htm here is a really stripped down example of passing attributes to a graphic and then storing the graphic in a recordset //populate your attributes using name value pairs
var attr = {"Plant":"Mesa Mint", "Field2:"Value2"};
//graphics doesn't require geometry, symbology or an info window, so you can just pass in attributes
var graphic = new esri.Graphic(null,null,attr,null);
//create an empty array
var features= [];
//push in your attributes
features.push(graphic);
//create your featureSet and push in the feature
var featureSet = new esri.tasks.FeatureSet();
featureSet.features = features; as an alternative, since many tasks actually return a recordset, it might also make sense to seperate the geocoding from the rest of your geoprocessing and pass the result from the first rather than creating the recordset from scratch. good luck with the project.
... View more
08-08-2012
09:48 AM
|
0
|
0
|
773
|
POST
|
I did a quick test and confirmed that basemaps definitely still display in Internet Explorer when the code assist is referenced with a script tag in an application. I used the following sample as the basis of the application and added my script tag directly below the tag referencing our API on line 21. (see below) http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/map_topo.html <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1"></script>
<script type="text/javascript" src="Assets/scripts/jsapi_vsdoc_v3.js"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
..... Where did you get this "install.html" file? what is the URL of the basemap which is not displaying? Where are you placing the script tag in your application?
... View more
08-08-2012
08:21 AM
|
0
|
0
|
220
|
POST
|
If you only want to geocode a single address it would probably be more appropriate to work with a geocoding service instead and pass the parameters directly (instead of trying to build a recordset for a geoprocessing service which expects an input table and does batch geocoding.) The sample linked below demonstrates how to pass a value from a textbox control to an address locator which takes a single line input. You could modify it to pull values from several textboxes and assign them to an address and zipcode field instead. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/locator_address.html Here is a link to the geocoding service being used. I often find it helpful to compare and contrast behavior between geocoding services directly in REST when I see problems in my applications. http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer
... View more
08-08-2012
08:08 AM
|
0
|
0
|
773
|
Title | Kudos | Posted |
---|---|---|
1 | 04-16-2014 02:35 PM | |
1 | 03-15-2013 04:25 PM | |
1 | 08-04-2017 10:01 AM | |
1 | 12-28-2015 05:26 PM | |
1 | 03-02-2016 08:31 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|