Geocoding Event

This event is triggered when a geocoding address lookup is performed.

# Properties

Property Type Description
target array The original target used to perform the lookup.
results array The complete results returned by the lookup.

# Example

use doublesecretagency\googlemaps\events\GeocodingEvent;
use doublesecretagency\googlemaps\GoogleMapsPlugin;
use yii\base\Event;

Event::on(
    GoogleMapsPlugin::class,
    GoogleMapsPlugin::EVENT_AFTER_GEOCODING,
    function (GeocodingEvent $event) {
    
        // Target used to generate geocoding query
        $event->target;
    
        // Results of geocoding address lookup
        $event->results;

    }
);