tilemill-project / tilemill

TileMill is a modern map design studio
https://tilemill-project.github.io/tilemill/
BSD 3-Clause "New" or "Revised" License
3.12k stars 528 forks source link

Ability to hide layers #172

Closed kkaefer closed 12 years ago

ajashton commented 13 years ago

Why did this get closed? It would be extremely useful, and is already a feature of Mapnik XML (<Layer status="off">).

Matsglobetrotter commented 13 years ago

Maybe that will also help with the issue 380 which casn then be closed if this one remain open :-)

springmeyer commented 13 years ago

@ajashton - mapnik's behavior if status=off is actually to still try to parse the layer/ds definition (which I've never liked http://trac.mapnik.org/ticket/153 and just needs a bit of attention to resolve now).

So, anyway, we could fix this so that status=off would work, but until then, or better in general carto could just skip creating any entry in the XML for that layer that is disabled.

I think in general giving thought to a several different kinds of layer statuses would also be good: for example it might be useful to be able to render a layer invisibly (so that collision works in relation to it) but the actual styles are not painted (a bit like display:none but toggle able at the layer level)

Matsglobetrotter commented 13 years ago

I like the idea of several layer statuses also on, off, invisible with collisions enabled( as per stylesheet) are essential.

I find it very useful when creating a baselayer while trying to make a set of 4-5 overlays that should work both independently on the baselayer as well as combined all together on the same baselayer. I for example use opacity .25 and marker color red to show gaps in different modalities we work. When overlaying several layers I then check that it gives the right color change with the mixing of layer colors. either it end up getting 100% red or it changes colors. That makes it very fast to show serious gaps in the interventions we do.Tthen ofcourse I want to export only the particular layer I worked on. (while still having all the data in the same stylesheet.)

ajashton commented 13 years ago

Could we start with a simple implementation of Mapnik's status=off? I've created a patch that adds this basic functionality - if there aren't serious issues with it I'd love to see this feature implemented.

misterboo commented 12 years ago

+1 for layer on/off

I use that feature a lot specialy in big projects with many layers. It is easier to works if you can enable/disable layers. Until now i used the patch from ajashton without any problems.

With the new plugin interface i have to adapt the patch. Any chance that layer on/off will be soon in tilemill? I think ist is a very needed feature.

mediafactory commented 12 years ago

+1 for layer on/off like in PhotoShop this is a must for building beautiful maps :-) layers (if loaded from db) have many properties - so adding / deleting is not an option

jacobSingh commented 12 years ago

Big +1 from me. I'd like to even test this, but I don't see any instructions for running tilemill gui from the CLI. I'm on a mac

springmeyer commented 12 years ago

@misterboo - do you have an updated patch against master? If not I will look at updating and applying.

jeffschuler commented 12 years ago

Rerolled against masters: https://gist.github.com/2919140 It works; thanks @ajashton!

jeffschuler commented 12 years ago

I think this may have already saved me more time than it took to reroll the patch. :)