diff --git a/src/components/Button.jsx b/src/components/Button.jsx index e7690074..0d350b0d 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -9,12 +9,14 @@ class Button extends React.Component { onClick: PropTypes.func, style: PropTypes.object, className: PropTypes.string, - children: PropTypes.node + children: PropTypes.node, + disabled: PropTypes.bool, } render() { return - if (this.props.fieldSpec['property-function'] && ['piecewise-constant', 'interpolated'].indexOf(this.props.fieldSpec['function']) !== -1) { + if (this.props.fieldSpec['property-type'] === 'data-driven') { makeDataButton = + diff --git a/src/config/styles.json b/src/config/styles.json index 45f07ebc..8f922f54 100644 --- a/src/config/styles.json +++ b/src/config/styles.json @@ -34,5 +34,29 @@ "title": "Empty Style", "url": "https://rawgit.com/maputnik/editor/master/src/config/empty-style.json", "thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAQAAAAHDYbIAAAAEUlEQVR42mP8/58BDhiJ4wAA974H/U5Xe1oAAAAASUVORK5CYII=" + }, + { + "id": "os-zoomstack-outdoor", + "title": "Zoomstack Outdoor", + "url": "https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-outdoor/style.json", + "thumbnail": "https://maputnik.github.io/thumbnails/os-zoomstack-outdoor.png" + }, + { + "id": "os-zoomstack-road", + "title": "Zoomstack Road", + "url": "https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-road/style.json", + "thumbnail": "https://maputnik.github.io/thumbnails/os-zoomstack-road.png" + }, + { + "id": "os-zoomstack-light", + "title": "Zoomstack Light", + "url": "https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-light/style.json", + "thumbnail": "https://maputnik.github.io/thumbnails/os-zoomstack-light.png" + }, + { + "id": "os-zoomstack-night", + "title": "Zoomstack Night", + "url": "https://s3-eu-west-1.amazonaws.com/tiles.os.uk/styles/open-zoomstack-night/style.json", + "thumbnail": "https://maputnik.github.io/thumbnails/os-zoomstack-night.png" } ] diff --git a/src/config/tilesets.json b/src/config/tilesets.json index 11507c8e..3973b585 100644 --- a/src/config/tilesets.json +++ b/src/config/tilesets.json @@ -1,7 +1,7 @@ { "openmaptiles": { "type": "vector", - "url": "https://free.tilehosting.com/data/v3.json?key={key}", + "url": "https://maps.tilehosting.com/data/v3.json?key={key}", "title": "OpenMapTiles" }, "thunderforest_transport": { @@ -13,5 +13,10 @@ "type": "vector", "url": "https://tile.thunderforest.com/thunderforest.outdoors-v1.json?apikey={key}", "title": "Thunderforest Outdoors (heavy)" + }, + "open_zoomstack": { + "type": "vector", + "url": "https://s3-eu-west-1.amazonaws.com/tiles.os.uk/data/vector/open-zoomstack/config.json", + "title": "OS Open Zoomstack" } } diff --git a/src/styles/_components.scss b/src/styles/_components.scss index 302ec528..58ab88f0 100644 --- a/src/styles/_components.scss +++ b/src/styles/_components.scss @@ -77,6 +77,12 @@ background-color: lighten($color-midgray, 12); color: $color-white; } + + &:disabled { + background-color: darken($color-midgray, 5); + color: $color-midgray; + cursor: not-allowed; + } } .maputnik-big-button { diff --git a/src/styles/_layer.scss b/src/styles/_layer.scss index 391c66a6..45af9ac1 100644 --- a/src/styles/_layer.scss +++ b/src/styles/_layer.scss @@ -58,22 +58,33 @@ } } + .maputnik-layer-list-icon-action { + background: initial; + border: none; + padding: 0 2px; + + svg { + fill: darken($color-lowgray, 20); + + &:hover { + fill: $color-white; + } + } + } + + .maputnik-layer-list-icon-action__visibility--hide { + display: block; + } + .maputnik-layer-list-item:hover, .maputnik-layer-list-item-selected { background-color: lighten($color-black, 2); .maputnik-layer-list-icon-action { display: block; - background: initial; - border: none; - padding: 0 2px; - } - .maputnik-layer-list-icon-action svg { - fill: darken($color-lowgray, 0.5); - - &:hover { - fill: $color-white; + svg { + fill: darken($color-lowgray, 0.5); } } } diff --git a/src/styles/_toolbar.scss b/src/styles/_toolbar.scss index 70ae9861..3a0b3487 100644 --- a/src/styles/_toolbar.scss +++ b/src/styles/_toolbar.scss @@ -80,6 +80,10 @@ } } +.maputnik-toolbar-name { + text-transform: capitalize; +} + .maputnik-toolbar-version { font-size: 10px; margin-left: 4px;