|
POST
|
You should be able to just have one function handle all of the checkboxes if they are all basically doing the same thing but affecting a different layer. Inside of your event handler function, the this keyword will be pointing to the checkbox that was clicked. You can use that to access the attributes of the checkbox (HTML input element). You can have a data-layer-id attribute, for example.
... View more
09-05-2013
08:41 AM
|
0
|
0
|
427
|
|
POST
|
Just curious, though, is there a way to call a function outside of its own require statement? I take it making global functions gets messy very quickly, and shouldn't be done, but it's good to know if it is possible to do in the new AMD format. I think this would do that... require(function() { function myFunc() { } // Assign the function to window so it is globally available. window.myFunc = myFunc; });
... View more
09-05-2013
08:32 AM
|
0
|
1
|
2331
|
|
POST
|
What you need to do Remove the "onclick" attribute of the checkbox input element. Inside the require function call dojo/on to connect the checkbox to the event handler function. (If you don't need to deal with legacy browsers you should use the built in JavaScript addEventListener function instead of dojo/on.)
... View more
09-04-2013
12:24 PM
|
0
|
0
|
2331
|
|
POST
|
If you're using AMD style, you'll want to modify Jason's sample to use dojo/_base/array.filter() instead of dojo.filter. If you don't need to support IE versions older than 9 then you should use the built in JavaScript Array filter method instead of either of the dojo methods. (This is for performance reasons.)
... View more
09-04-2013
12:13 PM
|
0
|
0
|
364
|
|
POST
|
I would look through the Dojo Toolkit website for documentation instead of waiting for Esri to update their sample. Here is a "Writing Your Own Widget" tutorial.
... View more
09-04-2013
12:08 PM
|
0
|
0
|
266
|
|
POST
|
As far as I know tiled map services cannot be reprojected on-the-fly like a dynamic map service, so the spatial reference system of all tiled layers much match. The LODs should match too, but you can omit some of the levels that Esri uses for their map services, since you most likely do not need to show the entire world.
... View more
08-29-2013
08:37 AM
|
0
|
0
|
946
|
|
POST
|
You should be able to generate images using the Export Map REST endpoint of a map service.
... View more
08-22-2013
09:20 AM
|
0
|
0
|
1125
|