|
POST
|
Hi Tim, If I use dynamicMapService = new ArcGISDynamicMapServiceLayer(url); map.addLayer(dynamicMapService); then the layers are rendered using the representations. But if I add the service as a feature layer: featureLayer = new FeatureLayer(url + "13"); map.addLayer(featureLayer); then my hiking trails are represented only with a green line... Thank you for your help! Raluca
... View more
10-09-2014
08:27 AM
|
0
|
0
|
1039
|
|
POST
|
I published a map that contains layers which use representations. I want to use these layers as Feature Layers in a web map, but when I add them to the map element, the symbology is different. Is there a way to keep the representation symbology? I read here that Feature Classes take the drawing information from the server, but in my case the symbology is totally different.
... View more
10-09-2014
08:04 AM
|
0
|
4
|
1477
|
|
POST
|
Hi Vinay, did you see this library? http://tmappsevents.esri.com/stage/heatmap/ You can use it to create a heatmap of a feature layer that you published with ArcGIS Server like this one: http://servicesbeta.esri.com/arcgis/rest/services/SanFrancisco/SFStreetTreesRendered/MapServer/0 I haven't really used it but I think you can also load your data as javascript objects? And yes, heatmap is actually a density map -> density is mapped to colors. Hope this helps, Raluca
... View more
05-30-2014
12:52 AM
|
0
|
0
|
392
|
|
POST
|
Hi Tim, Thanks for your answer! My problem is that I want the layer to be loaded too when I run the initialize function. So do you think that adding event listeners like this is correct? map.on("load", function (){
layer.on("load", function() {initialize();} )
} ); My second question is if it would be ok to write the initialize function outside of this main function that I use to define the map and the layers..then the map and the layers should be global variables?..something like this: require (["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "dojo/domReady!"],
function (Map, DynamicLayer ) {
map = new Map("mapCanvas", options);
map.on("load", function(){initialize()})
layer = new DynamicLayer("http://....");
})
function initialize () {
//do something with the layer
}
The reason why I am asking this is because I have a lot of functions that I create and I don't want to nest them all inside of this require() function. But I am not really sure how it is better. Thanks again! Raluca
... View more
05-27-2014
04:50 AM
|
0
|
0
|
629
|
|
POST
|
Hi, I have 2 questions related to the structure of my code: 1. I define a map and a dynamic layer and then I add a function that will be executed when both the layer and the map are loaded. In the beginning I added an event listener to the map that adds an event listener to the layer that executes the function. Is that correct? My problem is that the function initializeThings sometimes gets executed, sometimes doesn't. I haven't figured out a pattern for when it does and when not, but I assume it has something to do with these event listeners. In the end I set the event listener just on the layer, but still sometimes the function doesn't get executed. 2. Is it correct to "unnest" my functions from this main function(Map, DynamicLayer )? At the moment all my functions are inside this main function and I am not sure if that is the best practice. require (["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "dojo/domReady!"], function (Map, DynamicLayer ) { var map = new Map("mapCanvas", options); var layer = new DynamicLayer("http://...."); function initializeThings() { } //map.on("load", function (){layer.on("load", function() {initializeThings();} )} ); layer.on("load", function() {inititializeThings();} ); })
... View more
05-26-2014
11:41 PM
|
0
|
3
|
987
|
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|