1 <& /elements/init_overlib.html &>
3 <& /elements/popup_link.html,
4 'action' => $p. 'view/map.html?'. $query,
6 'actionlabel' => $js_name,
13 <& /elements/popup_link.html,
14 'action' => $p. "view/directions.html?origin=$origin;". $query,
15 'label' => mt('directions'),
16 'actionlabel' => $js_name,
22 <A HREF="<%$p%>view/kml.cgi?<% $query %>"><% mt('earth') |h %></A>
27 my ($latitude, $longitude, $name, $agentnum);
30 $latitude = $opt{latitude};
31 $longitude = $opt{longitude};
33 $agentnum = $opt{agentnum};
35 ($latitude, $longitude, $name, $agentnum) = @_;
38 my $query = 'name='. uri_escape_utf8($name).
43 $js_name =~ s/[<>"']/ /g;
44 $m->interp->apply_escapes($js_name, 'js_string');
48 my $conf = new FS::Conf;
49 my $apikey = $conf->config('google_maps_api_key');
52 my @origin = $opt{company_address}
53 ? @{ $opt{company_address} }
54 : ( $conf->config('company_physical_address', $agentnum)
55 ? $conf->config('company_physical_address', $agentnum)
56 : $conf->config('company_address', $agentnum) );
57 my $origin = uri_escape(join(',', @origin));