The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IWL::Google::Map - a button with a background

INHERITANCE

IWL::Error -> IWL::Object -> IWL::Widget -> IWL::Container -> IWL::Google::Map

DESCRIPTION

The Google Map widget provides an easy way of creating maps, provided by Google.

CONSTRUCTOR

IWL::Google::Map->new ([%ARGS])

Where %ARGS is an optional hash parameter with with key-value options:

key => STRING

The key argument is required, unless the GOOGLE_MAPS_KEY configuration option has been set. If no key is provided, the map will set a fatal error on itself. A key can be obtained here:

http://www.google.com/apis/maps/signup.html

latitude

See IWL::Google::Map::setLatitude()

longitude

See IWL::Google::Map::setLongitude()

zoom

See IWL::Google::Map::setZoom()

mapType

See IWL::Google::Map::setMapType()

dragging

If true, enables dragging the map. Defaults to 1

infoWindow

If true, enables info window operations. Defaults to 1

doubleClickZoom

If true, enables zooming by double-clicking. Defaults to 1

scrollWheelZoom

If true, enables zooming by the mouse scroll-wheel. Defaults to 1

googleBar

If true, replaces the Google logo in the lower left corner of the map with a Google bar. Defaults to ''

language

Sets the language of the map tooltips. If not set, the language is set based on the LANG or LANGUAGE environment variables.

METHODS

setWidth (WIDTH)

Sets the given width as the width of the map

Parameters: WIDTH - the width with the appropriate dimensions

setHeight (HEIGHT)

Sets the given height as the height of the map

Parameters: HEIGHT - the height with the appropriate dimensions

setLongitude (LONGITUDE)

Sets the given longitude as the initial longitude of the map

Parameters: LONGITUDE - the longitude, -180 <=> 180

setLatitude (LATITUDE)

Sets the given latitude as the initial latitude of the map

Parameters: LATITUDE - the latitude, -90 <=> 90

setZoom (ZOOM)

Sets the given zoom as the initial zoom of the map

Parameters: ZOOM - the zoom >= 0

setMapType (TYPE)

Sets the initial map type

Parameters: TYPE - the map type, one of:

normal

Normal map

satellite

Satellite map

hybrid

Mixed normal/satellite map

physical

Physical map

setScaleView (TYPE)

Sets the scale view of the map

Parameters: TYPE - the scale type, either none, or ruler

setMapControl (CONTROL)

Sets the map control

Parameters: CONTROL - the control type, one of none ,smal, large or smallZoom

setMapTypeControl (CONTROL)

Sets the control for selecting the map type

Parameters: CONTROL - the control type, one of none, normal, menu, hierarchical

setOverview (TYPE)

Sets the overview type of the map

Parameters: TYPE - the overview, one of none, mini

addMarker ([CONTENT, LATITUDE, LONGITUDE])

Adds a marker to the map

Parameters: CONTENT - the optional content of the information window, which will appear if the marker is clicked. Can be a string, html or IWL::Object, LATITUDE - the latitude of the marker, LONGITUDE - the longitude of the marker. If the coordinates are not supplied, the initial map coordinates will be used.

updateOnSignal (SIGNAL, ELEMENT, FORMAT)

Updates the given ELEMENT with data, formatted using FORMAT when SIGNAL has been emitted.

Parameters: SIGNAL - the signal to which to connect. ELEMENT - the element to update, it must have a valid id. FORMAT - the format, which will be used to format the date. Ordinary characters placed in the format string are not modified. If a character is preceded by '%', it is modified as follows:

c

The stringified center of the map, consists of the current latitude and longitude of the map, surrounded by parenthesis. Example: (51.236123, 21,16123)

x

The current longitude of the map.

y

The current latitude of the map.

z

The current zoom level of the map.

LICENCE AND COPYRIGHT

Copyright (c) 2006-2007 Viktor Kojouharov. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 422:

You forgot a '=back' before '=head1'