POST
|
Hmm, these comments does give me some insight, super thanks guys! I will work on some solution based on your inputs!
... View more
03-20-2016
11:28 PM
|
0
|
0
|
849
|
POST
|
Hmm ok, I guess I had to rework the component then, but thanks, that's good information to know kmllayer has this limitation
... View more
12-28-2015
06:10 AM
|
0
|
0
|
819
|
POST
|
Hello Robert, super thanks for the rework solution! Hmm while it is working, however I'm working on a component that will create and store the layer instance instead of creating each time the layer is shown. This mean new KMLLayer(...) will only be executed once during startup. I tried modifying the rework solution such that new KMLLayer(...) is executed only once but alas the problem returns. Is there anyway I can get a KMLLayer to be created only once and used in subsequent add / remove operations? FeatureLayer does work great though (no such problem). To make things simple, I updated the fiddle, thanks! https://jsfiddle.net/L5pyvezt/2
... View more
12-28-2015
02:09 AM
|
0
|
2
|
819
|
POST
|
Hi, I wish to create a function to change basemap. To test the concept, I created a map and added a ArcGISTiledMapServiceLayer var tiled = new ArcGISTiledMapServiceLayer('http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer'); Next, I will remove the layer and add a ArcGISImageServiceLayer to stimulate a change basemap action var image = new ArcGISImageServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer", { imageServiceParameters: params, opacity: 0.75 }); What I realised is after these [adding tiled, removing tiled, adding image] actions, no layers will be rendered I tested other scenarios and these are the results: 1) If I do not remove the tiled layer, both layers get rendered
2) If I add only image layer, image layer get rendered
3) If I add only tiled layer, tiled layer get rendered Do you guys have any advice as to why I cannot perform a remove layer action? To make this question understandable, I created a sample fiddle that can illustrate my case. Simply remove the removeLayer comment in the fiddle and run it. You will notice as mentioned, nothing will be rendered. https://jsfiddle.net/82qjh0wg/
... View more
12-26-2015
12:36 AM
|
0
|
2
|
2706
|
POST
|
Hi, I'm trying to make a layer list with checkboxes to turn on/off layers (TOC). My layer list need to support KML layer. I make a very simple example to add and remove kml layer using the online example https://developers.arcgis.com/javascript/jssamples/layers_kml.html However I realise only the initial adding and removing of layer works. The 2nd time I add the kml layer, it will not be rendered. To make things easy, I created a jsfiddle @ https://jsfiddle.net/L5pyvezt/1/ In this fiddle, there are 2 buttons on top. When you click on add, realise that an orange box will be rendered When you click on remove, the orange box will be removed When you click on add again, it is expected that the orange box will be re-rendered but alas, it did not. (Warning: do not add, remove, add, remove too many time, for some unknown reason, although the codes are so minimal, it will crash your browser) Does anyone have any advice to this strange behavior? Some extra information: 1) The same code works for feature layer 2) Calling kmllayer.refresh() works
... View more
12-26-2015
12:29 AM
|
0
|
5
|
3757
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|