<%args> @features @overlays <%doc> Generic Google Maps front end. <& /elements/gmap.html, features => [ { id => 'svc_acct/12', geometry => { type => 'Point', coordinates => [ -86, 40 ], # optionally altitude as the third coord }, properties => { # see https://developers.google.com/maps/documentation/javascript/3.exp/reference#Data.StyleOptions style => { icon => { scale => 4, fillColor => 'orange', } }, # content of popup info box (might AJAX this later) content => 'username@example.com', } }, # end of feature ], overlays => [ { url => 'https://localhost/freeside/view/sector_map-png.html?102', west => -130.0, east => -128.0, south => 10.0, north => 12.0, }, # make a ground overlay ], &> <%init> my $apikey = FS::Conf->new->config('google_maps_api_key'); foreach (@features) { $_->{type} = 'Feature'; # any other per-feature massaging can go here } my $tree = { type => 'FeatureCollection', features => \@features };