\GoogleMapDataResponse
The way the map works is that you open a page, which loads the initial page with the map points being loaded as a separate XML doc.
This controller returns the Google Map data XML sheet
You can show one point by adding ?i=123
Where 123 is the ID of a GoogleMapLocationsObject
Here are other return options for the Map ....
'index' / 'showemptymap' => map without anything on it, fallback
'showpagepointsmapxml' => show points from the current page
'showchildpointsmapxml' => show points from the child pages (all child pages)
'showdirectchildren' => show points from the child pages (direct ones only)
'showsearchpoint' =>
'showcustompagesmapxml' => these are sitetree elements loaded by session
'showcustomdosmapxml' =>
'showdataobjects' =>
'updatemexml' =>
'showaroundmexml' =>
'showpointbyid' => can also be more than one ID
Synopsis
class GoogleMapDataResponse
extends Controller
{
- // members
- private static string $session_var_prefix = "addCustomGoogleMap";
- private static integer $increase_factor_if_nothing_found = 0;
- private static array $url_handlers = ;
- private static array $allowed_actions = ;
- private static Array $actions_without_owner = ;
- protected SiteTree $owner = NULL;
- protected Float $lng = 0;
- protected Float $lat = 0;
- protected String $title = "";
- protected Stringsql $filterCode = "";
- protected String $secondFilterCode = "";
- protected GoogleMap $map = NULL;
- // methods
- protected static void session_var_name()
- public static void add_custom_google_map_session_data()
- public static void set_custom_google_map_session_data()
- public static Array get_custom_google_map_session_data()
- public static void clear_custom_google_map_session_data()
- public void init()
- public void setOwner()
- public void setTitle()
- public void setLng()
- public void setLat()
- public void setFilterCode()
- public String index()
- public String showemptymap()
- public String showpagepointsmapxml()
- public String showchildpointsmapxml()
- public String showdirectchildren()
- public String showsearchpoint()
- public String showpointbyid()
- public String showcustompagesmapxml()
- public String showcustomdosmapxml()
- public String showaroundmexml()
- public String updatemexml()
- public GoogleMap GoogleMapController()
- protected String makeXMLData()
- public static [type] xml_sheet()
- public static String quick_static_map()
- protected static String make_static_map_url_into_image()
Hierarchy
Extends
- Controller
Members
private
- $actions_without_owner — Array
- $allowed_actions
- $increase_factor_if_nothing_found
- $session_var_prefix
-
$url_handlers
Default URL handlers - (Action)/(ID)/(OtherID)
protected
Methods
protected
public
- GoogleMapController()
- add_custom_google_map_session_data()
- clear_custom_google_map_session_data()
- get_custom_google_map_session_data()
- index()
- init()
- quick_static_map() — var arrayOfLatitudeAndLongitude: Array (Latitude" => 123, "Longitude" => 123, "Marker" => "red1"); Marker is optional
- setFilterCode()
- setLat()
- setLng()
- setOwner()
- setTitle()
- set_custom_google_map_session_data()
- showaroundmexml() — Show what is around my points
- showchildpointsmapxml()
- showcustomdosmapxml() — load a custom set of GoogleMapLocationsObjects
- showcustompagesmapxml() — load data from session
- showdirectchildren()
- showemptymap()
- showpagepointsmapxml()
- showpointbyid()
- showsearchpoint()
- updatemexml() — URL must contain for GET variables i - ID of owner a - action x - lng y - lat
- xml_sheet()