Skip to content

fix importing geojson files on firefox on linux/openbsd #9912

@landryb

Description

@landryb

Description

using the profiletool from #9241, on master in firefox 122 it fails to recognize a valid geojson file (attached)

after looking in the developer console, file.type is application/geo+json in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/plugins/longitudinalProfile/enhancers/processFile.js#L38 which isnt included in the list of supported mimetypes (eg only application/json)

looking into it, importing geojson files is globally broken because of a similar mimetype check in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/import/dragZone/enhancers/processFiles.jsx#L50

How to reproduce

try to import
test2154.json (rename to test2154.geojson)

in a mapstore instance with EPSG:2154 defined
Expected Result
a profile should be computed from it (if the coverage is on the json area)

Current Result
profiletool says File not supported

with a mimetype fix, importing the file as a vector file goes further but fails with
You provided 'null' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
but that should be another problem

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Firefox on linux 122

Other useful information

Simple PR coming

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions