PacemGeolocateElement
is an opinionated webcomponent that exploits geocoding to geolocate precise content.
The managed value is an object having the following structure:
{
"fullAddress": string,
"position": { "lat": number, "lng": number },
"address"?: {
"city"?: string,
"country"?: string,
"countryCode"?: string,
"province"?: string,
"provinceCode"?: string,
"zipCode"?: string,
"houseNumber"?: string,
"streetName"?: string,
"state"?: string,
"village"?: string
"type"?: string,
}
}
The following example leverages seamlessly on three different providers (LeafletJS/Nominatim, Azure Maps & Google Maps) to geolocate content: