🏠 back to Observable

map with waterbodies

Hi I am using Observablehq to plot a worldmap.
I wish to plot the country shapes (to eventually color each countries), and the water bodies (especially the lakes)

I plan to use Openlayers but I am a bit struggled to find the map source…
I found geo-map that looks good but when I try to import the map I obtain the error below

geoWorldWaters = require('@geo-maps/earth-waterbodies-10m');

geoWorldWaters = vt: unable to load package.json

Do you have an idea how to fix that ? or maybe a easier source for openlayers vector maps ?


I can’t help much with require (seems neither could the module require debugger), but maybe these are a start:

Lakes + Reservoirs


Rivers + lake centerlines

… I haven’t dropped them into OpenLayers: merely converted shapefiles from Natural Earth to geojson.

1 Like

Here it is in Leaflet:

Lakes + Reservoirs

… In this approach, I referenced the file from my GitHub account. You might wish just to upload it as an attachment (I haven’t quite gotten this yet).

And here it is with OpenLayers:

Lakes + Reservoirs

… Same caveat here: I referenced the geojson file from my GitHub account, but it’s small enough just to upload it as an attachment. I’ll see about switching it out now that I’ve got this basic map working.

Hope this helps!

PS: All the credit to Mike & Tom (source notebooks below):

… Apologies for not forking directly; it was just easier for me to fork form my own private notebooks.

That looks great thank you ! I will look into it and let you know :slight_smile:

1 Like

Looking on the web again I found natural-earth-vector repo

and with the hint of geojson-viewer to load the file, I get what I wanted !!

Thanks guys

1 Like