\GoogleMapLocationsObject
Map Location Object onBeforeWrite, it automagically adds all the details.
To create a new GoogleMapLocationsObject
set the Address field and write. All other fields
are completed automatically...
Synopsis
class GoogleMapLocationsObject
extends DataObject
{
- // members
- private static array $parent_point_counts = ;
- private static string $singular_name = 'Location';
- private static string $plural_name = 'Locations';
- private static array $db = ;
- private static array $summary_fields = ;
- private static array $has_one = ;
- private static array $indexes = ;
- private static array $field_labels = ;
- private static array $casting = ;
- // methods
- public void i18n_singular_name()
- public void i18n_plural_name()
- public static String radius_definition()
- public static void radius_definition_other_table()
- public static void point_exists()
- public void CMSEditLink()
- public void getCMSFields()
- public SiteTree getParentData()
- public String getAjaxInfoWindowLink()
- public String getParentClassName()
- public String getLink()
- public void addParentData()
- public void onBeforeWrite()
- protected void completePoints()
- public this|null findGooglePointsAndWriteIfFound()
- protected void findGooglePoints()
- protected void addDataFromArray()
- public String DirectionsLink()
Hierarchy
Extends
- DataObject
Members
private
- $casting
- $db
- $field_labels
- $has_one
- $indexes
- $parent_point_counts
- $plural_name
—
string
e.g. Pages / home Pages / Product Pages / My Pages - $singular_name
—
string
e.g. Page / home Page / Product Page / My Page - $summary_fields
Methods
protected
- addDataFromArray()
- completePoints() — complete points data
- findGooglePoints()
public
- CMSEditLink()
- DirectionsLink() — provides a links to Google Maps to search for directions
- addParentData() — add data from Parent to the object
- findGooglePointsAndWriteIfFound() — test to see if address is found. If address if found then it will write the object, otherwise it returns null.
- getAjaxInfoWindowLink()
- getCMSFields()
- getLink()
- getParentClassName()
- getParentData()
- i18n_plural_name()
- i18n_singular_name()
- onBeforeWrite()
- point_exists()
- radius_definition() — Provides MySQL snippet to work out distance between GoogleMapLocationsObject and location The method returns a string for use in queries The query snippet returns the distance between the GoogleMapLocationsObject and the latitude and longitude provided NOTE: 6378.137 is the radius of the earth in kilometers
- radius_definition_other_table()