Skip to content

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

Closed

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

Activity

  1. landryb commented on Jan 25, 2024

    @landryb
    ContributorAuthor

    fwiw, importing the same file converted as zipped-shape works.

  2. added this to the 2024.01.00 milestone on Jan 25, 2024
  3. modified the milestones: 2024.01.00, 2024.01.01 on Mar 4, 2024
  4. added
    BackportNeeded
    on Apr 24, 2024
  5. modified the milestones: 2024.02.00, 2024.02.01 on Aug 28, 2024
  6. modified the milestones: 2024.02.01, 2025.01.00 on Nov 4, 2024
  7. removed
    BackportNeeded
    on Jan 17, 2025
  8. self-assigned this
    on Jan 22, 2025
  9. added
    BackportNeeded
    and removed
    BackportNeeded
    on Jan 23, 2025
  10. added a commit that references this issue on Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions