|
POST
|
hi steve, i've attached a zip file of both legacy and AMD versions of 3 different applications that are a little more complicated than I used for my blog. hope you find reviewing them helpful.
... View more
05-30-2014
10:29 AM
|
0
|
0
|
2503
|
|
POST
|
daniel, it would definitely be simpler, but it wouldn't be very secure to store usernames and passwords in your application source. 🙂 if you'd like to authenticate on behalf of your end users, you should be using a proxy. the sample below doesn't spin up using createMap(), but comparable logic is used to force requests to a subscription routing service through a proxy which generates a token dynamically. directions https://developers.arcgis.com/javascript/jssamples/widget_directions_basic.html
... View more
05-30-2014
09:25 AM
|
0
|
0
|
3277
|
|
POST
|
hi michael, first, i recommend checking out this blog post. in general, in order to fully convert your own code to AMD, you would need to remove all of your existing calls to dojo.require() and place all of your application code within a require callback (or several) which loads the same modules. afterward you will then reference what you need using aliases instead of relying on global namespace objects. for example: dojo.require("esri.dijit.LocateButton");
..
geoLocate = new esri.dijit.LocateButton({map: map}, "LocateButton");
//becomes
require(["esri/dijit/LocateButton", ...), function(LocateButton, ...) {
geoLocate = new LocateButton({map: map}, "LocateButton");
}
... View more
05-30-2014
08:49 AM
|
0
|
0
|
2504
|
|
POST
|
glad to hear you were able to sort yourself out daniel! thanks for taking the time to share the solutions.
... View more
05-30-2014
07:49 AM
|
0
|
0
|
3277
|
|
POST
|
hi vibin, you could start by taking a look at these samples https://developers.arcgis.com/javascript/jstutorials/mobile_dev.html https://developers.arcgis.com/javascript/jssamples/#search/mobile
... View more
05-30-2014
07:46 AM
|
0
|
0
|
590
|
|
POST
|
hi ken, marla is right. the ellipses are intended to indicate that it is possible (but not required by the snippet itself) to load additional AMD modules. when you load another unrelated module, you would also refer to that module with a corresponding argument alias.
require([
"esri/graphic", "esri/secondModule"
], function(Graphic, secondModule ) {
var myLine = {geometry:{"paths":[[[-91.40625,6.328125],[6.328125,19.3359375]]],
"spatialReference":{"wkid":4326}},
"symbol":{"color":[0,0,0,255],"width":1,"type":"esriSLS","style":"esriSLSSolid"}};
var gra = new Graphic(myLine);
...
}); see this blog for more info
... View more
05-28-2014
02:42 PM
|
0
|
0
|
824
|
|
POST
|
hi Raluca, 1. its definitely okay to nest one event listener inside another 2. if you are planning to reference esri js api modules (like 'Map', 'DynamicLayer') in your named functions, they will no longer be in scope if the function is defined entirely outside of your require callback. that being said, you are welcome to call require more than once in your own code if you prefer. hope that helps!
... View more
05-28-2014
02:29 PM
|
0
|
0
|
1117
|
|
POST
|
no problem Glenn, ArcGIS Online for Organizations gives you the capability of publishing both secure and public 'hosted feature services'. afterward all of our RESTful developer APIs can be used to talk to the service interactively (ie. query for JSON features based on either a SQL clause or spatial relationship or even POST edits) here are a few helpful links which discuss the publishing steps https://developers.arcgis.com/tools/csv-to-feature-service/ http://video.esri.com/watch/1342/publish-hosted-feature-layers as an alternative, our JS API now also includes a CSV layer which allows you to talk to CSVs published on a web server directly. if you can think of a way to 'secure' the CSV itself, that would be an option too.
... View more
05-27-2014
07:55 AM
|
0
|
0
|
2464
|
|
POST
|
glenn, i wasn't talking about hosting a CSV on a web server. i was talking about publishing a RESTful service which could be queried dynamically by your application to display graphics. you could enforce security and require a login to access the hosted feature service itself if the data is sensitive and use something like a proxy from within your application if you wanted to avoid having people login twice.
... View more
05-20-2014
06:35 AM
|
0
|
0
|
2464
|
|
POST
|
Using ArcGIS Online, you can published Tiled Map Services (consumed in our JavaScript API as ArcGISTiledMapServiceLayers) and hosted feature layers (FeatureLayers). You can also leverage utility Geocoding, Routing, Analysis, Geometry, GeoEnrichment and print services. The only layer types I can think of at the moment which cannot be consumed without ArcGIS Server are ArcGISDynamicMapServiceLayers, image service layers, or services that incorporate custom data for geocoding, routing or geoprocessing. also, just my two cents, but i'd argue that Tim's suggestion of programmatically defining graphics is probably not the best approach for you here. If you have more than a handful of features to manage I would highly suggest leveraging something like a hosted feature service (for example, by uploading a CSV or shapefile) instead of coding graphics by hand. that way you can load your hosted feature service into individual webmaps, modify symbology and popups and then publish using existing templates. Store and Query Geographic Data In Feature Services https://developers.arcgis.com/en/features/cloud-storage/ Web map by ID https://developers.arcgis.com/javascript/jssamples/ags_createwebmapid.html
... View more
05-19-2014
08:07 AM
|
0
|
0
|
2464
|
|
POST
|
hi david, when you're first starting, working with the layers that you dig out of a webmap is a little more confusing than those you instantiate in your own code, but its important to remember that they don't behave any differently or have any different properties or methods. kellys previous code was written for a FeatureLayer layer type and exercises the function setVisibility() to toggle the entire service. that being said, because ArcGISDynamicMapServiceLayers have the same method, the code can be applied to them too. If you'd like to toggle the visibility of individual layers in a dynamic map service, you'll need to use ArcGISDynamicMapServiceLayer.setVisibleLayers() and pass an array of layer ids that you'd like to display. here are a few samples that you can try and apply to a layer dug out of a webmap instead of one instantiated in code. Toggle layer visibility https://developers.arcgis.com/javascript/jssamples/map_explicitlayerlist.html Dynamically create layer list https://developers.arcgis.com/javascript/jssamples/map_dynamiclayerlist.html
... View more
05-16-2014
07:37 AM
|
0
|
0
|
1037
|
|
POST
|
Oyvind, thanks for that! i was definitely able to reproduce the error when trying to pan and zoom in the middle of drawing the 1000 polygon graphics in my own feature layer. i wrote up a quick fiddle to demonstrate how to resolve this problem based on threads you shared.
... View more
05-16-2014
07:24 AM
|
1
|
1
|
2575
|
|
POST
|
my apologies, but i just realized that i had commented out all of our drop shadow divs earlier to try and simplify your app a little bit. http://jsfiddle.net/jagravois/Dy4r4/ ill have to leave it to you if you'd like to try and add them back in and sort out the rest on your own.
... View more
05-15-2014
03:56 PM
|
0
|
0
|
4234
|
|
POST
|
as i said before... i just left everything right where it was.
... View more
05-15-2014
03:39 PM
|
0
|
0
|
1441
|
|
POST
|
i just left everything right where it was.
<section id="fancy" ...
<section id="search" ></section>
...
</section>
... View more
05-15-2014
03:30 PM
|
0
|
0
|
2793
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-16-2014 02:35 PM | |
| 1 | 03-15-2013 04:25 PM | |
| 1 | 06-01-2016 10:51 AM | |
| 1 | 12-28-2015 04:46 PM | |
| 1 | 12-28-2015 05:26 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|