JSFiddle - React, Tailwind, and code Playground
by Artemiy
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Show Data layer on the NGF</title>
<!-- <script src="https://unpkg.com/@nextgis/ngw-leaflet"></script> -->
<script src="https://unpkg.com/@nextgis/ngw-ol"></script>
<!-- <script src="https://unpkg.com/@nextgis/ngw-mapbox"></script> -->
<style>
html, body, #map {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
NgwMap.create({ osm: true }).then(function (ngwMap) {
fetch(
"https://raw.githubusercontent.com/rendrom/rendrom.github.io/master/static/boundary-polygon-lvl6.geojson"
).then(function (resp) {
resp.json().then(function (geojson) {
ngwMap.addGeoJsonLayer({
data: geojson,
fit: true,
labelField: "NAME",
});
});
});
});
</script>
</body>
</html>