Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

Rename "background" to "cover" or "fill" #219

Closed
edenh opened this issue Nov 19, 2014 · 11 comments
Closed

Rename "background" to "cover" or "fill" #219

edenh opened this issue Nov 19, 2014 · 11 comments

Comments

@edenh
Copy link
Contributor

edenh commented Nov 19, 2014

Background is misleading because you can have many of them and they don't have to be "in the back". Let's rename to "cover".

@yhahn
Copy link
Member

yhahn commented Nov 20, 2014

Note: similar concept in Photoshop is called a Fill layer (http://www.dummies.com/how-to/content/how-to-use-fill-layers-in-photoshop-cs6.html)

@edenh edenh mentioned this issue Jan 22, 2015
Merged
@mourner
Copy link
Member

mourner commented Jan 22, 2015

Is there an actual use case for many backgrounds or putting background in a different place? Cover doesn't sounds very intuitive to me... I'd rather throw an error if there are several backgrounds or if it's not in the back, and keep "background" name.

@edenh
Copy link
Contributor Author

edenh commented Jan 22, 2015

Multiple background layers is useful. For example, a background layer with a transparent background-image with another solid color background layer underneath. Also, it is useful whenever you want to "tint" the entire map or a portion by applying a semi-transparent background layer higher up in the stack.

@nickidlugash
Copy link
Contributor

I would be amenable to "Fill" layer if we weren't already using this layer name for something else...perhaps regardless of whether we implement polygon fills and lines in one layer (#223), we can still rename the current "fill" layer to "polygon" layer and rename "background" to "fill"? Too confusing?

@edenh
Copy link
Contributor Author

edenh commented Jan 22, 2015

I tend to think of background layers in terms of the css property: background-size: "cover".

@ljbade
Copy link

ljbade commented Jan 22, 2015

What happens in the last background layer is transparent? I guess the glClearColor comes through?

@jfirebaugh
Copy link
Contributor

I was thinking along the same lines as @nickidlugash. This doesn't unlock any new capabilities, so let's pause on it until we see where #223 ends up.

@tmcw tmcw added the minor label Mar 18, 2015
@jfirebaugh
Copy link
Contributor

We should do this for v9, and then reintroduce background as a style-wide global property. Meanwhile cover layers should require a source, and only render on loaded tiles.

That enables mapbox/mapbox-gl-js#3280 / mapbox/mapbox-gl-native#119.

@kkaefer
Copy link
Member

kkaefer commented Oct 4, 2016

Why should they require a source?

@jfirebaugh
Copy link
Contributor

So that you can have two different "backgrounds":

  • A base color or grid that shows up behind unloaded tiles
  • A "land" background that shows up on loaded tiles where there are no other features

@lucaswoj lucaswoj changed the title Rename "background" to "cover" Rename "background" to ("fill"/"cover"), rename "fill" to "polygon" Dec 21, 2016
@lucaswoj lucaswoj changed the title Rename "background" to ("fill"/"cover"), rename "fill" to "polygon" Rename "background" to "cover" or "fill" Dec 21, 2016
@lucaswoj
Copy link

lucaswoj commented Feb 1, 2017

This issue was moved to mapbox/mapbox-gl-js#4084

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

No branches or pull requests

9 participants