Models

# Geocoding & Proximity Searching

Model Overview
Lookup Model Core of a geocoding address lookup.

To perform geocoding, a Lookup Model must be created. This often occurs internally when triggering a proximity search. The model is responsible for pinging the Google Geocoding API based on the specified target value.

# Addresses & Visitor Geolocation

Model Overview
Address Model Used in many places, including Address fields.
Location Model Parent model of the Address Model and Visitor Model.
Visitor Model Returned as results of a visitor geolocation lookup.

You will frequently encounter an Address Model, which is an extension of the Location Model. When working with an Address, it's possible to use the properties and methods of both models.

Similarly, the Visitor Model is also an extension of the Location Model. You can access the properties and methods of both when fetching geolocation results.

# Dynamic & Static Maps

Model Overview
Dynamic Map Model Handles creation of dynamic maps.
Static Map Model Handles creation of static maps.

Both the Dynamic Map Model and Static Map Model are powerful chainable objects which can be configured to display each map as desired.

# Geolocation Services

⚠️  You will almost never need to call these models directly.

Model Overview
Ipstack Model Connects to the ipstack geolocation service.
Maxmind Model Connects to the MaxMind geolocation service.

The Ipstack Model and Maxmind Model are responsible for handling visitor geolocation. Only one of these models will be used, depending on which geolocation service you have selected.

# Plugin Settings

⚠️  You will almost never need to call this model directly.

Model Overview
Settings Model Handles internal plugin settings.

The Settings Model handles the internal settings for the entire Google Maps plugin. It is a standard component of many Craft plugins.



Pseudo-Models

Not quite a Model, Coordinates defines a standard format for coords values used in various places around the plugin. It's also directly compatible with many facets of the Google Maps JavaScript API.

Pseudo-Model Overview
Coordinates Common configuration of latitude & longitude.