Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasting GeoJSON does not work in firefox #818

Open
prushforth opened this issue Apr 10, 2023 · 1 comment
Open

Pasting GeoJSON does not work in firefox #818

prushforth opened this issue Apr 10, 2023 · 1 comment

Comments

@prushforth
Copy link
Member

prushforth commented Apr 10, 2023

To try it, copy this example:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": 1,
      "properties": {
        "ID": 0
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
              [-90,35],
              [-90,30],
              [-85,30],
              [-85,35],
              [-90,35]
          ]
        ]
      }
    }
  ]
}
Loading

and paste it here. It works on desktop, and in devtools with a phone simulator enabled, but doesn't work (no error) on firefox on android.

Update: might be due to not being prompted for permission to access the clipboard. On Chrome on android, I was prompted to allow clipboard access, and once granted, the paste worked no problem.

Update 2: Looks like the clipboard API is not yet supported by Firefox

@prushforth prushforth changed the title Pasting GeoJSON does not appear to work on android phone Pasting GeoJSON does not work in firefox Apr 10, 2023
@AliyanH
Copy link
Member

AliyanH commented Apr 17, 2023

Yup pasting is not supported by Firefox, though we are able to drag and drop layers, which works in Firefox.
https://github.com/Maps4HTML/Web-Map-Custom-Element/blob/fc0c8dad18f7469fb6e551262c0f780f73f11906/src/mapml-viewer.js#L508-L516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants