bcgov / smk-legacy-ui

Legacy Admin UI for the SMK has been de-supported. Please see the CLI under https://github.com/bcgov/smk for an alternative.
Apache License 2.0
8 stars 3 forks source link

Uploaded GeoJSON does not display in the map window but appears in the layer list. #118

Open fmadelung opened 6 years ago

fmadelung commented 6 years ago

Uploaded GeoJSON does not display in the map window but appears in the layer list.

image

GeoJSON tested: GeoJSON.zip

dhlevi commented 6 years ago

This can occur in the current dynamic preview if you have not saved your document. Initial upload places the file in a temp space, and it isn't committed to the database until you save your application. While we can update the dynamic in edit preview to display geojson, it will be unable to display kml, kmz, or shapefile imports (or anything that isn't geojson), so for validating these features it's best to save first.

dhlevi commented 6 years ago

Worth noting, however, that the geojson linked in this issue is invalid and will not load.

dhlevi commented 6 years ago

Attached an updated copy of the geojson that should work successfully.

square_fixed.txt

Note that CRS/SRS has been removed from the geojson spec, so any geojson file that IS NOT WGS84 long/lat format will not function. The service currently doesn't do any reprojection for you. The same is true for both KML and KMZ documents, because none of them have an officially supported method of containing source projection coordinate references.

fmadelung commented 6 years ago

Confirmed. Created a WGS84 geomark (did not use attached) and it loaded.

However, this requirement should be stated somewhere in the application for users.

cpspicer commented 6 years ago

Something for the documentation for developers