Comments (4)
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.
It worked. Thanks again.
from fgpv-vpgf.
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.
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)
- Feature Layer Initial Filter is not working
- Documentation: broken links for samples, sample configs HOT 2
- map layer checkbox event HOT 7
- Map loads in certain browsers HOT 6
- Basemap accepted endpoints HOT 9
- layers showing as radio button instead of checkboxes in grouped layers HOT 1
- WCAG: Implement alt tags in Help documents HOT 4
- Remove HTTP URL trickery HOT 1
- RAMP load times HOT 15
- RAMP adding/removing scripts to the html document HOT 5
- Update file-saver HOT 1
- Demo Build process is broken HOT 1
- Reporting a vulnerability HOT 1
- Symbol failures when default symbol has no label HOT 1
- Services with reordered indexes fail
- The datatable causes infinite queries for map service having Data operation disabled HOT 1
- Fullscreen service bug with multiple ramps
- Grid accessibility on Storylines
- Pygeoapi update breaking WFS functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fgpv-vpgf.