简体   繁体   中英

Can I get the source code for the rendered map on github?

I have pushed my json file on my github account. This json file contains some geojson map data. Github has its feature which basically gives you the preview of the data on map if json file contains GEOJSON data in it. Is there any way to get the source code of the preview map shown on the github cause I need to implement the same thing for some other GEOJSON data?

I am attaching the screenshot the my github preview

preview of my github map:

Github provides a way of embedding the GeoJSON preview map on your own website: https://docs.github.com/en/free-pro-team@latest/github/managing-files-in-a-repository/mapping-geojson-files-on-github#embedding-your-map-elsewhere

If you also upload the other GeoJSON files to Github, you can let Github render those maps as well.

As an alternative you can also setup your own map by using Leaflet JS to render the GeoJSON files: https://leafletjs.com/examples/geojson/ Github is also using Leaflet JS to render those preview maps (if you checkout their source code).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM