Home NewsX Enhance Azure Maps with Overture Maps Data using PMTiles!

Enhance Azure Maps with Overture Maps Data using PMTiles!

by info.odysseyx@gmail.com
0 comment 1 views


Enrich Azure Maps with Overture Maps data using PMTiles

I have some exciting news for you. Azure Maps now supports PMTiles! This means you can overlay large geospatial datasets on Azure Maps with incredible efficiency and ease. PMTiles allows data-intensive mapping applications to seamlessly access large datasets without having to load the entire dataset on the client side. What are the results? Faster performance and more powerful, more responsive mapping applications in Azure Maps.

What exactly are PMTiles?

think PM tile Used as a powerful ZIP file for tiled data. A single-file archive format that consolidates numerous individual tiles into one neat package. This makes storage easier and data management much simpler compared to juggling thousands of small files.

PMTiles are suitable for cloud-native deployments and can be hosted on Azure Blob Storage. This means you can build inexpensive serverless map applications without a custom backend or third-party tile provider. PMTiles allows you to access specific map tiles without an intermediary and request data from the file directly over HTTP. Whether you’re dealing with vector data, raster data, or terrain mesh data, PMTiles can help.

Image.png

How to create PMTiles

If you want to create PMTiles for vector data: Tippecanoe It’s your tool. Create vector tiles optimized for visualization and simplify or remove small features at low zoom levels to keep tiles small and manageable. This ensures a smooth user experience on the client side.

Display and use PMTiles in Azure Maps

Azure Maps now supports the following custom protocols: pmtiles:// for See PMTiles archive. This custom protocol allows Azure Maps to access tiles within a PMTiles archive using HTTP range requests. Get only the data you need, when you need it. To get started with PMTiles, the Azure Maps web SDK provides: addProtocol function. This allows PMTiles data to be processed dynamically for map rendering by registering callbacks that intercept and modify requests.

Here’s a quick guide to setting up PMTiles support:

  1. PMTiles library reference:

    <script src="https://unpkg.com/pmtiles@3.0.5/dist/pmtiles.js">script>
    
  2. PMTiles protocol initialization:

    const protocol = new pmtiles.Protocol();
    atlas.addProtocol("pmtiles", (request) => {
        return new Promise((resolve, reject) => {
            protocol.tile(request, (err, data) => {
                if (err) reject(err);
                else resolve({ data });
            });
        });
    });
    

    This setting is pmtiles:// The schema allows Azure Maps to specially handle requests to PMTiles sources.

  3. Add and configure PMTiles data source: Overlay building data from Overture Maps on top of an Azure Maps basemap using the following example.

    const PMTILES_URL = "https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/2024-07-22/buildings.pmtiles";
    protocol.add(new pmtiles.PMTiles(PMTILES_URL));
    
    map.sources.add(new atlas.source.VectorTileSource("pmtiles", {
        type: "vector",
        url: `pmtiles://${PMTILES_URL}`,
    }));
    

    This code defines a vector tile source using the PMTiles URL. The map then dynamically fetches only the tiles needed for the user’s view, improving both performance and data usage.

What is the Overture Map?

overture map It is an open data project launched in 2022 by a coalition led by the Linux Foundation. This initiative, supported by Meta, Microsoft, AWS, and TomTom, aims to provide reliable and interoperable geospatial data to the public. The Overture Maps Foundation aggregates open and commercial datasets to provide a unified schema that makes geospatial data easier to use across a variety of platforms and applications.

each Dataset from Overture Maps It is organized by topic to classify different types of geospatial information, including building footprints, roads, bodies of water, and points of interest. This thematic organization ensures a structured approach that integrates different types of location data, making them accessible to developers across a variety of projects.

pmtiles-building.png

with PMTiles support in Azure MapsWe look forward to seeing how you use this feature to power your dynamic, data-rich applications. Stay tuned for further updates and take advantage of new potential by integrating PMTiles into your Azure Maps applications. Overture map data today!





Source link

You may also like

Leave a Comment

Our Company

Welcome to OdysseyX, your one-stop destination for the latest news and opportunities across various domains.

Newsletter

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

Laest News

@2024 – All Right Reserved. Designed and Developed by OdysseyX