Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.

Add widget for geopoint field#60

Open
cbenz wants to merge 31 commits intoetalab:masterfrom
multi-coop:58-geopoint-widget
Open

Add widget for geopoint field#60
cbenz wants to merge 31 commits intoetalab:masterfrom
multi-coop:58-geopoint-widget

Conversation

@cbenz
Copy link

@cbenz cbenz commented Dec 10, 2020

WIP

@pierredittgen
Copy link
Contributor

@geoffreyaldebert a first preview of geopoint widget:

  • type point coordinates as lon, lat in a text input
  • use a marker on a map to choose a point
  • moving the marker update lon, lat in text input
  • updating text input content moves marker
  • geopoint widget is automatically associated to geopoint fields
  • minimal schema catalog and catalog using geopoint has been added in public/ ( VUE_APP_SCHEMAS_CATALOG_URL variable in .env relates to this catalog)

To test geopoint widget locally, use localtunnel.

  • first run app
npm run serve
  • then run localtunnel in another shell:
lt --port 8081 --local-host localhost --subdomain csvgg

Copy link
Contributor

@geoffreyaldebert geoffreyaldebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for me unless if we take my remark about useless file into account.

.prettierrc Outdated
"singleQuote": true,
"trailingComma": "none",
"useTabs": false
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file useful ? I think we can remove it from PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this file useful for the project as it helps a new contributor to work on existing code without breaking code style. I'll remove this file as it has nothing to do with PR subject.

A new PR can be created only to add this file if that makes sense to you.

This file is useful for the project to help a new contributor working on existing code without breaking source indent/format. But

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok let's keep it here then.

@pierredittgen
Copy link
Contributor

@geoffreyaldebert geopoint widget still uses openstreetmap tiles (https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png) instead of etalab tiles as asked in the issue.

Could you give me the etalab tiles url to use to update the PR?

@geoffreyaldebert
Copy link
Contributor

@pierredittgen here is the URL for etalab tiles : https://etalab-tiles.fr/ ? Is this good for you ?

@pierredittgen
Copy link
Contributor

@pierredittgen here is the URL for etalab tiles : https://etalab-tiles.fr/ ? Is this good for you ?

@geoffreyaldebert do you have any leaflet sample using etalab tiles to create a tile layer? I can't find any :-(

@johanricher
Copy link
Member

johanricher commented Jan 20, 2021

Etalab only provides vector tiles which Leaflet doesn't support out of the box. It's probably easier to stick with raster tiles (not osm.org). Which service do you prefer for free raster tiles? @abulte @geoffreyaldebert @jdesboeufs

@johanricher
Copy link
Member

johanricher commented Jan 22, 2021

Je propose qu'on utilise les tuiles de Jawg.io (Jawg Streets) qui nécessitent un token mais sont gratuites pour un usage non-commercial.

https://{s}.tile.jawg.io/jawg-streets/{z}/{x}/{y}{r}.png?access-token={accessToken}

Attribution :

<a href="http://jawg.io" title="Tiles Courtesy of Jawg Maps" target="_blank">&copy; <b>Jawg</b>Maps</a> &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors

@geoffreyaldebert
Copy link
Contributor

geoffreyaldebert commented Feb 1, 2021

Merci @pierredittgen les tuiles jawg marchent bien !
J'ai une question sur la précision de la localisation, j'ai l'impression qu'il n'y a que 2 chiffres après la virgule pour les coordonnées XY. Est-il possible de rendre ces coordonnées plus précises (avec 6 chiffres après la virgule) ?

@pierredittgen
Copy link
Contributor

Bonjour @geoffreyaldebert,

Le nombre de décimales après la virgule se configure via la constante GEO_DECIMAL_COUNT du composant GeoPointField.

@geoffreyaldebert
Copy link
Contributor

geoffreyaldebert commented Feb 2, 2021

Très bien, ça marche nickel chez moi, je vais merger. Merci !

Pour historique : le token Jawg s'ajoute dans le fichier .env dans la variable d'environnement VUE_APP_GEO_ACCESS_TOKEN

@geoffreyaldebert geoffreyaldebert marked this pull request as ready for review February 2, 2021 10:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants