informatique:wordpress:acf:acf-openstreetmap-field
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
informatique:wordpress:acf:acf-openstreetmap-field [24/12/2024 12:40] – [Surcharge de la Localisation du résultat] cyrille | informatique:wordpress:acf:acf-openstreetmap-field [25/12/2024 21:56] (Version actuelle) – [different geocoders] cyrille | ||
---|---|---|---|
Ligne 13: | Ligne 13: | ||
* [[https:// | * [[https:// | ||
- | ==== Surcharge de la Localisation du résultat ==== | + | Étude ... |
+ | <code javascript> | ||
+ | // plugin view | ||
+ | // in wp-content/ | ||
+ | initGeocode() { | ||
+ | | ||
+ | ... | ||
+ | geocoder: L.Control.Geocoder.nominatim( nominatim_options ) | ||
+ | | ||
+ | // tests | ||
+ | // in wp-content/ | ||
+ | mapDrawCenter(){ | ||
+ | const geocoder | ||
- | * Issue https:// | + | </code> |
- | * PR https:// | + | |
+ | Les geocoders de [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | In '' | + | Geocoder options |
+ | * [[https://www.liedman.net/leaflet-control-geocoder/ | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | Override | + | ==== Surcharge de la Localisation du résultat ==== |
+ | |||
+ | * Issue https:// | ||
+ | * PR https:// | ||
+ | |||
+ | In '' | ||
Geocode results format are set with translation for localisation. But in some case we want specific formats. | Geocode results format are set with translation for localisation. But in some case we want specific formats. | ||
Ligne 33: | Ligne 55: | ||
define(' | define(' | ||
</ | </ | ||
+ | |||
+ | Or with a filter in '' | ||
<code php> | <code php> | ||
- | 'address_format' | + | add_filter('acf_osm_address_format', function($format){ |
- | ' | + | $format[' |
- | ? constant(' | + | return $format ; |
- | : __( '{building} {road} {house_number}' | + | } ); |
- | , ' | + | |
- | ' | + | |
- | ? constant(' | + | |
- | : __( ' | + | |
- | , ' | + | |
- | ' | + | |
- | ? constant(' | + | |
- | : __( ' | + | |
- | , ' | + | |
- | ] | + | |
</ | </ | ||
informatique/wordpress/acf/acf-openstreetmap-field.1735040435.txt.gz · Dernière modification : 24/12/2024 12:40 de cyrille