HenryGeorgist / webmap

a basic webmap based off @corpsmap/corpsmap
0 stars 1 forks source link

Support for geopackages #1

Open slawler opened 4 years ago

slawler commented 4 years ago

For the local testing and dev we have moved away from geojson in favor of geopackages (mainly for quick changes and refresh capabilities).

Would be nice to add that data source as an opinion to local user data. I can help with that possibly, just need some direction on where to start.

HenryGeorgist commented 4 years ago

@slawler - noted. I will stub out a plugin which can serve as a starting point. Fundamentally, the mapping technology here is openlayers, so we can work with what capabilities it has, the first step will be to determine how to add a geopackage to openlayers.

HenryGeorgist commented 4 years ago

added see src/cm-plugins/geopkg/cm-geopkg-bundle.js in the method initMap method.

For an example of the add data plugin structure (which adds the functionality of browsing to a local file) in corps map check out node_modules/@corpsmap/corpsmap/src/core-plugins/add-data/add-geojson.js and node_modules/@corpsmap/corpsmap/src/core-plugins/add-data/bundle.js

if we can add gpkg to the map, we can probably get a good start on extending the add-data plugin in cm

HenryGeorgist commented 4 years ago

@slawler, i would look into the attached stackexchange thread - the leaflet example is a pretty good example for most of the source.

https://gis.stackexchange.com/questions/202165/how-to-load-tiles-from-geopackage-properly-using-openlayers3-and-geopackage-js