Add graphic layers
In Silverlight viewer, I can add graphic layers using the following code:
GraphicsLayer tempGraphicsLayer;
tempGraphicsLayer = new GraphicsLayer();
tempGraphicsLayer.ID = "Candidate Points";
Site.Map.Layers.Add(tempGraphicsLayer);
Anyone knows the equivalent javascript code for the JS viewser? Thanks,
0
-
According to LG, "Currently, there are no plans to implement this issue. You can follow the issue ID: GVH-2942. (https://support.geocortex.com/betaGSCForum?sub-nav=forum&main-nav=beta&#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=90660000000TSEzAAO) "
We are working on our own implementation.0 -
The equivalent JavaScript to add a GraphicsLayer is var tempGraphicsLayer = new esri.layers.GraphicsLayer(); tempGraphicsLayer.id = "Candidate Points"; site.map.addLayer(tempGraphicsLayer);
The post that Tom refers to is specifically related to getting a Graphics Layer that was added to the map on the fly to also appear in the layer list. There is no support for this yet.
--Ryan0 -
Tom - Thank you for your answer. I will follow up on this issue.
Ryan - Thank you for your explanation. It turns out I tried to addLayer in the Activated event of a new module and that time the esrimap is not fully initiallized yet. I moved the code after esrimap has been fully intialized and it works now.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare