Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MapTiler in Supported Base Maps [Doc] #8777

Open
bolollo opened this issue Apr 10, 2024 · 10 comments · May be fixed by #8778
Open

Add MapTiler in Supported Base Maps [Doc] #8777

bolollo opened this issue Apr 10, 2024 · 10 comments · May be fixed by #8778
Labels

Comments

@bolollo
Copy link

bolollo commented Apr 10, 2024

Link

https://deck.gl/docs/get-started/using-with-map

Description

Add MapTiler in Supported Base Maps and create examples using MapTiler SDK js

Create new pages:

  • /docs/developer-guide/base-maps/using-with-maptiler
  • /examples (new integration example)
  • /examples/get-started/pure-js/maptiler
  • /examples/get-started/react/maptiler
  • /gallery/maptiler-overlay

Update:

  • docs/get-started/using-with-map
@bolollo bolollo added the doc label Apr 10, 2024
@bolollo
Copy link
Author

bolollo commented Apr 10, 2024

I have created this branch https://github.com/bolollo/deck.gl/tree/maptiler, but when I run the tests, some of them fail. They are tests that are not related to the changes I have made.
I use Ubuntu. Even in the master branch, I followed the installation steps and 78 tests related to the browser failure.

@bolollo bolollo linked a pull request Apr 10, 2024 that will close this issue
@ibgreen
Copy link
Collaborator

ibgreen commented Apr 10, 2024

Thanks for the initiative, always nice to be able to show wider ecosystem support.

Breaking this down:

  • adding some instructions for how to use map-tiler generated basemaps with existing maplibre and mapbox renderers seems fairly straightforward.
  • adding an integration with the map-tiler SDKs as a basemap renderer seems a bit more heavy weight as it= increases the maintenance burden on the already heavily loaded core deck.gl maintainers. Someone now needs to test these examples for every release and answer questions about them etc.

We are currently doing a lot of work on the deck.gl-community repo which is intended to contain such semi-official integrations, and also be a place to incubate things that could later be promoted to deck.gl core.

See for instance: https://visgl.github.io/deck.gl-community/docs/modules/bing-maps

@bolollo
Copy link
Author

bolollo commented Apr 10, 2024

Hi, @ibgreen, thanks for the clarification and comments. The MapTiler SDKs are based on MapLibre (it has a layer on top with some helpers to make it easier to use MapTiler maps).
What do you recommend as the next steps for adding MapTiler as a basemap and providing an example with the SDK?

@ibgreen
Copy link
Collaborator

ibgreen commented Apr 10, 2024

Well, @Pessimistress is the primary maintainer of deck.gl and generally has the final say on what additions the core deck.gl repo is willing to take on.

I do suspect that core deck.gl would accept a doc page about how to use "maptiler hosted / maptiler generated basemaps" (with the existing basemap libraries), Given that maptiler is such a well known and widely used base map host, it makes sense to be explicit about it being supported and explain how to use it.

For the maptiler SDK examples and integration docs, you could always start developing these in deck.gl-community repo and once they are landed and on the website there it will be easier for everyone to review this, and we could have a discussion about whether to "promote" the code to the deck.gl core repo.

@Pessimistress
Copy link
Collaborator

Pessimistress commented Apr 10, 2024

Commented here

My suggestion is that you start by adding the "get-started" examples. Website content has a much higher bar. At this moment I'm not convinced that a library that is a wrapper of (with code that looks identical to) Mapblire must have its own page.

@Pessimistress
Copy link
Collaborator

Cc @HarelM - I know MapTiler is an active participant of the MapLibre community, maybe we can work out a dedicated MapLibre example with MapTiler as the data source?

@HarelM
Copy link
Contributor

HarelM commented Apr 10, 2024

I'm not familiar with maptiler's SDK wrapper so I can't help here much.
MapTiler's SDK was never discussed with the MapLibre community and I would have preferred that maptiler invested in maplibre itself instead of investing in a wrapper, but it might be well aligned with their business needs, IDK.
You can reach out to maptiler I guess to support it, I would guess that it is well within their interest.

@felixpalmer
Copy link
Collaborator

based on MapLibre (it has a layer on top with some helpers to make it easier to use MapTiler maps)

@bolollo are you able to clarify what these features are, beyond simpler integration with your platform?

@bolollo
Copy link
Author

bolollo commented Apr 11, 2024

based on MapLibre (it has a layer on top with some helpers to make it easier to use MapTiler maps)

@bolollo are you able to clarify what these features are, beyond simpler integration with your platform?

As I have mentioned, many of the changes are related to the integration with MapTiler platform, I would say that these are the biggest differences:

  • configuration object: The config object represents the SDK global settings. It exposes properties and options that make it easier to define some values that the SDK will use globally, such as the API key, session based billing
    , the map units, etc.
  • Map constructor options:
    • Style: In addition to the MapLibre options, it can be: ReferenceMapStyle (e.g. MapStyle.STREETS), MapStyleVariant (e.g. MapStyle.STREETS.DARK), MapTIler Style ID (e.g. “streets-v2”) or uuid of custom style
    • Language: Define the language of the map. This can be done directly with a language ISO code (eg. "en") or with a built-in Languages shorthand (eg. Language.ENGLISH)
    • Terrain: If true, the map's loads a 3D terrain, based on a MapTiler "raster-dem" source.
    • Geolocate: Center map on the visitor's location by using the IP geolocation API. There are two strategies: GeolocationType.POINT: centering the map on the actual visitor location and GeolocationType.COUNTRY: fitting the map view on the bounding box of the visitor's country.
    • Controls: easy to add controls through the Map constructor options. Like navigationControl, terrainControl, minimap, etc.
  • Vector layers helpers: a set of functions to facilitate the creation of sources and layers. https://docs.maptiler.com/sdk-js/api/helpers/. Example line with an outline
helpers.addPolyline(map, {
  data: "74003ba7-215a-4b7e-8e26-5bbe3aa70b05",
  lineColor: "#880000",
  outline: true,
});

The layers helpers (modified for general use) would be the only thing that could be integrated into MapLibre in the future.

@Pessimistress
Copy link
Collaborator

Pessimistress commented Apr 11, 2024

In principle we only want one page for each submodule in the developer guide section. The current pages are:

  • Using with ArcGIS (@deck.gl/arcgis)
  • Using with Google Maps Platform (@deck.gl/google-maps)
  • Using with Mapbox (@deck.gl/mapbox)
  • Using with MapLibre (the only exception here, though a dedicated @deck.gl/maplibre module is on our roadmap)

We choose what integration submodules to invest in based on:

  • Whether it advances the mission of open visualization by encouraging collaboration & open-source
  • Whether it helps our libraries to reach the most developers
  • Whether the base map provider is willing to contribute to our project

We already support MapTiler as the result of supporting MapLibre. I do not believe there's enough value for deck.gl users if we duplicated this content for each MapLibre-derivative library - it belongs in the documentation of respective libraries. We do not have the knowledge and resources required to keep such content up to date. And other than the criteria stated above, we do not promote a certain commercial product over others.

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

Successfully merging a pull request may close this issue.

5 participants