Skip to content

classes_lib_google_gmap.class

Daniel Spors edited this page Dec 19, 2023 · 3 revisions

Classes in file lib/google/gmap.class.php

class gMap

This is a google map. See https://developers.google.com/maps/documentation/javascript/tutorial

Extends: GoogleControl » Control » Renderable

AddAddress

Adds an address to the map. Will use googles geolocation to resolve the address to a marker.

Definition: public function AddAddress($address, $title=false)

Returns: static

Parameters:

  • string $address The address as string

  • string $title An optional title

AddMarker

Adds a marker to the map.

Definition: public function AddMarker($lat, $lng, $options)

Returns: static

Parameters:

AddMarkerTitled

Shortcut for a named marker.

Definition: public function AddMarkerTitled($lat, $lng, $title, $options)

Returns: static

Parameters:

FindGeoLocation

Finds a geolocation from a search string.

Definition: static public function FindGeoLocation($search)

Returns: mixed An object containing formatted_address, latitude and longitude or false on error

Parameters:

  • string $search Search string

PreRender

OVERRIDE GoogleControl::PreRender

setCenterPoint

Sets the maps center point.

Definition: public function setCenterPoint($lat, $lng)

Returns: static

Parameters:

  • float $lat Latitude

  • float $lng Longitude

setType

Sets the maps type.

Definition: public function setType($type)

Returns: static

Parameters:

  • string $type One of gMap::ROADMAP, gMap::SATELLITE, gMap::HYBRID, gMap::TERRAIN

setUiDisabled

En-/Disabled the default map UI

Definition: public function setUiDisabled($disabled=false)

Returns: static

Parameters:

  • bool $disabled If true UI will be disabled

setZoom

Sets the maps zoom level.

Definition: public function setZoom($zoomlevel)

Returns: static

Parameters:

  • int $zoomlevel The initial zoom level

__construct

Definition: public function __construct($options)

Returns: NOT DOCUMENTED

Parameters:

Clone this wiki locally