Zum Hauptinhalt gehen

Get the ESRI map

Kommentare

9 Kommentare

  • Permanently deleted user

    I use

    var esrimap = this.app.site.getMap();

    0
  • Permanently deleted user

    Hello Vincent and Clark, 

    As a caveat to what Jason mentioned, this.app is only defined from within the scope of Views, ViewModels and Modules. Under which conditions are you attempting to access the map? This may help me in helping you.

    0
  • Permanently deleted user

    Thanks for the response Jamie, I'll try that in one of my custom module. 

    I want :

    1. the users to be able to add any new layers from a map service of their choice (Ex.: http://www.[...]/rest/services/Buildings/MapServer/0). I intend to simply use map.addLayer(myNewLayer); 
    2. to add text annotations on the map using var gra = new esri.Graphic(pt,textSymbol);  map.graphics.add(gra);

    I didn't find any Geocortex commands or modules to do that in the HTML5 viewer, am I wrong?

    Thanks!

    Vincent

    0
  • Permanently deleted user

    Thanks Vincent, 

    It sounds to me like you are taking the right approach for what you're looking to accomplish.

    For adding text annotations, we do have an AddTextMarkup command in the upcoming 1.2 version (which is similar to the same command in the Silverlight viewer), which maybe useful depending on what you're doing, as it prompts the user for the text to add.  If the text will be provided programmatically, I would probably opt for your solution.

    I hope that helps

    - Jamie

    0
  • Permanently deleted user

    Yup, it's working great! One thing, the table of content is not getting updated after adding a new layer. Any thoughts about that? Maybe it's not possible since the TOC might be referring to the site.xml file.

    I'll wait for the AddTextMarkup  command in the 1.2 version. 

    Thanks for your help!

    Vincent

    0
  • Permanently deleted user

    Hi Vincent,

    Table of content (aka Simple Layer List) is a single snapshot of your map configuration in your site which includes map services and layers.

    It is not actively listening to map events like LayerAddedEvent and such and consequently does not react to those events.

    Hopefully we will improve that functionality in future releases or introduce a feature like "Add Map Layer" which exists in Silverlight Viewer.

     

    Cheers

    0
  • Permanently deleted user

    Is it possible now to add layers to the map dynamically in 2.0 or 2.1 (i.e. without setting the layer in advance in GE) and that they show up in the TOC? Can we do that by JavaScript? Thanks!

    0
  • Kevin Penner

    Hi Vincent,

    This is not possible in the 2.0 or 2.1 viewers. That being said, there has been some work and will likely continue to be developments in that area. I personally did some work very recently that could help the Layer List and Legend update to respect on-the-fly mapservice changes, but it is not yet possible to do what you want. 

    Cheers,

    Kevin

     

    0
  • Permanently deleted user

    Hi Kevin , 

    i was gonna ask the same question , now after almost 1 month from your post , Is there any way for me to Make the SimpleLayerList able to read my Map Services added on fly?? any work around ??

    And also let me know where does it read from ?? 

    Waiting for Answer 

    Thanks In Advance.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.