I have successfully overridden the defaultmarkgeocode event, but now I am wondering how to actually get to the .geocode property from my LeafletEvent without converting to any, which otherwise the property is not available.
Here is a code example:
const mapboxProvider: Mapbox = new Mapbox({
apiKey: this.Token,
});
const geocoder: GeocoderControl = new GeocoderControl({
geocoder: mapboxProvider,
defaultMarkGeocode: false
});
if (onMarkCallback == undefined) {
geocoder.on("markgeocode", (e) => {
/*e per default is a LeafletEvent*/
const callbackAsAny: any = e as any; /*In which type to cast, to get the .geocode property*/
const test = callbackAsAny.geocode;
});
Sorry to pop up here again with a question,
I have successfully overridden the defaultmarkgeocode event, but now I am wondering how to actually get to the .geocode property from my LeafletEvent without converting to any, which otherwise the property is not available.
Here is a code example:
Thanks!