Giter Site home page Giter Site logo

roblabs / xyz-raster-sources Goto Github PK

View Code? Open in Web Editor NEW
86.0 5.0 10.0 128 KB

A collection of `xyz` raster sources for use in MapKit, QGIS, Mapbox/MapLibre Styles and various web mapping tools.

Home Page: https://RobLabs.com/xyz

License: MIT License

Ruby 16.19% Shell 5.23% Liquid 78.58%
qgis static-maps static-tiles xyz-tiles maplibre mapkit

xyz-raster-sources's Introduction

GitHub Repo Source GitHub

XYZ Raster Tiles Sources

A collection of xyz raster tiles for use in maps built for mobile devices, QGIS and MapLibre Styles. This repo gives sample URLs to various raster xyz sources.

Created by RobLabs.com in Summer 2020 for use in production of our #mapsForNonProfits.


Sample Tile XYZ

OpenStreetMap
https://tile.openstreetmap.org/{z}/{x}/{y}.png
Style: https://roblabs.com/xyz-raster-sources/styles/openstreetmap.json
Usage & License: OpenStreetMap

Natural Earth Tiles
https://naturalearthtiles.roblabs.com/tiles/natural_earth_cross_blended_hypso_shaded_relief.raster/{z}/{x}/{y}.png
Style: https://roblabs.com/xyz-raster-sources/styles/naturalearthtiles.json
Usage & License: Natural Earth Tiles

Stamen watercolor
https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg
Style: https://roblabs.com/xyz-raster-sources/styles/stamen-multi-rasters.json
Usage & License: Stamen watercolor

Stamen terrain
https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg
Style: https://roblabs.com/xyz-raster-sources/styles/stamen-multi-rasters.json
Usage & License: Stamen terrain

Stamen toner
https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png
Style: https://roblabs.com/xyz-raster-sources/styles/stamen-multi-rasters.json
Usage & License: Stamen toner

ArcGIS World Imagery
https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}
Style: https://roblabs.com/xyz-raster-sources/styles/arcgis-world-imagery.json
Usage & License: ArcGIS World Imagery

USDA NAIP
https://gis.apfo.usda.gov/arcgis/rest/services/NAIP/USDA_CONUS_PRIME/ImageServer/tile/{z}/{y}/{x}
Style: https://roblabs.com/xyz-raster-sources/styles/usda-naip.json
Usage & License: USDA NAIP

Mapbox or MapLibre Style

Tiles for use in Mapbox or MapLibre for mobile or web applications, can easily be configured. See the styles directory for sample style JSON. These styles follow the TileJSON v3.0.0 specification.

You can also find several styles hosted by MapLibre.org. See https://github.com/maplibre/demotiles.

See the Mapbox documentation or MapLibre documentation on details for how to add raster tiles to your style.


TileJSON.io

https://www.azavea.com/blog/2019/03/04/introducing-tilejson-io


CodePen

See examples of several style.json in CodePen.io.


GeoJSON.io

geojson.io is a quick, simple tool for creating, viewing, and sharing maps.

You can use geojson.io to add in xyz raster tiles:

  • Hover over Meta > Add map layer
    • You will prompted for a Layer URL, you can add in one of the xyz layers from above
    • Add in a Layer name
    • You can toggle layers via the checkboxes in the lower right hand corner

geojson.io


QGIS

These tiles can easily be pulled into QGIS. From the QGIS documentation site:

You can add other services that use the XYZ Tile protocol by choosing New Connection in the XYZ Tiles context menu (right-click to open).


TileServer GL

You can inspect “Vector and raster maps with GL styles” before they are installed onto production or mobile by using TileServer GL.

# Create a short alias for TileServer GL
alias tsgl="docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl"
tsgl -v
tsgl -h

MapKit with TileOverlay

Swift

See the details for iOS & tvOS at https://developer.apple.com/documentation/mapkit/mktileoverlay.

// coordinate the loading and management of the tiles
// https://developer.apple.com/documentation/mapkit/mktileoverlay
let urlTemplate = "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
let overlay = MKTileOverlay(urlTemplate: urlTemplate)
overlay.canReplaceMapContent = true
overlay.minimumZ = 8
overlay.maximumZ = 19
overlay.tileSize = CGSize(width: 256, height: 256)

// handle the actual drawing of the tiles on the map // https://developer.apple.com/documentation/mapkit/mktileoverlayrenderer func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer { if overlay is MKTileOverlay { let renderer = MKTileOverlayRenderer(overlay:overlay) return renderer } return MKTileOverlayRenderer(tileOverlay: overlay as! MKTileOverlay) }

JavaScript

See the details for MapKit JS: https://developer.apple.com/documentation/mapkitjs/tileoverlay

See a live demo of MapKit JS with an OpenStreetMap tile overlay: https://roblabs.com/projects/mapkitjs/Tile-Overlay.

var map = new mapkit.Map("map");

// https://developer.apple.com/documentation/mapkitjs/mapkit/tileoverlay/2974035-mapkit_tileoverlay const openstreetmap = "https://tile.openstreetmap.org/{z}/{x}/{y}.png" var customOverlay = new mapkit.TileOverlay(openstreetmap);

// https://developer.apple.com/documentation/mapkitjs/tileoverlayconstructoroptions customOverlay.minimumZ = 2; customOverlay.maximumZ = 16; customOverlay.opacity = 1.0; customOverlay.data = { lang: mapkit.language }; map.addTileOverlay(customOverlay);


Example of XYZ rasters in iOS

xyz-raster-sources's People

Contributors

roblabs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xyz-raster-sources's Issues

Add Mapbox Styles for XYZ rasters

Reflect that Stamen maps tiles are now hosted by Stadia Maps

See http://maps.stamen.com/stadia-partnership/.

Basically you'd just need to change most of the URL prefixes I'm not sure how you want to communicate this exactly, but I'm happy to provide assistance if desired.

One thing to note is that you should probably not directly link to the tiles, since they require either domain-level or API key auth. I'd suggest just committing a single tile of each to the repo as an example, or maybe linking to the OSM wiki thumbnails (not sure of their link policy though so check on that!): https://wiki.openstreetmap.org/wiki/List_of_OSM-based_services

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.