safe => 0,
rebuild => 1,
},
+ osm_map_url => {
+ type => "string",
+ example => "/tiles/\${z}/\${x}/\${y}.png",
+ description => "Url to get map tiles from (if none specified, uses the openstreetmap server, see http://wiki.openstreetmap.org/wiki/Creating_your_own_tiles for more info on serving your own tiles)",
+ safe => 0,
+ rebuild => 1,
+ },
}
DATA_MODE => 1, ENCODING => 'UTF-8');
$writer->xmlDecl();
$writer->startTag("kml", "xmlns" => "http://www.opengis.net/kml/2.2");
+ $writer->startTag("Document");
# first pass: get the icons
foreach my $name (keys %{$waypoints{$map}}) {
$writer->endTag();
}
$writer->endTag();
+ $writer->endTag();
$writer->end();
writefile("pois.kml", $config{destdir} . "/$map", $output);
my $name=shift;
my %options=@_;
+ my $mapurl = $config{osm_map_url};
+
eval q{use JSON};
error $@ if $@;
$options{'kmlurl'} = urlto($map."/pois.kml");
}
+ if ($mapurl) {
+ $options{'mapurl'} = $mapurl;
+ }
+
return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
}