Added makekml.pl script, this time with autowriting to correct location

main
silverwizard 4 years ago
parent bb1f374f69
commit b3af15ba7a
  1. 4
      makekml.pl

@ -1,10 +1,11 @@
#!/usr/bin/env perl
use MediaWiki::API;
use Switch;
use strict;
use URI::Escape;
use Geo::KML;
my $filename = 'ours.kml';
my $filename = '/var/www/mediawiki/ShadowMap/ours.kml';
my $out = &create_styles;
my $kml = Geo::KML->new(version => '2.2.0');
@ -28,6 +29,7 @@ foreach (@{$articles}) {
my @locs = split /\|/ , $&;
foreach(@locs) {
my @tokens = split(/=/, $_);
$tokens[1] =~ s/\}//g;
switch($tokens[0]) {
case "Latitude" { $lat = $tokens[1] }
case "Longitude" { $long = $tokens[1] }

Loading…
Cancel
Save