Spectrum Spatial (SSA/LIM)

Expand all | Collapse all

How to delete/refresh vector layers with Angular component

Jump to Best Answer
  • 1.  How to delete/refresh vector layers with Angular component

    Posted 04-01-2019 10:14
    Hello!

    I need to update vector layers automatically in SSA after running some REST services, but I haven't figured out how to do it. One option is to remove existing layer and adding layer again. Unfortunately, I haven't been successful with this task as well. Therefore, my question is, what should I do to either refresh or remove vector layer automatically using extensibility component.

    Thank you in advance.

    ------------------------------
    Ott Koik
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: How to delete/refresh vector layers with Angular component
    Best Answer

    Pitney Bowes
    Posted 04-01-2019 14:13
      |   view attached
    Hi Ott,
    is this a vector layer coming from Spectrum? If yes, make sure you have set the caching time for the layer to 0 (zero). This will make sure, the browser does not cache the tiles and next time you pan the map, the map images of the layer gets refreshed.

    I have written an extension for refreshing Spectrum layers on click. It is not automatic yet, but you might improve my extension.
    It is attached. Extract the zip file to the folder customerconfigurations\analyst\theme\extensions.
    It creates a folder app with a subfolder layerRefresh. Within the app folder you find a sample CustomAnalystModuleConfig.json file. Use the entry to add this to your existing file. It will add a Refresh icon to the banner and a Refresh item to the layers 3 dot menu.

    Extensibility must be enabled in shared.properties.

    Let me know if this works for you.

    Regards

    Andreas


    ------------------------------
    Andreas Homa
    PITNEY BOWES SOFTWARE, INC
    Troy NY
    ------------------------------

    Attachment(s)

    zip
    layerRefresh.zip   5K 1 version


  • 3.  RE: How to delete/refresh vector layers with Angular component

    Posted 04-02-2019 05:41
    Hi!

    Thank you for your answer. It seems to look like setting caching time actually does the trick for me at the moment and there is no reason to refresh layers after all. But I will definitely try this component in the future as well. Thank you again for fast and really helpful answer.

    Best regards,
    Ott

    ------------------------------
    Ott Koik
    Knowledge Community Shared Account
    ------------------------------