Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

geojson visibility #334

Open
cyrilchapon opened this issue Apr 7, 2017 · 0 comments
Open

geojson visibility #334

cyrilchapon opened this issue Apr 7, 2017 · 0 comments

Comments

@cyrilchapon
Copy link

cyrilchapon commented Apr 7, 2017

I use nested geojson stuff :

<leaflet
  ...
  geojson="map.geojson"
  geojson-nested="true"
  ...>
</leaflet>
    $scope.map = {
      ...
      geojson: {
        ways: _.extend({}, mapStyles.ways, {
          name:'ways',
          visible: true
        })
      },
      ...
    };

And visible toggle doesn't work.

Even worse, if I map.removeLayer(<mylayer>) (which works), when I update $scope.map.geojson.ways.data, it readds the layer to the map.


I also tried

    $scope.map = {
      ...
      geojson: {
        ways: _.extend({}, mapStyles.ways, {
          name:'ways',
          visible: false, // <--- notice this
          layerOptions: {
            visible: false // <--- and this
          },
          layerOptions: {
            visible: false // <--- and this
          }
        })
      },
      ...
    };

None worked


I didn't try non-nested geojson

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant