jekyll-maps icon indicating copy to clipboard operation
jekyll-maps copied to clipboard

WIP: Add Mapbox

Open rriemann opened this issue 6 years ago • 4 comments

This PR is linked to issue #27 . The engine Mapbox GL JS to display vector maps allows to use OSM data from various sources (cloud or selfhosted).

The current development effort is to make mapbox working as good as Google. The next step is to make it also compatible/configure with https://openmaptiles.com/ or https://cloud.maptiler.com/

Some design decisions are required:

  • Should the switch between Google and Mapbox be a different Jekyll Tag or should it rather be a (global) configuration option?
  • How could the code be restructured to achive less duplication? Mapbox examples all use GeoJSON for data. I think it could be interesting to also make the Google Maps part use internally the structure of GeoJSON for lists of markers.

rriemann avatar May 05 '19 22:05 rriemann

hi @rriemann thanks for this!

Should the switch between Google and Mapbox be a different Jekyll Tag or should it rather be a (global) configuration option? I think it should be a new tag, it's a bit more flexible

How could the code be restructured to achive less duplication? Mapbox examples all use GeoJSON for data. I think it could be interesting to also make the Google Maps part use internally the structure of GeoJSON for lists of markers.

I'm not familiar with GeoJSON. Would it require users to change their data? or only changes in the internals of the library?

ayastreb avatar May 14 '19 13:05 ayastreb

This is the current state of art:

Screenshot_20190517_005917

The code is quite messy. I have not yet attempted to change Google Maps code to allow for more code sharing.

I also feel that it would be nice if GeoJSON (https://geojson.org/) would be accepted in data files and could be piped to Mapbox without alteration.

GeoJSON is an industry standard and has many tools, such as http://geojson.io/ .

We could consider to only reformat coordinate elements if their hash does not contain a type attribute, that is required by GeoJSON.

rriemann avatar May 16 '19 23:05 rriemann

In the last commits, I changed the design of clustered markers to resemble the Google Maps version.

image

rriemann avatar May 17 '19 22:05 rriemann

The code is quite messy. I have not yet attempted to change Google Maps code to allow for more code sharing.

I also feel that it would be nice if GeoJSON (https://geojson.org/) would be accepted in data files and could be piped to Mapbox without alteration.

GeoJSON is an industry standard and has many tools, such as http://geojson.io/ .

We could consider to only reformat coordinate elements if their hash does not contain a type attribute, that is required by GeoJSON.

Dear @ayastreb , can we please agree on a strategy how mapbox can become part of jekyll-maps?

I found that Google Maps has also support to load GeoJSON.

rriemann avatar Sep 07 '19 21:09 rriemann

@ayastreb Any chance this could get merged and supported? This reduces the cost to host by a lot. The Google Maps API costs $7 per 1000 uses of the javascript API

ajsnyde avatar Dec 11 '23 17:12 ajsnyde

Dear @ajsnyde ,

I fear my code is not well maintained and I have 2 branches with no clear view on which one should be merged. I tried to come up with a solution that could consume and display on the map arbitrary GEOJSON.

Furthermore, we are now more advanced than in 2019. Mapbox got forked and we have now MapLibre as well. mbtiles are difficult to host and the one-file-fits-all format pmtiles was introduced.

So my personal priority would be to support first MapLibre with pmtiles and add later Mapbox and mbtiles again. However, not sure if I have time to work on it.

rriemann avatar Dec 11 '23 17:12 rriemann

Dear all,

I have published a pre-release of jekyll-maplibre that is somewhat a fork with many parts rewritten/cleaned.

https://github.com/rriemann/jekyll-maplibre

rriemann avatar Dec 29 '23 14:12 rriemann