Visitor Model

The properties and methods of the Visitor Model are identical whether you are accessing them via Twig or PHP.

{% set visitor = googleMaps.getVisitor() %}

In both cases, visitor will be a Visitor Model.

Additional Properties and Methods

The Visitor Model is an extension of the Location Model. It contains all properties and methods of the Location Model, plus the properties and methods shown below.

You can access lat and lng just as easily as service or ip.

# Public Properties

# service

string - The name of the service used to perform the geolocation.

# ip

string - The IP address of the geolocation lookup.

# city

string - The city determined by the geolocation lookup.

# state

string - The state determined by the geolocation lookup.

# country

string - The country determined by the geolocation lookup.

# raw

array - The original data used to create this Visitor Model. Contains the full response from the original geolocation service.

# error

string - If an error occurred during the geolocation process, it will be set here.