.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Geo::Google::MapObject 3pm" .TH Geo::Google::MapObject 3pm "2022-12-12" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Geo::Google::MapObject \- Code to help with managing the server side of the Google Maps API .SH "VERSION" .IX Header "VERSION" Version 0.06 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 10 \& use HTML::Template::Pluggable; \& use HTML::Template::Plugin::Dot; \& use Geo::Google::MapObject; \& my $map = Geo::Google::MapObject\->new( \& key => \*(AqABQFbHAATHwok56Qe3MBtg0s7lgkHBS9HKneet7v0OIFhIwnBhTEGCHLTRRRBa_lUOCy1fDamS5PQt8qULYfYQ\*(Aq, \& zoom => 13, \& size => \*(Aq512x400\*(Aq, \& maptype => \*(Aqterrain\*(Aq, \& markers=> \& [ \& { \& location=>\*(Aq51.242844,0.011716\*(Aq, \& color=>\*(Aqgreen\*(Aq, \& label=>\*(AqP\*(Aq, \& title=>\*(AqPeriapt Technologies\*(Aq, \& href=>\*(Aqhttp://www.periapt.co.uk\*(Aq \& }, \& { \& location=>\*(Aq51.243757,0.006051\*(Aq, \& color=>\*(Aqred\*(Aq, \& label=>\*(AqC\*(Aq, \& title=>\*(AqCrown Roast Butchers\*(Aq, \& href=>\*(Aqhttp://www.crownroast.co.uk/\*(Aq \& }, \& ] \& ); \& my $template = HTML::Template::Pluggable\->new(file=>\*(Aqmap.tmpl\*(Aq); \& $template\->param(map=>$map); \& return $template\->output; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is intended to provide a server side solution to working with the Google Maps \s-1API.\s0 In particular an object of this class encapsulates a \*(L"map\*(R" object that provides support for the static maps \s-1API,\s0 the javascript maps \s-1API, AJAX\s0 calls and non-javascript fallback data; but without making many assumptions about the surrounding framework. We do assume that a template framework with support for a \*(L"dot\*(R" notation is being used, for example HTML::Template::Pluggable. An important commitment of the module is support for graceful and consistent fallback to a functional non-javascript web page. .PP The javascript and static Google map APIs do not behave in quite the same way when zoom and center are not specified. Specifically it works quite well with the static maps () but not so well with the javascript \s-1API.\s0 To compensate for this the module gives a choice between: specifying the center and zoom levels; allowing the APIs and client side code to do whatever they think best; using a built in algorithm to calculate a sensible zoom and center; and finally supplying ones own algorithm to calculate a sensible zoom and center. .SH "INTERFACE" .IX Header "INTERFACE" .SS "new" .IX Subsection "new" Supported arguments are .IP "autozoom" 4 .IX Item "autozoom" If no center and/or zoom is specified this parameter can be used to calculate suitable values by a process of averaging the markers. If this parameter is an integer between 0 and 21 then that number is taken as a maximum zoom level and the builtin algorithm, \f(CW\*(C`calculate_zoom_and_center\*(C'\fR, is used with that maximum zoom level. If the parameter is a \s-1CODE\s0 ref, then that function is used instead. The \s-1CODE\s0 ref must take an \s-1ARRAY\s0 ref of marker specifications as an input, and must return a pair consisting of the zoom level as an integer followed by a latitude-longitude string representing the center. Finally if the argument is blessed and has a \f(CW\*(C`calculate_zoom_and_center\*(C'\fR method, that will be used. For \s-1AUTO\s0 calculation of the center or zoom all the markers must be in the form \*(L"decimal,decimal\*(R". The \f(CW\*(C`json\*(C'\fR method will delete this as it has no meaning once the zoom level and center have been determined. .IP "center" 4 .IX Item "center" This must be a location that would be recognized by the Google maps \s-1API.\s0 If absent, and if no autozoom has been set, the Google maps \s-1API\s0 and client side javascript code must between them work out a center. .IP "zoom" 4 .IX Item "zoom" This represents the zoom level (), which is a number between 0 and 21 inclusive. If absent (with no autozoom set) the \s-1API\s0 and client will need to set it. .IP "size" 4 .IX Item "size" The size () must either be a string consisting of two numbers joined by the symbol \f(CW\*(C`x\*(C'\fR, or a hash ref with width and height parameters. In either case the first number is the width and the second the height. If absent the Google \s-1API\s0 will be allowed to set the size as it sees fit. .IP "format" 4 .IX Item "format" The optional format () must be one of \&'png8', 'png', 'png32', 'gif', 'jpg', 'jpg\-baseline'. If absent the Google \s-1API\s0 will be allowed to set the format as it sees fit. Note that although the \f(CW\*(C`json\*(C'\fR method will pass this on, it seems to have no meaning in the dynamic \s-1API.\s0 .IP "maptype" 4 .IX Item "maptype" This must be one of the following: 'roadmap', 'satellite', 'terrain', 'hybrid's described in . The \f(CW\*(C`json\*(C'\fR method will translate these into numerical codes roadmap => 0, satellite => 1, terrain => 2 and hybrid => 3 as this makes it easy for the javascript code () to translate this numerical code into the client side codes. For example: .Sp .Vb 2 \& var mapping = new Array(G_NORMAL_MAP, G_SATELLITE_MAP, G_PHYSICAL_MAP, G_HYBRID_MAP); \& var maptype = mapping[data.maptype]; .Ve .IP "mobile" 4 .IX Item "mobile" This parameter should be either the string 'true' or 'false' and defaults to 'false'. The static \s-1API\s0 uses it to provide more robust tiles as described in . However it seems to have no meaning for the dynamic \s-1API.\s0 .IP "key" 4 .IX Item "key" The mandatory \s-1API\s0 key. You can sign up for one at . .IP "sensor" 4 .IX Item "sensor" This parameter should be either the string 'true' or 'false' and defaults to 'false'. Both versions of the Google \s-1API\s0 require it () and this is reflected in this module by it being used by the \f(CW\*(C`static_map_url\*(C'\fR and \f(CW\*(C`javascript_url\*(C'\fR methods. .IP "markers" 4 .IX Item "markers" If present the markers should be an array ref of marker specifications so that it can be used in a \s-1TMPL_LOOP.\s0 Each marker specification should be a hash ref and may contain whatever keys are required by the javascript client side code. It must however have a \f(CW\*(C`location\*(C'\fR field which must be interpretable by the Google \s-1API\s0 as a location. In general this means the location must be a string of the form \*(L"decimal,decimal\*(R", where the first decimal is the latitude and the second longitude. Other fields might include for example: id, title, href, icon. Generally these just get passed through by the \f(CW\*(C`json\*(C'\fR method and should be used by the client side code as it sees fit. Three fields that have a special meaning, \f(CW\*(C`color\*(C'\fR, \f(CW\*(C`size\*(C'\fR, \f(CW\*(C`label\*(C'\fR are those described by the static maps \s-1API\s0 (). The GIcon class () contains lots of ways of specialising the look and feel of the markers in the dynamic \s-1API\s0; but I can find no easy way of consistently replicating the the static marker styles in the dynamic \s-1API.\s0 The only other field which gets special treatment is \f(CW\*(C`title\*(C'\fR. The \f(CW\*(C`json\*(C'\fR method will encode the title field. So for example if a marker has a title field of \f(CW\*(AqScloß\*(Aq\fR, then if the javascript code uses this as the title attribute when creating a GMarker, then hovering the mouse over that marker will display the German word for castle. .IP "hl" 4 .IX Item "hl" This parameter specifies the language to be used. If absent the \s-1API\s0 will select the language. Only the dynamic javascript \s-1API\s0 seems to use this parameter as described in . As such this is used in the \f(CW\*(C`javascript_url\*(C'\fR method. .SS "calculate_zoom_and_center" .IX Subsection "calculate_zoom_and_center" This function tales a reference to an array of marker specifications and a maximum zoom level and returns a pair consisting of a suggested zoom level and a center. .PP The algorithm works by iteratively building the following objects: .IP "A set of points, starting with the first element of the array and adding the next one at each iteration." 4 .IX Item "A set of points, starting with the first element of the array and adding the next one at each iteration." Actually we don't actually have a variable for this, but without thinking about this set conceptually I cannot state the algorithm. The set starts of consisting of just the first marker location. .ie n .IP """($ctheta, $cphi)""" 4 .el .IP "\f(CW($ctheta, $cphi)\fR" 4 .IX Item "($ctheta, $cphi)" These numbers represent a central point of the set of points represented as radians. The algorithm does not guarantee that the point is the true centre but we treat it as the centre of a circle. This starts of by taking the first element and converting its latitude and longitude to radians. .ie n .IP "$radius" 4 .el .IP "\f(CW$radius\fR" 4 .IX Item "$radius" This variable is initialised to 0. .IP "The contract" 4 .IX Item "The contract" The algorithm requires that at each iteration all the points in the set are at most \f(CW$radius\fR radians from ($ctheta, \f(CW$cphi\fR). .IP "The iteration" 4 .IX Item "The iteration" We look at the next point. We look at the distance (\f(CW$distance\fR) between the new point and \f(CW\*(C`($ctheta, $cphi)\*(C'\fR. If this is less than or equal to \f(CW$radius\fR the iteration is over. Otherwise the following happens: .Sp .Vb 2 \& ($ctheta, $cphi) = mid point of ($ctheta, $cphi) and the new point \& $radius = $radius + 0.5 * distance between ($ctheta, $cphi) and the new point .Ve .IP "At the end" 4 .IX Item "At the end" We convert \f(CW\*(C`($ctheta, $cphi)\*(C'\fR back to latitude and longitude and logarithmically convert the radius to a zoom level. .PP I doubt that this algorithm is optimal but it seems quick, uses only one pass through the markers and can be seen in action at . Also if you have a better one you can specify it by passing a suitable \s-1CODE\s0 ref or blessed scalar to the \f(CW\*(C`autozoom\*(C'\fR parameter of the constructor. .SS "static_map_url" .IX Subsection "static_map_url" Returns a \s-1URL\s0 suitable for use with the static maps \s-1API\s0 based upon the arguments passed to the constructor. .SS "javascript_url" .IX Subsection "javascript_url" Returns a \s-1URL\s0 suitable for use in loading the dynamic map \s-1API.\s0 .SS "markers" .IX Subsection "markers" This returns the marker array ref. .SS "json" .IX Subsection "json" This function uses the \s-1JSON\s0 module to return a \s-1JSON\s0 representation of the object. It removes the \s-1API\s0 key as that should not be required by any javascript client side code. If any marker object has a title attribute, then that attribute is encoded so it will display correctly during mouse overs. .SS "width" .IX Subsection "width" This returns the width of the image or undef if none has been set. .SS "height" .IX Subsection "height" This returns the height of the image or undef if none has been set. .SH "TUTORIAL" .IX Header "TUTORIAL" This module only covers the server side of a two way conversation between server and a talkative client. As such the tutorial must also consider \s-1HTML\s0 and javascript. Also to understand this tutorial we assume at least passing familiarity with the following: .ie n .IP "HTML::Template::Pluggable or some other templating framework using the ""dot"" notation." 4 .el .IP "HTML::Template::Pluggable or some other templating framework using the ``dot'' notation." 4 .IX Item "HTML::Template::Pluggable or some other templating framework using the dot notation." .PD 0 .IP "The Google maps \s-1API:\s0 ." 4 .IX Item "The Google maps API: ." .IP "The static Google maps \s-1API:\s0 " 4 .IX Item "The static Google maps API: " .IP "Javascript, \s-1AJAX.\s0 Specifically we are using the yui framework () though any other framework will do." 4 .IX Item "Javascript, AJAX. Specifically we are using the yui framework () though any other framework will do." .PD .SS "The markup" .IX Subsection "The markup" We probably have a template file, map.tmpl, some thing like the following: .PP .Vb 3 \& \& \& Test Map Tutorial \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \&
\& \& \&
Test map" \& width="" \& height="" \& /> \&
\& \& \& \& \&
\& \& \& .Ve .SS "The perl" .IX Subsection "The perl" The code to actually produce the web page must look something like this: .PP .Vb 7 \& use HTML::Template::Pluggable; \& use HTML::Template::Plugin::Dot; \& use Geo::Google::MapObject; \& my $t = HTML::Template::Pluggable\->new(filename => \*(Aqmap.tmpl\*(Aq); \& my $map = Geo::Google::MapObject\->new(....); \& $t\->param(maps=>$map); \& print $t\->output; .Ve .PP This is all that would be needed in a javascript free environment. With javascript enabled the client is going to ask for the same data in a \s-1JSON\s0 format (at least we are only supporting \s-1JSON\s0). The code to service that request will look something like: .PP .Vb 3 \& use Geo::Google::MapObject; \& my $map = Geo::Google::MapObject\->new(....); \& print $map\->json; .Ve .SS "The javascript" .IX Subsection "The javascript" As indicated in the markup above we are expecting the javascript to be in a file called maps.js. We expect it to look something like the following: .PP .Vb 1 \& function mapInitialize() { \& \& /* Read the "link" element that tells us how to contact the server. See markup above. */ \& var get_init_data = YAHOO.util.Dom.get(\*(Aqget_init_data\*(Aq).href; \& \& /* Build the AJAX callback object consisting of three parts. */ \& var callback = \& { \& \& /* Part I: Function called in the event of a successful call. */ \& success: function(o) { \& \& /* Convert the JSON response into a javascript object. \& This structure corresponds to the Geo::Google::MapObject in perl \& as intermediated by its "json" method. \& */ \& var data = YAHOO.lang.JSON.parse(o.responseText); \& \& if (GBrowserIsCompatible()) { \& \& /* Build up the Map object which will replace #map_canvas in the above markup. */ \& var mapopt = {}; \& if (data.size) { \& mapopt.size = new GSize(parseInt(data.size.width), parseInt(data.size.height)); \& } \& var markers = data.markers; \& var map = new GMap2(YAHOO.util.Dom.get("map_canvas"), mapopt); \& var maptype = null; \& if (data.maptype) { \& maptype = o.argument[parseInt(data.maptype)]; \& } \& var zoom = null; \& if (data.zoom) { \& zoom = parseInt(data.zoom); \& } \& var center = markers[0].location; \& if (data.center) { \& center = data.center; \& } \& map.setCenter(GLatLng.fromUrlValue(center), zoom, maptype); \& map.setUIToDefault(); \& \& /* Now for each marker build and add a GMarker object */ \& for(var i = 0; i < markers.length; i++) { \& \& var opt = {title: markers[i].title}; \& if (!markers[i].href) { \& opt.clickable = false; \& } \& if (markers[i].icon) { \& opt.icon = new GIcon(G_DEFAULT_ICON, markers[i].icon); \& if (markers[i].shadow) { \& opt.icon.shadow = markers[i].shadow; \& } \& } \& var mark = new GMarker(GLatLng.fromUrlValue(markers[i].location), opt); \& if (markers[i].href) { \& mark.href = markers[i].href; \& GEvent.addListener(mark, "click", function(){window.location=this.href;}); \& } \& map.addOverlay(mark); \& } \& } \& }, /* End of Part I */ \& \& /* Part II: Function called in the event of failure */ \& failure: function(o) {alert(o.statusText);}, \& \& /* Part III: Data that is passed to the success function. \& We are using this to map from numerical maptypes that Geo::Google::MapObject has passed us to the \& forms used in Google maps API. \& */ \& argument: [G_NORMAL_MAP, G_SATELLITE_MAP, G_PHYSICAL_MAP, G_HYBRID_MAP] \& \& }; /* End of constructing the AJAX callback object. */ \& \& /* This calls the server which should hopefully kick off callback.success with lots of lovely data. */ \& var transaction = YAHOO.util.Connect.asyncRequest(\*(AqGET\*(Aq, get_init_data, callback, null); \& \& } /* end of mapInitialize function */ \& \& /* This will make sure that we call the above function at a good time. */ \& YAHOO.util.Event.onDOMReady(mapInitialize); \& \& /* We still have to do the memory cleanup ourselves. */ \& YAHOO.util.Event.addListener(window, \*(Aqunload\*(Aq, \*(AqGUnload\*(Aq); .Ve .SS "Taking it further" .IX Subsection "Taking it further" There are lots of variations that can be done with this. The Geo::Google::MapObject object will pass on all fields it does not recognize via the \f(CW\*(C`json\*(C'\fR function and these can be used by the javascript in whatever way required. Similarly fields added to the marker specification will be passed by the \f(CW\*(C`markers\*(C'\fR function and can be used in the template in whatever way required. .PP You can also make the markers draggable and have the act of dragging a marker update data on the server. There is an example of where this has been done at . The details of how this is done depend intrinsically on the implementation of the data storage on the server. I would suggest that in general the steps required to make the markers draggable might be as follows: .IP "Clean interface to the data storage." 4 .IX Item "Clean interface to the data storage." I think this is a clear case where an \s-1ORM\s0 () offers some advantages. You could look at DBIx::Class or write your own interface using \s-1DBI\s0. .IP "Derive a class from Geo::Google::MapObject." 4 .IX Item "Derive a class from Geo::Google::MapObject." Your derived class constructor should get the data you need from the data storage interface layer, use it to create a Geo::Google::MapObject and bless that into your derived class. .IP "Provide URLs that update the data underlying your map objects." 4 .IX Item "Provide URLs that update the data underlying your map objects." These will probably be \s-1POST\s0 methods and need not return anything other than an \*(L"\s-1OK\*(R"\s0 string. They should probably call the data storage interface layer directly to update the data. There is no point creating a map object merely to update the underlying data. .IP "Add link elements to your markup indicating which \s-1URL\s0 is needed to update the marker data." 4 .IX Item "Add link elements to your markup indicating which URL is needed to update the marker data." .Vb 1 \& .Ve .Sp An advantage of using these link elements is that you might have multiple maps to manage. By using the link elements to communicate with the client side, a lot more code and templates can be reused. .IP "Get the javascript side to read your new link elements." 4 .IX Item "Get the javascript side to read your new link elements." .Vb 1 \& var move_marker = YAHOO.util.Dom.get(\*(Aqmove_marker\*(Aq).href; .Ve .ie n .IP "Add a ""draggable"" flag to the GMarker constructor" 4 .el .IP "Add a \f(CWdraggable\fR flag to the GMarker constructor" 4 .IX Item "Add a draggable flag to the GMarker constructor" .Vb 1 \& var opt = {title: markers[i].title, draggable: true}; .Ve .IP "Make sure your GMarkers are labelled in a way that your server can understand" 4 .IX Item "Make sure your GMarkers are labelled in a way that your server can understand" Just after the GMarker object, mark, has been created add .Sp .Vb 1 \& mark.label = markers[i].label; .Ve .ie n .IP "Make your GMarker object subscribe to the ""dragend"" event." 4 .el .IP "Make your GMarker object subscribe to the \f(CWdragend\fR event." 4 .IX Item "Make your GMarker object subscribe to the dragend event." .Vb 10 \& GEvent.addListener(mark, \& "dragend", \& function(latlng) { \& var location = latlng.toUrlValue(12); \& var postdata = "id="+this.label+"&location="+location; \& YAHOO.util.Connect.asyncRequest(\*(AqPOST\*(Aq, \& move_marker, \& { \& success: function(o){}, \& failure: function(o) {alert(o.statusText);}, \& argument: [] \& }, \& postdata); \& }); .Ve .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .ie n .IP """markers should be an ARRAY""" 4 .el .IP "\f(CWmarkers should be an ARRAY\fR" 4 .IX Item "markers should be an ARRAY" The markers parameter of the constructor must be an \s-1ARRAY\s0 ref of marker configuration data. .ie n .IP """no API key""" 4 .el .IP "\f(CWno API key\fR" 4 .IX Item "no API key" To use this module you must sign up for an \s-1API\s0 key (http://code.google.com/apis/maps/signup.html) and supply it as the key parameter. .ie n .IP """zoom not a number: %s""" 4 .el .IP "\f(CWzoom not a number: %s\fR" 4 .IX Item "zoom not a number: %s" There must be a zoom parameter which is a number from 0 to 21. .ie n .IP """maptype %s not recognized""" 4 .el .IP "\f(CWmaptype %s not recognized\fR" 4 .IX Item "maptype %s not recognized" The maptype must be one of roadmap, satellite, terrain, hybrid. .ie n .IP """no width""" 4 .el .IP "\f(CWno width\fR" 4 .IX Item "no width" .PD 0 .ie n .IP """no height""" 4 .el .IP "\f(CWno height\fR" 4 .IX Item "no height" .ie n .IP """width should be positive and no more than 640""" 4 .el .IP "\f(CWwidth should be positive and no more than 640\fR" 4 .IX Item "width should be positive and no more than 640" .ie n .IP """height should be positive and no more than 640""" 4 .el .IP "\f(CWheight should be positive and no more than 640\fR" 4 .IX Item "height should be positive and no more than 640" .ie n .IP """cannot recognize size""" 4 .el .IP "\f(CWcannot recognize size\fR" 4 .IX Item "cannot recognize size" .PD The size parameter must either be a string like \*(L"300x500\*(R" or a hash array like {width=>300,height=>500}. And both width and height must be between 1 and 640 inclusive. .ie n .IP """cannot calculate autozoom without markers""" 4 .el .IP "\f(CWcannot calculate autozoom without markers\fR" 4 .IX Item "cannot calculate autozoom without markers" If you pass an \f(CW\*(C`autozoom\*(C'\fR parameter to the constructor you must also pass at least one marker. .ie n .IP """% not recognized as autozoom""" 4 .el .IP "\f(CW% not recognized as autozoom\fR" 4 .IX Item "% not recognized as autozoom" An autozoom parameter was passed to the constructor that was not recognized as such. .ie n .IP """location missing""" 4 .el .IP "\f(CWlocation missing\fR" 4 .IX Item "location missing" A marker specification was missing a location during autozoom calculation. .ie n .IP """no location for %s""" 4 .el .IP "\f(CWno location for %s\fR" 4 .IX Item "no location for %s" Every marker object must have a location. .SH "CONFIGURATION AND ENVIRONMENT" .IX Header "CONFIGURATION AND ENVIRONMENT" Geo::Google::MapObject requires no configuration files or environment variables. .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" .IP "Templating framework" 4 .IX Item "Templating framework" We assume the use of HTML::Template::Pluggable and HTML::Template::Plugin though other template frameworks may work. .IP "Google Maps \s-1API\s0" 4 .IX Item "Google Maps API" You need to have one of these which can be obtained from . .IP "Javascript and \s-1AJAX\s0" 4 .IX Item "Javascript and AJAX" We assume a degree of familiarity with javascript, \s-1AJAX\s0 and client side programming. For the purposes of documentation we assume \s-1YUI:\s0 , but this choice of framework is not mandated. .IP "Math::Trig" 4 .IX Item "Math::Trig" The autozoom algorithm optionally used by this module depends upon the Math::Trig for its mathematical calculations. Since alternative algorithms or no algorithm at all can be used, I think it might be better to have this as a separate module. .SH "INCOMPATIBILITIES" .IX Header "INCOMPATIBILITIES" None reported. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" .IP "paths etc" 4 .IX Item "paths etc" Currently there is no support for paths, polygons or viewports. .IP "version 3" 4 .IX Item "version 3" We are currently only supporting version 2 of the \s-1API.\s0 .IP "testing" 4 .IX Item "testing" We encode the title attributes of markers in the \f(CW\*(C`json\*(C'\fR function as this seems to be necessary. However I have not yet managed to get a decent test script for this behaviour. There are many other cases that should be tested though I think the most critical cases have been tested. .IP "character encoding" 4 .IX Item "character encoding" This module is only tested against \s-1UTF\-8\s0 web pages. I have no intention of changing this as I cannot think of why anyone would consciously choose to encode web pages in any other way. I am open to persuasion however. .PP Please report any bugs or feature requests to \&\f(CW\*(C`bug\-geo\-google\-mapobject@rt.cpan.org\*(C'\fR, or through the web interface at . .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" Thanks to Andreas Koenig for pointing out that this module had an issue with \f(CW\*(C`Build.PL\*(C'\fR. .SH "AUTHOR" .IX Header "AUTHOR" Nicholas Bamber \f(CW\*(C`\*(C'\fR .SH "LICENCE AND COPYRIGHT" .IX Header "LICENCE AND COPYRIGHT" Copyright (c) 2009, Nicholas Bamber \f(CW\*(C`\*(C'\fR. All rights reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. .SH "DISCLAIMER OF WARRANTY" .IX Header "DISCLAIMER OF WARRANTY" \&\s-1BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE \*(L"AS IS\*(R" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.\s0 .PP \&\s-1IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE\s0 (\s-1INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE\s0), \s-1EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\s0