diff --git a/data/maps.gresource.xml b/data/maps.gresource.xml index 05f323d..ca935c6 100644 --- a/data/maps.gresource.xml +++ b/data/maps.gresource.xml @@ -9,4 +9,12 @@ icons/48/explore.svg icons/48/transit.svg + + + tiles/style.json + tiles/sprites.json + tiles/sprites@2x.json + tiles/sprites.png + tiles/sprites@2x.png + diff --git a/data/maps.gschema.xml b/data/maps.gschema.xml index 7eefd5e..8c3c5a1 100644 --- a/data/maps.gschema.xml +++ b/data/maps.gschema.xml @@ -1,7 +1,7 @@ - + @@ -37,7 +37,7 @@ Zoom level of the map last used - 'mapnik' + 'explore' Active map source The type of the map last used diff --git a/data/tiles/LICENSE.md b/data/tiles/LICENSE.md new file mode 100644 index 0000000..7061be1 --- /dev/null +++ b/data/tiles/LICENSE.md @@ -0,0 +1,39 @@ +## Code License + +The Mapbox GL Style JSON file is originally derived from [OSM Bright from Mapbox Open Styles](https://github.com/mapbox/mapbox-gl-styles/blob/master/LICENSE.md). The modified Mapbox GL Style JSON retains the same BSD license. + +> Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +> * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +* Neither the name of Mapbox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +## Design License + +The look and feel of the OSM liberty map design is also derived (although heavily altered) from [OSM Bright from Mapbox Open Styles](https://github.com/mapbox/mapbox-gl-styles/blob/master/LICENSE.md) which is licensed under the Creative Commons Attribution 3.0 license. + +The map is displaying and styling the data from [OpenMapTiles](https://openmaptiles.org/) with [CC-BY 4.0 design license](https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md). + +The products or services using this map style need to visibly credit "OpenMapTiles.org" or reference "OpenMapTiles" with a link to http://openmaptiles.org/. For a browsable electronic map based on OpenMapTiles and OpenStreetMap data, the credit should appear in the corner of the map. For example: + +[© OpenMapTiles](https://openmaptiles.org/) +[© OpenStreetMap contributors](https://www.openstreetmap.org/copyright) + +For printed and static maps a similar attribution should be made in a textual description near the image, in the same fashion as if you cite a photograph. + +## Icons + +OSM Liberty is using the [Maki POI icon set](https://github.com/mapbox/maki/blob/master/LICENSE.txt) which is licensed under CC0 1.0 Universal. + +The right arrow was derived from [Wikipedia][wiki_arrow] which is in the public domain. + +[wiki_arrow]: https://commons.wikimedia.org/wiki/File:Arrowright.svg + +## Fonts + +OSM Liberty is using the Roboto font family (Copyright 2011 Google). +Roboto is licensed under the [Apache License, Version 2.0](https://github.com/google/roboto/blob/master/LICENSE). + diff --git a/data/tiles/README.md b/data/tiles/README.md new file mode 100644 index 0000000..0e171cf --- /dev/null +++ b/data/tiles/README.md @@ -0,0 +1,14 @@ +# OSM Liberty style + +This is the vector style used in the demo. It is taken from + at commit [539d0525](https://github.com/maputnik/osm-liberty/commit/539d0525421eb5be901ede630c49947dfe5a343f), +with a few modifications: + +- Removed the Natural Earth raster layer, since libshumate doesn't support that + yet +- Removed the 3D buildings layer, since libshumate doesn't support fill-extrusion + layers yet +- Changed the tile source URL + +OSM Liberty is covered by several licenses. See LICENSE.md, which is copied +from the upstream repository. diff --git a/data/tiles/sprites.json b/data/tiles/sprites.json new file mode 100644 index 0000000..72cefa3 --- /dev/null +++ b/data/tiles/sprites.json @@ -0,0 +1,1689 @@ +{ + "aerialway_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 284, + "y": 127 + }, + "aerialway_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 80, + "y": 190 + }, + "airfield_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 299, + "y": 127 + }, + "airfield_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 99, + "y": 190 + }, + "airport_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 314, + "y": 127 + }, + "airport_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 118, + "y": 190 + }, + "alcohol_shop_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 381, + "y": 210 + }, + "alcohol_shop_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 64, + "y": 0 + }, + "america_football_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 398, + "y": 210 + }, + "america_football_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 85, + "y": 0 + }, + "amusement_park_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 415, + "y": 210 + }, + "amusement_park_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 106, + "y": 0 + }, + "aquarium_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 432, + "y": 210 + }, + "aquarium_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 0, + "y": 64 + }, + "arrow": { + "height": 7, + "pixelRatio": 1, + "width": 20, + "x": 486, + "y": 148 + }, + "art_gallery_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 449, + "y": 210 + }, + "art_gallery_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 21, + "y": 64 + }, + "attraction_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 466, + "y": 210 + }, + "attraction_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 42, + "y": 64 + }, + "bakery_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 483, + "y": 210 + }, + "bakery_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 63, + "y": 64 + }, + "bank_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 227, + "y": 229 + }, + "bank_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 84, + "y": 64 + }, + "bar_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 244, + "y": 229 + }, + "bar_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 105, + "y": 64 + }, + "baseball_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 261, + "y": 229 + }, + "baseball_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 0, + "y": 85 + }, + "basketball_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 278, + "y": 229 + }, + "basketball_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 21, + "y": 85 + }, + "beer_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 295, + "y": 229 + }, + "beer_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 42, + "y": 85 + }, + "bicycle_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 312, + "y": 229 + }, + "bicycle_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 63, + "y": 85 + }, + "bicycle_rental_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 329, + "y": 229 + }, + "bicycle_rental_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 84, + "y": 85 + }, + "building_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 329, + "y": 127 + }, + "building_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 137, + "y": 190 + }, + "bus_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 344, + "y": 127 + }, + "bus_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 156, + "y": 190 + }, + "butcher_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 346, + "y": 229 + }, + "butcher_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 105, + "y": 85 + }, + "cafe_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 363, + "y": 229 + }, + "cafe_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 0, + "y": 106 + }, + "campsite_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 380, + "y": 229 + }, + "campsite_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 21, + "y": 106 + }, + "car_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 359, + "y": 127 + }, + "car_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 175, + "y": 190 + }, + "castle_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 397, + "y": 229 + }, + "castle_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 42, + "y": 106 + }, + "cemetery_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 414, + "y": 229 + }, + "cemetery_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 63, + "y": 106 + }, + "cinema_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 431, + "y": 229 + }, + "cinema_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 84, + "y": 106 + }, + "circle-stroked_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 374, + "y": 127 + }, + "circle-stroked_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 194, + "y": 190 + }, + "circle_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 389, + "y": 127 + }, + "circle_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 213, + "y": 190 + }, + "clothing_store_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 448, + "y": 229 + }, + "clothing_store_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 105, + "y": 106 + }, + "college_11": { + "height": 16, + "pixelRatio": 1, + "width": 16, + "x": 473, + "y": 106 + }, + "college_15": { + "height": 20, + "pixelRatio": 1, + "width": 20, + "x": 0, + "y": 190 + }, + "commercial_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 404, + "y": 127 + }, + "commercial_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 232, + "y": 190 + }, + "cricket_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 465, + "y": 229 + }, + "cricket_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 126, + "y": 64 + }, + "cross_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 419, + "y": 127 + }, + "cross_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 0, + "y": 210 + }, + "dam_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 434, + "y": 127 + }, + "dam_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 19, + "y": 210 + }, + "danger_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 482, + "y": 229 + }, + "danger_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 147, + "y": 64 + }, + "default_1": { + "height": 18, + "pixelRatio": 1, + "width": 18, + "x": 152, + "y": 229 + }, + "default_2": { + "height": 18, + "pixelRatio": 1, + "width": 25, + "x": 170, + "y": 229 + }, + "default_3": { + "height": 18, + "pixelRatio": 1, + "width": 32, + "x": 195, + "y": 229 + }, + "default_4": { + "height": 18, + "pixelRatio": 1, + "width": 39, + "x": 247, + "y": 210 + }, + "default_5": { + "height": 18, + "pixelRatio": 1, + "width": 45, + "x": 286, + "y": 210 + }, + "default_6": { + "height": 18, + "pixelRatio": 1, + "width": 50, + "x": 331, + "y": 210 + }, + "dentist_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 251, + "y": 190 + }, + "dentist_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 168, + "y": 64 + }, + "doctor_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 268, + "y": 190 + }, + "doctor_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 189, + "y": 64 + }, + "dog_park_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 285, + "y": 190 + }, + "dog_park_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 210, + "y": 64 + }, + "dot_10": { + "height": 10, + "pixelRatio": 1, + "width": 10, + "x": 499, + "y": 229 + }, + "dot_11": { + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 500, + "y": 210 + }, + "dot_9": { + "height": 9, + "pixelRatio": 1, + "width": 9, + "x": 477, + "y": 148 + }, + "drinking-water_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 302, + "y": 190 + }, + "drinking_water_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 231, + "y": 64 + }, + "embassy_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 319, + "y": 190 + }, + "embassy_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 126, + "y": 85 + }, + "entrance_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 449, + "y": 127 + }, + "entrance_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 38, + "y": 210 + }, + "fast_food_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 336, + "y": 190 + }, + "fast_food_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 147, + "y": 85 + }, + "ferry_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 464, + "y": 127 + }, + "ferry_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 57, + "y": 210 + }, + "fire-station_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 353, + "y": 190 + }, + "fire-station_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 168, + "y": 85 + }, + "fuel_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 479, + "y": 127 + }, + "fuel_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 76, + "y": 210 + }, + "garden_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 370, + "y": 190 + }, + "garden_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 189, + "y": 85 + }, + "gift_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 387, + "y": 190 + }, + "gift_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 210, + "y": 85 + }, + "golf_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 404, + "y": 190 + }, + "golf_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 231, + "y": 85 + }, + "grocery_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 421, + "y": 190 + }, + "grocery_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 126, + "y": 106 + }, + "hairdresser_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 438, + "y": 190 + }, + "hairdresser_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 147, + "y": 106 + }, + "harbor_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 494, + "y": 127 + }, + "harbor_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 95, + "y": 210 + }, + "heart_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 455, + "y": 190 + }, + "heart_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 168, + "y": 106 + }, + "heliport_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 252, + "y": 148 + }, + "heliport_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 114, + "y": 210 + }, + "hospital_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 472, + "y": 190 + }, + "hospital_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 189, + "y": 106 + }, + "ice_cream_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 489, + "y": 190 + }, + "ice_cream_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 210, + "y": 106 + }, + "industry_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 267, + "y": 148 + }, + "industry_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 133, + "y": 210 + }, + "information_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 252, + "y": 64 + }, + "information_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 231, + "y": 106 + }, + "laundry_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 269, + "y": 64 + }, + "laundry_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 127, + "y": 0 + }, + "library_11": { + "height": 16, + "pixelRatio": 1, + "width": 16, + "x": 489, + "y": 106 + }, + "library_15": { + "height": 20, + "pixelRatio": 1, + "width": 20, + "x": 20, + "y": 190 + }, + "lighthouse_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 286, + "y": 64 + }, + "lighthouse_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 148, + "y": 0 + }, + "lodging_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 303, + "y": 64 + }, + "lodging_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 169, + "y": 0 + }, + "marker_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 282, + "y": 148 + }, + "marker_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 152, + "y": 210 + }, + "monument_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 320, + "y": 64 + }, + "monument_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 190, + "y": 0 + }, + "mountain_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 337, + "y": 64 + }, + "mountain_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 211, + "y": 0 + }, + "museum_11": { + "height": 16, + "pixelRatio": 1, + "width": 16, + "x": 252, + "y": 127 + }, + "museum_15": { + "height": 20, + "pixelRatio": 1, + "width": 20, + "x": 40, + "y": 190 + }, + "music_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 354, + "y": 64 + }, + "music_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 232, + "y": 0 + }, + "park_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 371, + "y": 64 + }, + "park_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 0, + "y": 127 + }, + "parking_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 297, + "y": 148 + }, + "parking_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 171, + "y": 210 + }, + "parking_garage_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 312, + "y": 148 + }, + "parking_garage_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 190, + "y": 210 + }, + "pedestrian_polygon": { + "height": 64, + "pixelRatio": 1, + "width": 64, + "x": 0, + "y": 0 + }, + "pharmacy_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 388, + "y": 64 + }, + "pharmacy_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 21, + "y": 127 + }, + "picnic_site_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 405, + "y": 64 + }, + "picnic_site_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 42, + "y": 127 + }, + "pitch_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 422, + "y": 64 + }, + "pitch_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 63, + "y": 127 + }, + "place_of_worship_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 439, + "y": 64 + }, + "place_of_worship_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 84, + "y": 127 + }, + "playground_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 456, + "y": 64 + }, + "playground_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 105, + "y": 127 + }, + "police_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 473, + "y": 64 + }, + "police_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 126, + "y": 127 + }, + "post_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 490, + "y": 64 + }, + "post_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 147, + "y": 127 + }, + "prison_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 252, + "y": 85 + }, + "prison_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 168, + "y": 127 + }, + "railway_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 327, + "y": 148 + }, + "railway_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 209, + "y": 210 + }, + "railway_light_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 342, + "y": 148 + }, + "railway_light_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 228, + "y": 210 + }, + "railway_metro_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 357, + "y": 148 + }, + "railway_metro_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 0, + "y": 229 + }, + "ranger_station_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 269, + "y": 85 + }, + "ranger_station_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 189, + "y": 127 + }, + "religious_christian_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 286, + "y": 85 + }, + "religious_christian_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 210, + "y": 127 + }, + "religious_jewish_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 303, + "y": 85 + }, + "religious_jewish_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 231, + "y": 127 + }, + "religious_muslim_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 320, + "y": 85 + }, + "religious_muslim_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 0, + "y": 148 + }, + "restaurant_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 337, + "y": 85 + }, + "restaurant_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 21, + "y": 148 + }, + "roadblock_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 354, + "y": 85 + }, + "roadblock_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 42, + "y": 148 + }, + "rocket_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 371, + "y": 85 + }, + "rocket_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 63, + "y": 148 + }, + "school_11": { + "height": 16, + "pixelRatio": 1, + "width": 16, + "x": 268, + "y": 127 + }, + "school_15": { + "height": 20, + "pixelRatio": 1, + "width": 20, + "x": 60, + "y": 190 + }, + "shelter_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 388, + "y": 85 + }, + "shelter_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 84, + "y": 148 + }, + "shop_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 405, + "y": 85 + }, + "shop_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 105, + "y": 148 + }, + "skiing_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 422, + "y": 85 + }, + "skiing_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 126, + "y": 148 + }, + "soccer_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 439, + "y": 85 + }, + "soccer_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 147, + "y": 148 + }, + "square-stroke_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 372, + "y": 148 + }, + "square-stroke_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 19, + "y": 229 + }, + "square_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 387, + "y": 148 + }, + "square_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 38, + "y": 229 + }, + "stadium_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 456, + "y": 85 + }, + "stadium_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 168, + "y": 148 + }, + "star-stroke_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 402, + "y": 148 + }, + "star-stroke_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 57, + "y": 229 + }, + "star_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 417, + "y": 148 + }, + "star_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 76, + "y": 229 + }, + "suitcase_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 473, + "y": 85 + }, + "suitcase_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 189, + "y": 148 + }, + "sushi_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 490, + "y": 85 + }, + "sushi_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 210, + "y": 148 + }, + "swimming_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 252, + "y": 106 + }, + "swimming_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 231, + "y": 148 + }, + "telephone_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 269, + "y": 106 + }, + "telephone_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 0, + "y": 169 + }, + "tennis_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 286, + "y": 106 + }, + "tennis_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 21, + "y": 169 + }, + "theatre_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 303, + "y": 106 + }, + "theatre_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 42, + "y": 169 + }, + "toilet_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 320, + "y": 106 + }, + "toilet_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 63, + "y": 169 + }, + "town_hall_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 337, + "y": 106 + }, + "town_hall_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 84, + "y": 169 + }, + "triangle_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 432, + "y": 148 + }, + "triangle_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 95, + "y": 229 + }, + "triangle_stroked_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 447, + "y": 148 + }, + "triangle_stroked_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 114, + "y": 229 + }, + "veterinary_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 354, + "y": 106 + }, + "veterinary_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 105, + "y": 169 + }, + "volcano_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 371, + "y": 106 + }, + "volcano_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 126, + "y": 169 + }, + "warehouse_11": { + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 462, + "y": 148 + }, + "warehouse_15": { + "height": 19, + "pixelRatio": 1, + "width": 19, + "x": 133, + "y": 229 + }, + "waste_basket_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 388, + "y": 106 + }, + "waste_basket_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 147, + "y": 169 + }, + "water_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 405, + "y": 106 + }, + "water_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 168, + "y": 169 + }, + "wetland_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 422, + "y": 106 + }, + "wetland_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 189, + "y": 169 + }, + "wheelchair_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 439, + "y": 106 + }, + "wheelchair_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 210, + "y": 169 + }, + "zoo_11": { + "height": 17, + "pixelRatio": 1, + "width": 17, + "x": 456, + "y": 106 + }, + "zoo_15": { + "height": 21, + "pixelRatio": 1, + "width": 21, + "x": 231, + "y": 169 + } +} \ No newline at end of file diff --git a/data/tiles/sprites.png b/data/tiles/sprites.png new file mode 100644 index 0000000..54aa199 Binary files /dev/null and b/data/tiles/sprites.png differ diff --git a/data/tiles/sprites@2x.json b/data/tiles/sprites@2x.json new file mode 100644 index 0000000..69dc186 --- /dev/null +++ b/data/tiles/sprites@2x.json @@ -0,0 +1,1689 @@ +{ + "aerialway_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 568, + "y": 254 + }, + "aerialway_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 160, + "y": 380 + }, + "airfield_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 598, + "y": 254 + }, + "airfield_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 198, + "y": 380 + }, + "airport_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 628, + "y": 254 + }, + "airport_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 236, + "y": 380 + }, + "alcohol_shop_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 762, + "y": 420 + }, + "alcohol_shop_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 128, + "y": 0 + }, + "america_football_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 796, + "y": 420 + }, + "america_football_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 170, + "y": 0 + }, + "amusement_park_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 830, + "y": 420 + }, + "amusement_park_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 212, + "y": 0 + }, + "aquarium_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 864, + "y": 420 + }, + "aquarium_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 0, + "y": 128 + }, + "arrow": { + "height": 14, + "pixelRatio": 2, + "width": 40, + "x": 972, + "y": 296 + }, + "art_gallery_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 898, + "y": 420 + }, + "art_gallery_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 42, + "y": 128 + }, + "attraction_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 932, + "y": 420 + }, + "attraction_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 84, + "y": 128 + }, + "bakery_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 966, + "y": 420 + }, + "bakery_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 126, + "y": 128 + }, + "bank_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 454, + "y": 458 + }, + "bank_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 168, + "y": 128 + }, + "bar_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 488, + "y": 458 + }, + "bar_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 210, + "y": 128 + }, + "baseball_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 522, + "y": 458 + }, + "baseball_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 0, + "y": 170 + }, + "basketball_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 556, + "y": 458 + }, + "basketball_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 42, + "y": 170 + }, + "beer_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 590, + "y": 458 + }, + "beer_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 84, + "y": 170 + }, + "bicycle_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 624, + "y": 458 + }, + "bicycle_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 126, + "y": 170 + }, + "bicycle_rental_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 658, + "y": 458 + }, + "bicycle_rental_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 168, + "y": 170 + }, + "building_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 658, + "y": 254 + }, + "building_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 274, + "y": 380 + }, + "bus_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 688, + "y": 254 + }, + "bus_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 312, + "y": 380 + }, + "butcher_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 692, + "y": 458 + }, + "butcher_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 210, + "y": 170 + }, + "cafe_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 726, + "y": 458 + }, + "cafe_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 0, + "y": 212 + }, + "campsite_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 760, + "y": 458 + }, + "campsite_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 42, + "y": 212 + }, + "car_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 718, + "y": 254 + }, + "car_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 350, + "y": 380 + }, + "castle_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 794, + "y": 458 + }, + "castle_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 84, + "y": 212 + }, + "cemetery_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 828, + "y": 458 + }, + "cemetery_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 126, + "y": 212 + }, + "cinema_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 862, + "y": 458 + }, + "cinema_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 168, + "y": 212 + }, + "circle-stroked_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 748, + "y": 254 + }, + "circle-stroked_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 388, + "y": 380 + }, + "circle_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 778, + "y": 254 + }, + "circle_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 426, + "y": 380 + }, + "clothing_store_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 896, + "y": 458 + }, + "clothing_store_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 210, + "y": 212 + }, + "college_11": { + "height": 32, + "pixelRatio": 2, + "width": 32, + "x": 946, + "y": 212 + }, + "college_15": { + "height": 40, + "pixelRatio": 2, + "width": 40, + "x": 0, + "y": 380 + }, + "commercial_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 808, + "y": 254 + }, + "commercial_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 464, + "y": 380 + }, + "cricket_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 930, + "y": 458 + }, + "cricket_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 252, + "y": 128 + }, + "cross_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 838, + "y": 254 + }, + "cross_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 0, + "y": 420 + }, + "dam_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 868, + "y": 254 + }, + "dam_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 38, + "y": 420 + }, + "danger_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 964, + "y": 458 + }, + "danger_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 294, + "y": 128 + }, + "default_1": { + "height": 36, + "pixelRatio": 2, + "width": 36, + "x": 304, + "y": 458 + }, + "default_2": { + "height": 36, + "pixelRatio": 2, + "width": 50, + "x": 340, + "y": 458 + }, + "default_3": { + "height": 36, + "pixelRatio": 2, + "width": 64, + "x": 390, + "y": 458 + }, + "default_4": { + "height": 36, + "pixelRatio": 2, + "width": 78, + "x": 494, + "y": 420 + }, + "default_5": { + "height": 36, + "pixelRatio": 2, + "width": 90, + "x": 572, + "y": 420 + }, + "default_6": { + "height": 36, + "pixelRatio": 2, + "width": 100, + "x": 662, + "y": 420 + }, + "dentist_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 502, + "y": 380 + }, + "dentist_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 336, + "y": 128 + }, + "doctor_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 536, + "y": 380 + }, + "doctor_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 378, + "y": 128 + }, + "dog_park_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 570, + "y": 380 + }, + "dog_park_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 420, + "y": 128 + }, + "dot_10": { + "height": 20, + "pixelRatio": 2, + "width": 20, + "x": 998, + "y": 458 + }, + "dot_11": { + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 1000, + "y": 420 + }, + "dot_9": { + "height": 18, + "pixelRatio": 2, + "width": 18, + "x": 954, + "y": 296 + }, + "drinking-water_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 604, + "y": 380 + }, + "drinking_water_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 462, + "y": 128 + }, + "embassy_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 638, + "y": 380 + }, + "embassy_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 252, + "y": 170 + }, + "entrance_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 898, + "y": 254 + }, + "entrance_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 76, + "y": 420 + }, + "fast_food_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 672, + "y": 380 + }, + "fast_food_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 294, + "y": 170 + }, + "ferry_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 928, + "y": 254 + }, + "ferry_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 114, + "y": 420 + }, + "fire-station_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 706, + "y": 380 + }, + "fire-station_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 336, + "y": 170 + }, + "fuel_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 958, + "y": 254 + }, + "fuel_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 152, + "y": 420 + }, + "garden_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 740, + "y": 380 + }, + "garden_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 378, + "y": 170 + }, + "gift_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 774, + "y": 380 + }, + "gift_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 420, + "y": 170 + }, + "golf_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 808, + "y": 380 + }, + "golf_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 462, + "y": 170 + }, + "grocery_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 842, + "y": 380 + }, + "grocery_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 252, + "y": 212 + }, + "hairdresser_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 876, + "y": 380 + }, + "hairdresser_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 294, + "y": 212 + }, + "harbor_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 988, + "y": 254 + }, + "harbor_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 190, + "y": 420 + }, + "heart_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 910, + "y": 380 + }, + "heart_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 336, + "y": 212 + }, + "heliport_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 504, + "y": 296 + }, + "heliport_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 228, + "y": 420 + }, + "hospital_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 944, + "y": 380 + }, + "hospital_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 378, + "y": 212 + }, + "ice_cream_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 978, + "y": 380 + }, + "ice_cream_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 420, + "y": 212 + }, + "industry_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 534, + "y": 296 + }, + "industry_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 266, + "y": 420 + }, + "information_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 504, + "y": 128 + }, + "information_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 462, + "y": 212 + }, + "laundry_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 538, + "y": 128 + }, + "laundry_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 254, + "y": 0 + }, + "library_11": { + "height": 32, + "pixelRatio": 2, + "width": 32, + "x": 978, + "y": 212 + }, + "library_15": { + "height": 40, + "pixelRatio": 2, + "width": 40, + "x": 40, + "y": 380 + }, + "lighthouse_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 572, + "y": 128 + }, + "lighthouse_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 296, + "y": 0 + }, + "lodging_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 606, + "y": 128 + }, + "lodging_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 338, + "y": 0 + }, + "marker_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 564, + "y": 296 + }, + "marker_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 304, + "y": 420 + }, + "monument_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 640, + "y": 128 + }, + "monument_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 380, + "y": 0 + }, + "mountain_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 674, + "y": 128 + }, + "mountain_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 422, + "y": 0 + }, + "museum_11": { + "height": 32, + "pixelRatio": 2, + "width": 32, + "x": 504, + "y": 254 + }, + "museum_15": { + "height": 40, + "pixelRatio": 2, + "width": 40, + "x": 80, + "y": 380 + }, + "music_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 708, + "y": 128 + }, + "music_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 464, + "y": 0 + }, + "park_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 742, + "y": 128 + }, + "park_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 0, + "y": 254 + }, + "parking_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 594, + "y": 296 + }, + "parking_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 342, + "y": 420 + }, + "parking_garage_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 624, + "y": 296 + }, + "parking_garage_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 380, + "y": 420 + }, + "pedestrian_polygon": { + "height": 128, + "pixelRatio": 2, + "width": 128, + "x": 0, + "y": 0 + }, + "pharmacy_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 776, + "y": 128 + }, + "pharmacy_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 42, + "y": 254 + }, + "picnic_site_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 810, + "y": 128 + }, + "picnic_site_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 84, + "y": 254 + }, + "pitch_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 844, + "y": 128 + }, + "pitch_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 126, + "y": 254 + }, + "place_of_worship_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 878, + "y": 128 + }, + "place_of_worship_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 168, + "y": 254 + }, + "playground_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 912, + "y": 128 + }, + "playground_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 210, + "y": 254 + }, + "police_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 946, + "y": 128 + }, + "police_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 252, + "y": 254 + }, + "post_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 980, + "y": 128 + }, + "post_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 294, + "y": 254 + }, + "prison_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 504, + "y": 170 + }, + "prison_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 336, + "y": 254 + }, + "railway_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 654, + "y": 296 + }, + "railway_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 418, + "y": 420 + }, + "railway_light_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 684, + "y": 296 + }, + "railway_light_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 456, + "y": 420 + }, + "railway_metro_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 714, + "y": 296 + }, + "railway_metro_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 0, + "y": 458 + }, + "ranger_station_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 538, + "y": 170 + }, + "ranger_station_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 378, + "y": 254 + }, + "religious_christian_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 572, + "y": 170 + }, + "religious_christian_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 420, + "y": 254 + }, + "religious_jewish_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 606, + "y": 170 + }, + "religious_jewish_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 462, + "y": 254 + }, + "religious_muslim_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 640, + "y": 170 + }, + "religious_muslim_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 0, + "y": 296 + }, + "restaurant_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 674, + "y": 170 + }, + "restaurant_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 42, + "y": 296 + }, + "roadblock_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 708, + "y": 170 + }, + "roadblock_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 84, + "y": 296 + }, + "rocket_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 742, + "y": 170 + }, + "rocket_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 126, + "y": 296 + }, + "school_11": { + "height": 32, + "pixelRatio": 2, + "width": 32, + "x": 536, + "y": 254 + }, + "school_15": { + "height": 40, + "pixelRatio": 2, + "width": 40, + "x": 120, + "y": 380 + }, + "shelter_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 776, + "y": 170 + }, + "shelter_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 168, + "y": 296 + }, + "shop_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 810, + "y": 170 + }, + "shop_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 210, + "y": 296 + }, + "skiing_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 844, + "y": 170 + }, + "skiing_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 252, + "y": 296 + }, + "soccer_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 878, + "y": 170 + }, + "soccer_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 294, + "y": 296 + }, + "square-stroke_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 744, + "y": 296 + }, + "square-stroke_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 38, + "y": 458 + }, + "square_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 774, + "y": 296 + }, + "square_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 76, + "y": 458 + }, + "stadium_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 912, + "y": 170 + }, + "stadium_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 336, + "y": 296 + }, + "star-stroke_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 804, + "y": 296 + }, + "star-stroke_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 114, + "y": 458 + }, + "star_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 834, + "y": 296 + }, + "star_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 152, + "y": 458 + }, + "suitcase_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 946, + "y": 170 + }, + "suitcase_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 378, + "y": 296 + }, + "sushi_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 980, + "y": 170 + }, + "sushi_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 420, + "y": 296 + }, + "swimming_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 504, + "y": 212 + }, + "swimming_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 462, + "y": 296 + }, + "telephone_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 538, + "y": 212 + }, + "telephone_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 0, + "y": 338 + }, + "tennis_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 572, + "y": 212 + }, + "tennis_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 42, + "y": 338 + }, + "theatre_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 606, + "y": 212 + }, + "theatre_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 84, + "y": 338 + }, + "toilet_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 640, + "y": 212 + }, + "toilet_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 126, + "y": 338 + }, + "town_hall_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 674, + "y": 212 + }, + "town_hall_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 168, + "y": 338 + }, + "triangle_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 864, + "y": 296 + }, + "triangle_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 190, + "y": 458 + }, + "triangle_stroked_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 894, + "y": 296 + }, + "triangle_stroked_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 228, + "y": 458 + }, + "veterinary_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 708, + "y": 212 + }, + "veterinary_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 210, + "y": 338 + }, + "volcano_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 742, + "y": 212 + }, + "volcano_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 252, + "y": 338 + }, + "warehouse_11": { + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 924, + "y": 296 + }, + "warehouse_15": { + "height": 38, + "pixelRatio": 2, + "width": 38, + "x": 266, + "y": 458 + }, + "waste_basket_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 776, + "y": 212 + }, + "waste_basket_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 294, + "y": 338 + }, + "water_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 810, + "y": 212 + }, + "water_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 336, + "y": 338 + }, + "wetland_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 844, + "y": 212 + }, + "wetland_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 378, + "y": 338 + }, + "wheelchair_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 878, + "y": 212 + }, + "wheelchair_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 420, + "y": 338 + }, + "zoo_11": { + "height": 34, + "pixelRatio": 2, + "width": 34, + "x": 912, + "y": 212 + }, + "zoo_15": { + "height": 42, + "pixelRatio": 2, + "width": 42, + "x": 462, + "y": 338 + } +} diff --git a/data/tiles/sprites@2x.png b/data/tiles/sprites@2x.png new file mode 100644 index 0000000..456cf03 Binary files /dev/null and b/data/tiles/sprites@2x.png differ diff --git a/data/tiles/style.json b/data/tiles/style.json new file mode 100644 index 0000000..6200032 --- /dev/null +++ b/data/tiles/style.json @@ -0,0 +1,1709 @@ +{ + "version": 8, + "name": "Granite", + "metadata": { + "maputnik:license": "https://github.com/maputnik/osm-liberty/blob/gh-pages/LICENSE.md", + "maputnik:renderer": "mbgljs", + "openmaptiles:version": "3.x" + }, + "sources": { + "openmaptiles": { + "type": "vector", + "tiles": ["https://tileserver.gnome.org/data/v3/{z}/{x}/{y}.pbf"], + "minzoom": 0, + "maxzoom": 14 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": {"background-color": "rgb(239,239,239)"} + }, + { + "id": "park", + "type": "fill", + "source": "openmaptiles", + "source-layer": "park", + "paint": { + "fill-color": "#d8e8c8", + "fill-opacity": 0.7, + "fill-outline-color": "rgba(95, 208, 100, 1)" + } + }, + { + "id": "park_outline", + "type": "line", + "source": "openmaptiles", + "source-layer": "park", + "paint": { + "line-dasharray": [1, 1.5], + "line-color": "rgba(228, 241, 215, 1)" + } + }, + { + "id": "landuse_residential", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landuse", + "maxzoom": 8, + "filter": ["==", "class", "residential"], + "paint": { + "fill-color": { + "base": 1, + "stops": [ + [9, "hsla(0, 3%, 85%, 0.84)"], + [12, "hsla(35, 57%, 88%, 0.49)"] + ] + } + } + }, + { + "id": "landcover_wood", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["all", ["==", "class", "wood"]], + "paint": { + "fill-antialias": false, + "fill-color": "hsla(98, 61%, 72%, 0.7)", + "fill-opacity": 0.4 + } + }, + { + "id": "landcover_grass", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["all", ["==", "class", "grass"]], + "paint": { + "fill-antialias": false, + "fill-color": "#68b723", + "fill-opacity": 0.5 + } + }, + { + "id": "landcover_ice", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["all", ["==", "class", "ice"]], + "paint": { + "fill-antialias": false, + "fill-color": "rgba(224, 236, 236, 1)", + "fill-opacity": 0.8 + } + }, + { + "id": "landuse_cemetery", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landuse", + "filter": ["==", "class", "cemetery"], + "paint": {"fill-color": "hsl(75, 37%, 81%)"} + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landuse", + "filter": ["==", "class", "hospital"], + "paint": {"fill-color": "#fde"} + }, + { + "id": "landuse_school", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landuse", + "filter": ["==", "class", "school"], + "paint": {"fill-color": "rgb(236,238,204)"} + }, + { + "id": "waterway_tunnel", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": ["all", ["==", "brunnel", "tunnel"]], + "paint": { + "line-color": "#a0c8f0", + "line-dasharray": [3, 3], + "line-gap-width": {"stops": [[12, 0], [20, 6]]}, + "line-opacity": 1, + "line-width": {"base": 1.4, "stops": [[8, 1], [20, 2]]} + } + }, + { + "id": "waterway_river", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": ["all", ["==", "class", "river"], ["!=", "brunnel", "tunnel"]], + "layout": {"line-cap": "round"}, + "paint": { + "line-color": "#a0c8f0", + "line-width": {"base": 1.2, "stops": [[11, 0.5], [20, 6]]} + } + }, + { + "id": "waterway_other", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": ["all", ["!=", "class", "river"], ["!=", "brunnel", "tunnel"]], + "layout": {"line-cap": "round"}, + "paint": { + "line-color": "#a0c8f0", + "line-width": {"base": 1.3, "stops": [[13, 0.5], [20, 6]]} + } + }, + { + "id": "water", + "type": "fill", + "source": "openmaptiles", + "source-layer": "water", + "filter": ["all", ["!=", "brunnel", "tunnel"]], + "paint": {"fill-color": "#8cd5ff"} + }, + { + "id": "landcover_sand", + "type": "fill", + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["all", ["==", "class", "sand"]], + "paint": {"fill-color": "rgba(247, 239, 195, 1)"} + }, + { + "id": "aeroway_fill", + "type": "fill", + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 11, + "filter": ["==", "$type", "Polygon"], + "paint": {"fill-color": "rgba(229, 228, 224, 1)", "fill-opacity": 0.7} + }, + { + "id": "aeroway_runway", + "type": "line", + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 11, + "filter": [ + "all", + ["==", "$type", "LineString"], + ["==", "class", "runway"] + ], + "paint": { + "line-color": "#f0ede9", + "line-width": {"base": 1.2, "stops": [[11, 3], [20, 16]]} + } + }, + { + "id": "aeroway_taxiway", + "type": "line", + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 11, + "filter": [ + "all", + ["==", "$type", "LineString"], + ["==", "class", "taxiway"] + ], + "paint": { + "line-color": "#f0ede9", + "line-width": {"base": 1.2, "stops": [[11, 0.5], [20, 6]]} + } + }, + { + "id": "tunnel_motorway_link_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["==", "ramp", 1], + ["==", "brunnel", "tunnel"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-dasharray": [0.5, 0.25], + "line-width": { + "base": 1.2, + "stops": [[12, 1], [13, 3], [14, 4], [20, 15]] + } + } + }, + { + "id": "tunnel_service_track_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#cfcdca", + "line-dasharray": [0.5, 0.25], + "line-width": {"base": 1.2, "stops": [[15, 1], [16, 4], [20, 11]]} + } + }, + { + "id": "tunnel_link_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "ramp", 1], ["==", "brunnel", "tunnel"]], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[12, 1], [13, 3], [14, 4], [20, 15]] + } + } + }, + { + "id": "tunnel_street_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "street", "street_limited"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#cfcdca", + "line-opacity": {"stops": [[12, 0], [12.5, 1]]}, + "line-width": { + "base": 1.2, + "stops": [[12, 0.5], [13, 1], [14, 4], [20, 15]] + } + } + }, + { + "id": "tunnel_secondary_tertiary_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": {"base": 1.2, "stops": [[8, 1.5], [20, 17]]} + } + }, + { + "id": "tunnel_trunk_primary_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[5, 0.4], [6, 0.7], [7, 1.75], [20, 22]] + } + } + }, + { + "id": "tunnel_motorway_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["!=", "ramp", 1], + ["==", "brunnel", "tunnel"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-dasharray": [0.5, 0.25], + "line-width": { + "base": 1.2, + "stops": [[5, 0.4], [6, 0.7], [7, 1.75], [20, 22]] + } + } + }, + { + "id": "tunnel_path_pedestrian", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["==", "brunnel", "tunnel"], + ["in", "class", "path", "pedestrian"] + ], + "paint": { + "line-color": "hsl(0, 0%, 100%)", + "line-dasharray": [1, 0.75], + "line-width": {"base": 1.2, "stops": [[14, 0.5], [20, 10]]} + } + }, + { + "id": "tunnel_motorway_link", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["==", "ramp", 1], + ["==", "brunnel", "tunnel"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#ffe16b", + "line-width": { + "base": 1.2, + "stops": [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]] + } + } + }, + { + "id": "tunnel_service_track", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#fff", + "line-width": {"base": 1.2, "stops": [[15.5, 0], [16, 2], [20, 7.5]]} + } + }, + { + "id": "tunnel_link", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "ramp", 1], ["==", "brunnel", "tunnel"]], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]] + } + } + }, + { + "id": "tunnel_minor", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "minor"]], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#fff", + "line-width": {"base": 1.2, "stops": [[13.5, 0], [14, 2.5], [20, 11.5]]} + } + }, + { + "id": "tunnel_secondary_tertiary", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#fff4c6", + "line-width": {"base": 1.2, "stops": [[6.5, 0], [7, 0.5], [20, 10]]} + } + }, + { + "id": "tunnel_trunk_primary", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#fff4c6", + "line-width": {"base": 1.2, "stops": [[5, 0], [7, 1], [20, 18]]} + } + }, + { + "id": "tunnel_motorway", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["!=", "ramp", 1], + ["==", "brunnel", "tunnel"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#ffdaa6", + "line-width": {"base": 1.2, "stops": [[5, 0], [7, 1], [20, 18]]} + } + }, + { + "id": "tunnel_major_rail", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-width": {"base": 1.4, "stops": [[14, 0.4], [15, 0.75], [20, 2]]} + } + }, + { + "id": "tunnel_major_rail_hatching", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": {"base": 1.4, "stops": [[14.5, 0], [15, 3], [20, 8]]} + } + }, + { + "id": "tunnel_transit_rail", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "transit"] + ], + "paint": { + "line-color": "#bbb", + "line-width": {"base": 1.4, "stops": [[14, 0.4], [15, 0.75], [20, 2]]} + } + }, + { + "id": "tunnel_transit_rail_hatching", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["==", "class", "transit"] + ], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": {"base": 1.4, "stops": [[14.5, 0], [15, 3], [20, 8]]} + } + }, + { + "id": "road_area_pattern", + "type": "fill", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "$type", "Polygon"]], + "paint": {"fill-pattern": "pedestrian_polygon"} + }, + { + "id": "road_motorway_link_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 12, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"], + ["==", "ramp", 1] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[12, 1], [13, 3], [14, 4], [20, 15]] + } + } + }, + { + "id": "road_service_track_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#cfcdca", + "line-width": {"base": 1.2, "stops": [[15, 1], [16, 4], [20, 11]]} + } + }, + { + "id": "road_link_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["!in", "class", "pedestrian", "path", "track", "service", "motorway"], + ["==", "ramp", 1] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[12, 1], [13, 3], [14, 4], [20, 15]] + } + } + }, + { + "id": "road_minor_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "minor"], + ["!=", "ramp", 1] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#cfcdca", + "line-opacity": {"stops": [[12, 0], [12.5, 1]]}, + "line-width": { + "base": 1.2, + "stops": [[12, 0.5], [13, 1], [14, 4], [20, 20]] + } + } + }, + { + "id": "road_secondary_tertiary_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "secondary", "tertiary"], + ["!=", "ramp", 1] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": {"base": 1.2, "stops": [[8, 1.5], [20, 17]]} + } + }, + { + "id": "road_trunk_primary_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[5, 0.4], [6, 0.7], [7, 1.75], [20, 22]] + } + } + }, + { + "id": "road_motorway_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"], + ["!=", "ramp", 1] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[5, 0.4], [6, 0.7], [7, 1.75], [20, 22]] + } + } + }, + { + "id": "road_path_pedestrian", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 14, + "filter": [ + "all", + ["==", "$type", "LineString"], + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "path", "pedestrian"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "hsl(0, 0%, 100%)", + "line-dasharray": [1, 0.7], + "line-width": {"base": 1.2, "stops": [[14, 1], [20, 10]]} + } + }, + { + "id": "road_motorway_link", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 12, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"], + ["==", "ramp", 1] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#ffe16b", + "line-width": { + "base": 1.2, + "stops": [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]] + } + } + }, + { + "id": "road_service_track", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#fff", + "line-width": {"base": 1.2, "stops": [[15.5, 0], [16, 2], [20, 7.5]]} + } + }, + { + "id": "road_link", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "ramp", 1], + ["!in", "class", "pedestrian", "path", "track", "service", "motorway"] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#d4d4d4", + "line-width": { + "base": 1.2, + "stops": [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]] + } + } + }, + { + "id": "road_minor", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "minor"] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#fff", + "line-width": {"base": 1.2, "stops": [[13.5, 0], [14, 2.5], [20, 18]]} + } + }, + { + "id": "road_secondary_tertiary", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "#d4d4d4", + "line-width": {"base": 1.2, "stops": [[6.5, 0], [8, 0.5], [20, 13]]} + } + }, + { + "id": "road_trunk_primary", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#d4d4d4", + "line-width": {"base": 1.2, "stops": [[5, 0], [7, 1], [20, 18]]} + } + }, + { + "id": "road_motorway", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"], + ["!=", "ramp", 1] + ], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": { + "base": 1, + "stops": [[5, "#ffe16b"], [6, "#ffe16b"]] + }, + "line-width": {"base": 1.2, "stops": [[5, 0], [7, 1], [20, 18]]} + } + }, + { + "id": "road_major_rail", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "rail"] + ], + "paint": { + "line-color": "#bbb", + "line-width": {"base": 1.4, "stops": [[14, 0.4], [15, 0.75], [20, 2]]} + } + }, + { + "id": "road_major_rail_hatching", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "rail"] + ], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": {"base": 1.4, "stops": [[14.5, 0], [15, 3], [20, 8]]} + } + }, + { + "id": "road_transit_rail", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "transit"] + ], + "paint": { + "line-color": "#bbb", + "line-width": {"base": 1.4, "stops": [[14, 0.4], [15, 0.75], [20, 2]]} + } + }, + { + "id": "road_transit_rail_hatching", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "transit"] + ], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": {"base": 1.4, "stops": [[14.5, 0], [15, 3], [20, 8]]} + } + }, + { + "id": "road_one_way_arrow", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": ["==", "oneway", 1], + "layout": {"icon-image": "arrow", "symbol-placement": "line"} + }, + { + "id": "road_one_way_arrow_opposite", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": ["==", "oneway", -1], + "layout": { + "icon-image": "arrow", + "symbol-placement": "line", + "icon-rotate": 180 + } + }, + { + "id": "bridge_motorway_link_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["==", "ramp", 1], + ["==", "brunnel", "bridge"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[12, 1], [13, 3], [14, 4], [20, 15]] + } + } + }, + { + "id": "bridge_service_track_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "service", "track"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#cfcdca", + "line-width": {"base": 1.2, "stops": [[15, 1], [16, 4], [20, 11]]} + } + }, + { + "id": "bridge_link_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "class", "link"], ["==", "brunnel", "bridge"]], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[12, 1], [13, 3], [14, 4], [20, 15]] + } + } + }, + { + "id": "bridge_street_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "street", "street_limited"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "hsl(36, 6%, 74%)", + "line-opacity": {"stops": [[12, 0], [12.5, 1]]}, + "line-width": { + "base": 1.2, + "stops": [[12, 0.5], [13, 1], [14, 4], [20, 25]] + } + } + }, + { + "id": "bridge_path_pedestrian_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["==", "brunnel", "bridge"], + ["in", "class", "path", "pedestrian"] + ], + "paint": { + "line-color": "hsl(35, 6%, 80%)", + "line-dasharray": [1, 0], + "line-width": {"base": 1.2, "stops": [[14, 1.5], [20, 18]]} + } + }, + { + "id": "bridge_secondary_tertiary_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": {"base": 1.2, "stops": [[8, 1.5], [20, 17]]} + } + }, + { + "id": "bridge_trunk_primary_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "primary", "trunk"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[5, 0.4], [6, 0.7], [7, 1.75], [20, 22]] + } + } + }, + { + "id": "bridge_motorway_casing", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["!=", "ramp", 1], + ["==", "brunnel", "bridge"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#abacae", + "line-width": { + "base": 1.2, + "stops": [[5, 0.4], [6, 0.7], [7, 1.75], [20, 22]] + } + } + }, + { + "id": "bridge_path_pedestrian", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["==", "brunnel", "bridge"], + ["in", "class", "path", "pedestrian"] + ], + "paint": { + "line-color": "hsl(0, 0%, 100%)", + "line-dasharray": [1, 0.3], + "line-width": {"base": 1.2, "stops": [[14, 0.5], [20, 10]]} + } + }, + { + "id": "bridge_motorway_link", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["==", "ramp", 1], + ["==", "brunnel", "bridge"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#ffe16b", + "line-width": { + "base": 1.2, + "stops": [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]] + } + } + }, + { + "id": "bridge_service_track", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "service", "track"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#fff", + "line-width": {"base": 1.2, "stops": [[15.5, 0], [16, 2], [20, 7.5]]} + } + }, + { + "id": "bridge_link", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "class", "link"], ["==", "brunnel", "bridge"]], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#d4d4d4", + "line-width": { + "base": 1.2, + "stops": [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]] + } + } + }, + { + "id": "bridge_street", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "minor"]], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#fff", + "line-width": {"base": 1.2, "stops": [[13.5, 0], [14, 2.5], [20, 18]]} + } + }, + { + "id": "bridge_secondary_tertiary", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#d4d4d4", + "line-width": {"base": 1.2, "stops": [[6.5, 0], [7, 0.5], [20, 10]]} + } + }, + { + "id": "bridge_trunk_primary", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "primary", "trunk"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#d4d4d4", + "line-width": {"base": 1.2, "stops": [[5, 0], [7, 1], [20, 18]]} + } + }, + { + "id": "bridge_motorway", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "motorway"], + ["!=", "ramp", 1], + ["==", "brunnel", "bridge"] + ], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#ffe16b", + "line-width": {"base": 1.2, "stops": [[5, 0], [7, 1], [20, 18]]} + } + }, + { + "id": "bridge_major_rail", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "class", "rail"], ["==", "brunnel", "bridge"]], + "paint": { + "line-color": "#bbb", + "line-width": {"base": 1.4, "stops": [[14, 0.4], [15, 0.75], [20, 2]]} + } + }, + { + "id": "bridge_major_rail_hatching", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "class", "rail"], ["==", "brunnel", "bridge"]], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": {"base": 1.4, "stops": [[14.5, 0], [15, 3], [20, 8]]} + } + }, + { + "id": "bridge_transit_rail", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "transit"], + ["==", "brunnel", "bridge"] + ], + "paint": { + "line-color": "#bbb", + "line-width": {"base": 1.4, "stops": [[14, 0.4], [15, 0.75], [20, 2]]} + } + }, + { + "id": "bridge_transit_rail_hatching", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "class", "transit"], + ["==", "brunnel", "bridge"] + ], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": {"base": 1.4, "stops": [[14.5, 0], [15, 3], [20, 8]]} + } + }, + { + "id": "building", + "type": "fill", + "source": "openmaptiles", + "source-layer": "building", + "minzoom": 13, + "paint": { + "fill-color": "hsl(35, 8%, 85%)", + "fill-outline-color": { + "base": 1, + "stops": [[13, "hsla(35, 6%, 79%, 0.32)"], [14, "hsl(35, 6%, 79%)"]] + } + } + }, + { + "id": "boundary_3", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "minzoom": 8, + "filter": ["all", ["in", "admin_level", 3, 4]], + "layout": {"line-join": "round"}, + "paint": { + "line-color": "#9e9cab", + "line-dasharray": [5, 1], + "line-width": {"base": 1, "stops": [[4, 0.4], [5, 1], [12, 1.8]]} + } + }, + { + "id": "boundary_2_z0-4", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "maxzoom": 5, + "filter": ["all", ["==", "admin_level", 2], ["!has", "claimed_by"]], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "hsl(248, 1%, 41%)", + "line-opacity": {"base": 1, "stops": [[0, 0.4], [4, 1]]}, + "line-width": {"base": 1, "stops": [[3, 1], [5, 1.2], [12, 3]]} + } + }, + { + "id": "boundary_2_z5-", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "minzoom": 5, + "filter": ["all", ["==", "admin_level", 2]], + "layout": {"line-cap": "round", "line-join": "round"}, + "paint": { + "line-color": "hsl(248, 1%, 41%)", + "line-opacity": {"base": 1, "stops": [[0, 0.4], [4, 1]]}, + "line-width": {"base": 1, "stops": [[3, 1], [5, 1.2], [12, 3]]} + } + }, + { + "id": "water_name_line", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "waterway", + "filter": ["all", ["==", "$type", "LineString"]], + "layout": { + "text-field": "{name}", + "text-font": ["Inter Regular"], + "text-max-width": 5, + "text-size": 12, + "symbol-placement": "line" + }, + "paint": { + "text-color": "#3689e6", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "water_name_point", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "water_name", + "filter": ["==", "$type", "Point"], + "layout": { + "text-field": "{name}", + "text-font": ["Inter Regular"], + "text-max-width": 5, + "text-size": 12 + }, + "paint": { + "text-color": "#3689e6", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "poi_z16", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 16, + "filter": ["all", ["==", "$type", "Point"], [">=", "rank", 20]], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name}", + "text-font": ["Inter Condensed Italic"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-size": 12 + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "poi_z15", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 15, + "filter": [ + "all", + ["==", "$type", "Point"], + [">=", "rank", 7], + ["<", "rank", 20] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name}", + "text-font": ["Inter Condensed Italic"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-size": 12 + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "poi_z14", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + ["==", "$type", "Point"], + [">=", "rank", 1], + ["<", "rank", 7] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name}", + "text-font": ["Inter Condensed Italic"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-size": 12 + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "poi_transit", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "filter": ["all", ["in", "class", "bus", "rail", "airport"]], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "left", + "text-field": "{name_en}", + "text-font": ["Inter Condensed Italic"], + "text-max-width": 9, + "text-offset": [0.9, 0], + "text-size": 12 + }, + "paint": { + "text-color": "#4898ff", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "road_label", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "filter": ["all"], + "layout": { + "symbol-placement": "line", + "text-anchor": "center", + "text-field": "{name}", + "text-font": ["Inter Regular"], + "text-offset": [0, 0.15], + "text-size": {"base": 1, "stops": [[13, 12], [14, 13]]} + }, + "paint": { + "text-color": "#765", + "text-halo-blur": 0.5, + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "road_shield", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 7, + "filter": ["all", ["<=", "ref_length", 6]], + "layout": { + "icon-image": "default_{ref_length}", + "icon-rotation-alignment": "viewport", + "symbol-placement": {"base": 1, "stops": [[10, "point"], [11, "line"]]}, + "symbol-spacing": 500, + "text-field": "{ref}", + "text-font": ["Inter Regular"], + "text-offset": [0, 0.1], + "text-rotation-alignment": "viewport", + "text-size": 10, + "icon-size": 0.8 + } + }, + { + "id": "place_other", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + [ + "in", + "class", + "hamlet", + "island", + "islet", + "neighbourhood", + "suburb", + "quarter" + ] + ], + "layout": { + "text-field": "{name_en}", + "text-font": ["Inter Medium"], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-size": {"base": 1.2, "stops": [[12, 16], [15, 20]]}, + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "place_village", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["==", "class", "village"]], + "layout": { + "text-field": "{name_en}", + "text-font": ["Inter Regular"], + "text-max-width": 8, + "text-size": {"base": 1.2, "stops": [[10, 12], [15, 22]]} + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "place_town", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["==", "class", "town"]], + "layout": { + "icon-image": {"base": 1, "stops": [[0, "dot_9"], [8, ""]]}, + "text-anchor": "bottom", + "text-field": "{name_en}", + "text-font": ["Inter Regular"], + "text-max-width": 8, + "text-offset": [0, 0], + "text-size": {"base": 1.2, "stops": [[7, 12], [11, 16]]} + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "place_city", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "minzoom": 5, + "maxzoom": 15, + "filter": ["all", ["==", "class", "city"]], + "layout": { + "icon-image": {"base": 1, "stops": [[0, "dot_9"], [8, ""]]}, + "text-anchor": "bottom", + "text-field": "{name_en}", + "text-font": ["Inter Medium"], + "text-max-width": 8, + "text-offset": [0, 0], + "text-size": {"base": 1.2, "stops": [[7, 14], [11, 32]]}, + "icon-allow-overlap": true, + "icon-optional": false + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "state", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 6, + "filter": ["all", ["==", "class", "state"]], + "layout": { + "text-field": "{name_en}", + "text-font": ["Inter Condensed Italic"], + "text-size": {"stops": [[4, 11], [6, 15]]}, + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#633", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "country_3", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", [">=", "rank", 3], ["==", "class", "country"]], + "layout": { + "text-field": "{name_en}", + "text-font": ["Inter Condensed Italic"], + "text-max-width": 6.25, + "text-size": {"stops": [[3, 11], [7, 17]]}, + "text-transform": "none" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "country_2", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["==", "rank", 2], ["==", "class", "country"]], + "layout": { + "text-field": "{name_en}", + "text-font": ["Inter Condensed Italic"], + "text-max-width": 6.25, + "text-size": {"stops": [[2, 11], [5, 17]]}, + "text-transform": "none" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "country_1", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["==", "rank", 1], ["==", "class", "country"]], + "layout": { + "text-field": "{name_en}", + "text-font": ["Inter Condensed Italic"], + "text-max-width": 6.25, + "text-size": {"stops": [[1, 11], [4, 17]]}, + "text-transform": "none" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + }, + { + "id": "continent", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 1, + "filter": ["all", ["==", "class", "continent"]], + "layout": { + "text-field": "{name_en}", + "text-font": ["Inter Condensed Italic"], + "text-size": 13, + "text-transform": "uppercase", + "text-justify": "center" + }, + "paint": { + "text-color": "#633", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1 + }, + "metadata": { + "libshumate:cursor": "pointer" + } + } + ], + "id": "osm-liberty" +} diff --git a/src/Define.vala b/src/Define.vala index e82b647..906e436 100644 --- a/src/Define.vala +++ b/src/Define.vala @@ -20,7 +20,11 @@ namespace Define { } namespace MapSource { - public const string MAPNIK = "mapnik"; + public const string EXPLORE = "explore"; public const string TRANSPORT = "transport"; } + + namespace MapID { + public const string EXPLORE_LIGHT = "explore-light"; + } } diff --git a/src/MainWindow.vala b/src/MainWindow.vala index ba4fb02..89b9e4f 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -94,7 +94,7 @@ public class Maps.MainWindow : Adw.ApplicationWindow { var explore_source_button = new Gtk.ToggleButton () { action_name = "win.map-source", - action_target = Define.MapSource.MAPNIK, + action_target = Define.MapSource.EXPLORE, child = new Gtk.Image.from_icon_name ("map-tile-explore") { pixel_size = 48 } @@ -176,7 +176,7 @@ public class Maps.MainWindow : Adw.ApplicationWindow { width_request = 450; height_request = 500; - setup_map_source_action (); + // setup_map_source_action (); // Add the marker layer on top after selecting map source map_widget.init_marker_layers (); @@ -285,12 +285,14 @@ public class Maps.MainWindow : Adw.ApplicationWindow { private void setup_map_source_action () { var map_source_action = new SimpleAction.stateful ( - "map-source", VariantType.STRING, new Variant.string (Define.MapSource.MAPNIK) + "map-source", VariantType.STRING, new Variant.string (Define.MapSource.EXPLORE) ); + map_source_action.bind_property ("state", map_widget, "map-source", BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE, Util.map_source_action_transform_to_cb, Util.map_source_action_transform_from_cb); + Application.settings.bind_with_mapping ("map-source", map_widget, "map-source", SettingsBindFlags.DEFAULT, (SettingsBindGetMappingShared) Util.map_source_get_mapping_cb, (SettingsBindSetMappingShared) Util.map_source_set_mapping_cb, diff --git a/src/MapStyle.vala b/src/MapStyle.vala new file mode 100644 index 0000000..8949242 --- /dev/null +++ b/src/MapStyle.vala @@ -0,0 +1,254 @@ +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2025 elementary, Inc. (https://elementary.io) + */ + +public class Maps.MapStyle : Maps.JsonObject { + public int version { get; private set; } + public string name { get; construct set; } + public Sources sources { get; private set; } + public Gee.ArrayList layers { get; private set; } + + private const string BLUEBERRY_100 = "#8cd5ff"; + private const string LIME_300 = "#9bdb4d"; + private const string SILVER_300 = "#d4d4d4"; + + public MapStyle (string name) { + Object (name: name); + } + + construct { + version = 8; + sources = new Sources (); + + var background_layer = new Layer () { + id = "background", + kind = "background", + paint = new Layer.Paint () { + background_color = "rgb(239,239,239)" + } + }; + + var park_layer = new Layer () { + id = "park", + kind = "fill", + source = "vector-tiles", + source_layer = "park", + paint = new Layer.Paint () { + fill_color = LIME_300, + fill_opacity = 0.7, + fill_outline_color = "rgba(95, 208, 100, 1)" + } + }; + + var water_layer = new Layer () { + id = "water", + kind = "fill", + source = "vector-tiles", + source_layer = "water", + // "filter": ["all", ["!=", "brunnel", "tunnel"]], + paint = new Layer.Paint () { + fill_color = BLUEBERRY_100 + } + }; + + var road_motorway_layer = new Layer () { + id = "road_motorway", + kind = "line", + source = "vector-tiles", + source_layer = "transportation", + minzoom = 5, + // "filter": [ + // "all", + // ["!in", "brunnel", "bridge", "tunnel"], + // ["==", "class", "motorway"], + // ["!=", "ramp", 1] + // ], + layout = new Layer.Layout () { + line_cap = "round", + line_join = "round" + }, + paint = new Layer.Paint () { + line_color = new Layer.Paint.LineColor () { + base = 1 + // "stops": [[5, "#ffe16b"], [6, "#ffe16b"]] + }, + line_width = new Layer.Paint.LineWidth () { + base = 1.2 + // "stops": [[5, 0], [7, 1], [20, 18]] + } + + } + }; + + var building_layer = new Layer () { + id = "building", + kind = "fill", + source = "vector-tiles", + source_layer = "building", + minzoom = 13, + paint = new Layer.Paint () { + fill_color = SILVER_300, + // "fill-outline-color": { + // "base": 1, + // "stops": [[13, "hsla(35, 6%, 79%, 0.32)"], [14, "hsl(35, 6%, 79%)"]] + // } + } + }; + + var place_city_layer = new Layer () { + id = "place_city", + kind = "symbol", + source = "vector-tiles", + source_layer = "place", + minzoom = 5, + maxzoom = 15, + + // "filter": ["all", ["==", "class", "city"]], + + layout = new Layer.Layout () { + // "icon-image": {"base": 1, "stops": [[0, "dot_9"], [8, ""]]}, + text_anchor = "bottom", + text_field = "{name_en}", // FIXME: Localize properly + text_font = {"Inter Medium"}, + text_max_width = 8, + text_offset = {0, 0}, + text_size = new Layer.Layout.TextSize () { + base = 1.2 + // "stops": [[7, 14], [11, 32]] + }, + icon_allow_overlap = true, + icon_optional = false + }, + paint = new Layer.Paint () { + text_color = "#333" + } + + // "metadata": { + // "libshumate:cursor": "pointer" + // } + }; + + layers = new Gee.ArrayList (null); + layers.add (background_layer); + layers.add (park_layer); + layers.add (water_layer); + layers.add (road_motorway_layer); + layers.add (building_layer); + layers.add (place_city_layer); + + // // "metadata": { + // // "libshumate:cursor": "pointer" + // // } + } + + public string to_string () { + var generator = new Json.Generator () { + root = Json.gobject_serialize (this) + }; + + return generator.to_data (null).replace ("kind", "type"); + } + + public class Sources : Object { + public VectorTiles vector_tiles { get; private set; } + + construct { + vector_tiles = new VectorTiles (); + } + + public class VectorTiles : Maps.JsonObject { + public string kind { get; private set; default = "vector"; } + public string[] tiles { get; private set; default = {"https://tileserver.gnome.org/data/v3/{z}/{x}/{y}.pbf"}; } + public int maxzoom { get; private set; } + public int minzoom { get; private set; } + + construct { + maxzoom = 22; + minzoom = 0; + } + } + } + + public class Layer : Maps.JsonObject { + public string id { get; set; } + public string kind { get; set; } + public string source { get; set; } + public string source_layer { get; set; } + public int maxzoom { get; set; } + public int minzoom { get; set; } + + // public string[] filter { get; set; } + public Layout layout { get; set; } + public Paint paint { get; set; } + + public class Paint : Maps.JsonObject { + public double fill_opacity { get; set; } + public string background_color { get; set; } + public string fill_color { get; set; } + public string fill_outline_color { get; set; } + public string text_color { get; set; } + public LineColor line_color { get; set;} + public LineWidth line_width { get; set; } + + public class LineColor : Maps.JsonObject { + public double base { get; set; } + } + + public class LineWidth : Maps.JsonObject { + public double base { get; set; } + } + } + + public class Filter : Maps.JsonObject { + + } + + public class Layout : Maps.JsonObject { + public string line_cap { get; set; } + public string line_join { get; set; } + public string text_anchor { get; set; } + public string text_field { get; set; } + public string[] text_font { get; set; } + public int text_max_width { get; set; } + public int[] text_offset { get; set; } // Type `int[]' can not be used for a GLib.Object property + public TextSize text_size { get; set; } + public string text_transform { get; set; } + public bool icon_allow_overlap { get; set; } + public bool icon_optional { get; set; } + + public class TextSize : Maps.JsonObject { + public double base { get; set; } + } + } + } +} + +public class Maps.JsonObject : Object, Json.Serializable { + public override Json.Node serialize_property (string prop, Value val, ParamSpec spec) { + var type = spec.value_type; + + if (type.is_a (typeof (Gee.ArrayList))) { + return serialize_list (prop, val, spec); + } + + return default_serialize_property (prop, val, spec); + } + + private static Json.Node serialize_list (string prop, Value val, ParamSpec spec) { + var list = (Gee.ArrayList) val; + if (list == null) { + return new Json.Node (NULL); + } + + var array = new Json.Array (); + foreach (var object in list) { + array.add_element (Json.gobject_serialize (object)); + } + + var node = new Json.Node (ARRAY); + node.set_array (array); + + return node; + } +} diff --git a/src/MapWidget.vala b/src/MapWidget.vala index 15a6782..8f2751a 100644 --- a/src/MapWidget.vala +++ b/src/MapWidget.vala @@ -42,6 +42,38 @@ public class Maps.MapWidget : Gtk.Box { append (map_widget); base_map = map_widget.map; + + try { + load_vector_tiles (); + } catch (Error e) { + critical ("Failed to create vector map style: %s", e.message); + } + } + + private void load_vector_tiles () throws Error requires (Shumate.VectorRenderer.is_supported ()) { + var style_json = new MapStyle ("granite-light").to_string (); + critical (style_json); + + var sprites_json = resources_lookup_data ("/io/elementary/maps/tiles/sprites.json", NONE); + var sprites_texture = Gdk.Texture.from_resource ("/io/elementary/maps/tiles/sprites.png"); + + var sprites_2x_json = resources_lookup_data ("/io/elementary/maps/tiles/sprites@2x.json", NONE); + var sprites_2x_texture = Gdk.Texture.from_resource ("/io/elementary/maps/tiles/sprites@2x.png"); + + var renderer = new Shumate.VectorRenderer (Define.MapID.EXPLORE_LIGHT, style_json); + // FIXME: Map no longer renders past 14 + renderer.set_max_zoom_level (14); + renderer.set_min_zoom_level (2); + renderer.set_license ("© OpenMapTiles © OpenStreetMap contributors"); + + var sprites = renderer.get_sprite_sheet (); + sprites.add_page (sprites_texture, (string) sprites_json.get_data (), 1); + sprites.add_page (sprites_2x_texture, (string) sprites_2x_json.get_data (), 1); + + var map_source_registry = new Shumate.MapSourceRegistry.with_defaults (); + map_source_registry.add (renderer); + + map_widget.map_source = map_source_registry.get_by_id (Define.MapID.EXPLORE_LIGHT); } public void init_marker_layers () { diff --git a/src/Util.vala b/src/Util.vala index 7dab87b..2b0ce02 100644 --- a/src/Util.vala +++ b/src/Util.vala @@ -43,7 +43,7 @@ namespace Util { string map_source; var val = variant.get_string (); switch (val) { - case Define.MapSource.MAPNIK: + case Define.MapSource.EXPLORE: map_source = Shumate.MAP_SOURCE_OSM_MAPNIK; break; case Define.MapSource.TRANSPORT: @@ -65,7 +65,7 @@ namespace Util { string id = val.id; switch (id) { case Shumate.MAP_SOURCE_OSM_MAPNIK: - to_value.set_variant (new Variant.string (Define.MapSource.MAPNIK)); + to_value.set_variant (new Variant.string (Define.MapSource.EXPLORE)); break; case Shumate.MAP_SOURCE_OSM_TRANSPORT_MAP: to_value.set_variant (new Variant.string (Define.MapSource.TRANSPORT)); @@ -78,11 +78,11 @@ namespace Util { return true; } - public static static bool map_source_get_mapping_cb (Value value, Variant variant, void* user_data) { + public static bool map_source_get_mapping_cb (Value value, Variant variant, void* user_data) { string map_source; var val = (string) variant; switch (val) { - case Define.MapSource.MAPNIK: + case Define.MapSource.EXPLORE: map_source = Shumate.MAP_SOURCE_OSM_MAPNIK; break; case Define.MapSource.TRANSPORT: @@ -99,13 +99,13 @@ namespace Util { return true; } - public static static Variant map_source_set_mapping_cb (Value value, VariantType expected_type, void* user_data) { + public static Variant map_source_set_mapping_cb (Value value, VariantType expected_type, void* user_data) { string map_source; var val = (Shumate.MapSource) value; unowned var id = val.id; switch (id) { case Shumate.MAP_SOURCE_OSM_MAPNIK: - map_source = Define.MapSource.MAPNIK; + map_source = Define.MapSource.EXPLORE; break; case Shumate.MAP_SOURCE_OSM_TRANSPORT_MAP: map_source = Define.MapSource.TRANSPORT; @@ -113,7 +113,7 @@ namespace Util { default: warning ("map_source_set_mapping_cb: Invalid map_source: %s", id); // fallback to mapnik - map_source = Define.MapSource.MAPNIK; + map_source = Define.MapSource.EXPLORE; break; } diff --git a/src/meson.build b/src/meson.build index 61815a5..ca327ae 100644 --- a/src/meson.build +++ b/src/meson.build @@ -17,6 +17,7 @@ dependencies = [ # Version limitation for Granite.Bin dependency('granite-7', version: '>= 7.6.0'), dependency('gtk4'), + dependency ('json-glib-1.0'), dependency('libadwaita-1'), dependency('libgeoclue-2.0'), dependency('shumate-1.0'), @@ -27,6 +28,7 @@ sources = files( 'Define.vala', 'MainWindow.vala', 'MapWidget.vala', + 'MapStyle.vala', 'SearchResultItem.vala', 'Util.vala', )