Wizards Toolkit Documentation

Google.php

This contains Wizards Toolkit functions for Google API calls and Map Links.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Tags
author
Programming Labs
license
All rights reserved
version
2.0

Table of Contents

wzGetTimeZoneFromGeoCodes()  : string
Pass in Latitude and Longitude and Google will return Time Zone.
wzGmap()  : null
Call this function to create a Google map with markers where your locations are.
wzMapLink()  : html
Create a link to native mapping based on device type.

Functions

wzGetTimeZoneFromGeoCodes()

Pass in Latitude and Longitude and Google will return Time Zone.

wzGetTimeZoneFromGeoCodes( string  $fncLatitude , string  $fncLongitude [, string  $fncBasic = 'N' ] ) : string
Parameters
$fncLatitude : string
$fncLongitude : string
$fncBasic : string = 'N'

defaults to 'N'; if set to 'Y' then will change 'America/Los_Angeles' to 'US/Pacific' and other similar US time zones to basic options like US/Eastern, US/Mountain, etc.

Tags
global

string $gloGoogleApiKey must be defined in wz/wzServerInfo.php for this to work

Return values
string

time zone

wzGmap()

Call this function to create a Google map with markers where your locations are.

wzGmap ( mixed  $fncLat , mixed  $fncLng [, string  $fncIcon = '' ] [, string  $fncTitle = '' ] [, string  $fncInfo = '' ] [, string  $fncCall = 'marker' ] ) : null

First time this is called the last parameter must be 'init'. Thereafter leave last parameter empty and function builds markers. This does require gmaps.js to work.

Parameters
$fncLat : mixed
$fncLng : mixed
$fncIcon : string = ''

optionally pass icon to use as marker. Put file in /wz/imgs/map/' . $fncIcon . ".png

$fncTitle : string = ''

optionally include 'title'

$fncInfo : string = ''

optionally include text to be in infoWindow

$fncCall : string = 'marker'

defaults to 'marker' but initial call this needs to pass 'init'

Tags
global

string $gloGoogleApiKey must be defined in wz/wzServerInfo.php for this to work

global

string $gloMapJScenter filled with code to make Google and GMaps work

global

string $gloMapJS this receives JavaScript to make Map work

Return values
null

Create a link to native mapping based on device type.

wzMapLink( string  $fncLatitude , string  $fncLongitude) : html

If iOS will direct to http://maps.apple.com If Android will direct to https://google.com/maps otherwise will direct to http://www.google.com/maps

Parameters
$fncLatitude : string
$fncLongitude : string
Tags
uses
class

Mobile_Detect

Return values
html

for link to map

Search results