OpenSPP / openspp-modules

OpenSPP Odoo modules
https://openspp.org
GNU Lesser General Public License v3.0
26 stars 11 forks source link

Development of spp_base_gis module #344

Closed dasunhegoda closed 5 months ago

dasunhegoda commented 8 months ago

Objective: To have our own GIS engine where we can plot vectors (Point, Line, Polygon) on a map by utilizing the maptiler JS and to have our own customized view where we can see on the map all of the vectors of the record.

Features:

reichie020212 commented 8 months ago

Below are the list of MapStyle that is available in MapTiler

reichie020212 commented 8 months ago

References MapTiler - https://docs.maptiler.com/sdk-js/api/ MapBox Draw - https://github.com/mapbox/mapbox-gl-draw Mapbox Draw with sample on calculating area - https://docs.maptiler.com/sdk-js/examples/mapbox-gl-draw/ Turf JS (for the calculation of the geoJson) - https://turfjs.org/ Control Style Switcher - https://docs.maptiler.com/sdk-js/examples/control-style-switcher/ (we already have this via raster layer but this doc have a different UI and different approach, the cons here is that we need to find static images for the variants of every map style) Vector layer helper (might be useful) - https://docs.maptiler.com/sdk-js/examples/helper-polyline-minimal/

reichie020212 commented 8 months ago

MapTiler API key should be stored in the System Parameters with a key "spp_base_gis.map_tiler_api_key"

adriancris commented 5 months ago

@reichie020212 bug found in the GIS. dev is currently fixing.

ISSUE: Radio button does not stay on the selected raster after navigating data layer and/or hiding the sidebar

STEPS TO REPLICATE:

  1. Go to GIS View
  2. Select a raster.
  3. Hide the sidebar.
  4. Unhide the sidebar.
  5. Raster radio button goes back.

INSTANCE: ACF-DEV

SCREENSHOTS/SCREEN RECORDING: https://github.com/OpenSPP/openspp-modules/assets/138551361/9433a484-86fc-43d2-b1bc-0b793c78e19a

dasunhegoda commented 5 months ago

@reichie020212 has fixed this.