GithubHelp home page GithubHelp logo

User selections about fgpv-vpgf HOT 4 CLOSED

prosperva avatar prosperva commented on September 23, 2024
User selections

from fgpv-vpgf.

Comments (4)

james-rae avatar james-rae commented on September 23, 2024 1

try .visibility instead of ._visibility. You might be going directly into the private variable and skipping any layer synching code within the visibility setter.

from fgpv-vpgf.

prosperva avatar prosperva commented on September 23, 2024 1

It worked. Thanks again.

from fgpv-vpgf.

james-rae avatar james-rae commented on September 23, 2024

Yes. You can grab the map via RAMP.mapById('<my map id>').
Alternately you can use the RAMP.mapInstances array, or subscribe() to the RAMP.mapAdded observable if your maps have some type of delayed loading.

Using the map API object, you can access .layers.allLayers array to get at all the layer objects.

You can then set the .visibility boolean property on any layer objects you wish to adjust. The layer objects have lots of other properties you can use to track stuff (e.g. layer id).

from fgpv-vpgf.

prosperva avatar prosperva commented on September 23, 2024

Thanks @james-rae. I was able to get the layers but setting the visibility property to false i.e. RAMP.mapById('rv-app-0').layers.allLayers[0]._visibility = true but it is not reflecting on the map, but the array does change. Any ideas?

from fgpv-vpgf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.