Geocoders are used by the address field (GeoAddressPanel/GeoAddressBlock) to enable searching for places in the map. We currently support these services:
from django.contrib.gis.db import models
from wagtail.models import Page
from wagtailgeowidget import geocoders
from wagtailgeowidget.blocks import GeoAddressPanel, LeafletPanel
class ExamplePage(Page):
address = models.CharField(max_length=250, blank=True, null=True)
location = models.PointField(srid=4326, null=True, blank=True)
content_panels = Page.content_panels + [
GeoAddressPanel("address", geocoder=geocoders.NOMINATIM),
LeafletPanel("location", address_field="address"),
]
Url: https://developers.google.com/maps/documentation/javascript/geocoding
from django.contrib.gis.db import models
from wagtail.models import Page
from wagtailgeowidget import geocoders
from wagtailgeowidget.blocks import GeoAddressPanel, LeafletPanel
class ExamplePage(Page):
address = models.CharField(max_length=250, blank=True, null=True)
location = models.PointField(srid=4326, null=True, blank=True)
content_panels = Page.content_panels + [
GeoAddressPanel("address", geocoder=geocoders.GOOGLE_MAPS),
LeafletPanel("location", address_field="address"),
]
Url: https://docs.mapbox.com/api/search/geocoding/
from django.contrib.gis.db import models
from wagtail.models import Page
from wagtailgeowidget import geocoders
from wagtailgeowidget.blocks import GeoAddressPanel, LeafletPanel
class ExamplePage(Page):
address = models.CharField(max_length=250, blank=True, null=True)
location = models.PointField(srid=4326, null=True, blank=True)
content_panels = Page.content_panels + [
GeoAddressPanel("address", geocoder=geocoders.MAPBOX),
LeafletPanel("location", address_field="address"),
]