Spectrum Spatial (SSA/LIM)

 View Only
  • 1.  Get annotations in javascript extensions

    Posted 10-01-2019 04:11
    Hello,

    In javascript, I would like to know if it is possible to get annotations from the map project?

    Thanks you,

    Augustin Boyer

    ------------------------------
    Augustin Boyer
    GEO RM
    Jaunay-Marigny
    ------------------------------


  • 2.  RE: Get annotations in javascript extensions

    Employee
    Posted 10-01-2019 10:14
    Hi Augustin,

    Can you please provide more details about the requirement? Spectrum Spatial Analyst is Angular based application. With the help of its extensible framework, it is possible for developers to write Typescript components that can access annotations and develop several other capabilities. 

    We'll be able to provide guidance if we know more about your use case. 

    Thanks,
    Vishwas 


    ------------------------------
    Vishwas Gupta
    Pitney Bowes Software India Pvt. Lt
    NOIDA
    ------------------------------



  • 3.  RE: Get annotations in javascript extensions

    Posted 10-02-2019 02:55
    Hi Vishwas, 

    Thanks for your quick answer,

    The user import a client file in SSA (ie xlsx or csv), geocode points. I need to get the created annotation layers from it. I tried 
    this.mapService.getLayersByType(SERVICETYPE.Annotations) and  this.mapService.getLayersByType(SERVICETYPE.Annotations_layers) but it returns nothing. So, I would like to know how to get an annotation layer created from client file.

    Thanks you,

    Augustin


    ------------------------------
    Augustin Boyer
    GEO RM
    Jaunay-Marigny
    ------------------------------



  • 4.  RE: Get annotations in javascript extensions

    Employee
    Posted 10-03-2019 03:26
    Hi Augustin,


    You can get all the map layers by following piece of code - 

    const mapLayers = this.mapService.getMap().getLayers().getArray();

    Once you have an array of all map layers, you need to filter the one that you are interested in. Please try and update if this does not help.

    Regards,

    Vishwas 



    ------------------------------
    Vishwas Gupta
    Pitney Bowes Software India Pvt. Lt
    NOIDA
    ------------------------------