2 <& /elements/header-popup.html, {
4 head => include('.head'),
5 etc => 'onload="initialize()"',
10 <div id="map_canvas"></div>
13 <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
15 <style type="text/css">
18 body { height: 100%; margin: 0px; padding: 0px }
20 #map_canvas { height: 100%; }
22 @media print { #map_canvas { height: 500px; margin: 0; } }
25 <script type="text/javascript"
26 src="https://maps.google.com/maps/api/js?v=3.4&sensor=false">
29 <script type="text/javascript">
33 function initialize() {
34 var latlng = new google.maps.LatLng(<%$lat%>, <%$lon%>);
39 mapTypeId: google.maps.MapTypeId.ROADMAP
42 map = new google.maps.Map(
43 document.getElementById("map_canvas"),
46 map.setOptions( {rotateControl : true });
51 title: <%$name |js_string%>
53 var marker = new google.maps.Marker(markerOptions);
58 my ($lat, $lon, $name);
62 $name = $cgi->param('name');
64 $lat = $cgi->param('lat');
65 $lon = $cgi->param('lon');
66 $lat =~ /^-?\d+(\.\d+)?$/ or die "bad latitude: $lat";
67 $lon =~ /^-?\d+(\.\d+)?$/ or die "bad longitude: $lat";