Google.php
This contains Wizard’s 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
Table of Contents
- wtkGetTimeZoneFromGeoCodes() : string
- Pass in Latitude and Longitude and Google will return Time Zone.
- wtkGmap() : null
- Call this function to create a Google map with markers where your locations are.
- wtkMapLink() : html
- Create a link to native mapping based on device type.
Functions
wtkGetTimeZoneFromGeoCodes()
Pass in Latitude and Longitude and Google will return Time Zone.
wtkGetTimeZoneFromGeoCodes(
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
Return values
string —time zone
wtkGmap()
Call this function to create a Google map with markers where your locations are.
wtkGmap
(
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 /wtk/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
Return values
null —wtkMapLink()
Create a link to native mapping based on device type.
wtkMapLink(
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
Return values
html —for link to map