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