Archiv verlassen und diese Seite im Standarddesign anzeigen : Interaktive Karte
Ich kenn mich zuwenig mit der wiki Software aus, es gibt aber ein plugin das positionen auf karten ausgibt. das waäre doch für die Touren, optimal, s.h.: http://scout-o-wiki.de/index.php/Kategorie:DPSG-Stamm
Hier der code:
<MapPoints>
[
http://scout-o-wiki.de/images/f/fc/Karte-Deutschland.jpg
http://scout-o-wiki.de/images/b/b0/DPSG-mappoint.gif
12
300
0.028662571242
-0.017977324880
5.499161111111
55.115925000000
]
{
7.9552
47.96254
http://www.scout-o-wiki.de/index.php/DPSG Stamm Antoine de Saint Exupéry Kirchzarten
Stamm Antoine de Saint Exup�ry Kirchzarten
}
{
8.76754
50.80916
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_St._Michael_Marburg
Stamm St. Michael Marburg
}
{
7.971954
48.56434
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_St._Martin_Urloffen
Stamm St. Martin Urloffen
}
{
11.74729
49.5022
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_Sulzbach
Stamm Sulzbach
}
{
10.60737
47.75243
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_Cassiopeia_Marktoberdorf
Stamm Cassiopeia Marktoberdorf
}
{
10.13186
47.98895
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_Don_Bosco_Buxheim
Stamm Don Bosco Buxheim
}
{
8.91522
50.13579
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_Speerflug_Hanau
Stamm Speerflug Hanau
}
{
6.4433
51.1660
http://cityscouts.org/
Stamm Cityscouts Rheydt
}
{
8.87279816512066
48.5990183698181
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_Herrenberg
Stamm Herrenberg
}
{
9.1602
48.4600
http://www.scout-o-wiki.de/index.php/DPSG_Stamm_Sankt_Franziskus_Obert%C3%BCrkheim
Stamm Sankt Franziskus - Obertürkheim
}
</MapPoints>
http://de.wikipedia.org/wiki/Wikipedia:WikiProjekt_Georeferenzierung#Visualisierung_von_Punkten_auf_georeferenzierten_Karten_-_Point-Mapping_Extension
Hi Scout1,
das ist ja echt eine super Sache!
Jetzt müssen wir nur noch die Referenzpunkte der einzelnen Trails rausbekommen, oder?
Mfg,
jasper
Ich denk das Plugin ist noch nicht insatlliert. Zumindest hat der test unter:
http://wiki.outdoorseiten.net/index.php/Testseite
nicht funktioniert.
Musst du schon sagen, dass da noch ein Plugin notwendig ist! :bg:
Bin jetzt aber voll im Stress, der Flieger nach Schweden geht morgen.
Da wahrscheinlich kein anderer Zugriff hat, muss ich das bis nach dem Urlaub verschieben!
<?php
# MapPoints by Heinz-Josef Lücking h-j.luecking@t-online.de
#
# Copy this text into a file called "MapPoints.php" and save it into the directory "extensions"
# To activate the extension, include it from your LocalSettings.php
# with: include("extensions/MapPoints.php");
# Hint: Do'nt mix up MapPoints with the older version MapPoint!
#
#
# Licence: "Creative Commons", explicit http://creativecommons.org/licenses/by-sa/2.0/de/deed.en
#
# visit http://www.giswiki.org
#
# Have fun
#
$wgExtensionFunctions[] = "wfMapPoints";
function wfMapPoints() {
global $wgParser;
$wgParser->setHook( "MapPoints", "renderMapPoints" );
}
function renderMapPoints( $input ) {
#----------------------------------------#
# Splits input into basic map and points #
#----------------------------------------#
$s = $input;
$s = str_replace("\n\r","|",$s);
$s = str_replace("\n","|",$s);
$s = str_replace("\r","|",$s);
$s = str_replace("[|","[",$s);
$s = str_replace("|]","]",$s);
$s = str_replace("{|","{",$s);
$s = str_replace("|}","}",$s);
$s = str_replace("]|{","]{",$s);
$s = str_replace("}|","}",$s);
preg_match_all('/([\[\]{}])(.*?)([\[\]{}])/', $s, $matches, PREG_SET_ORDER);
# explode
foreach($matches as $match) {
$varAr[] = explode('|', $match[2]);
}
#------
# MAP #
#------
# Image(Map) and Point-file
$varURLMap = $varAr[0][0];
$varURLPoint = $varAr[0][1];
$PointExt = $varAr[0][2]; # PointSize (width = height)
# Getting some image-information
$varMapWidth = $varAr[0][3]; # the width the image should be displayed
$size = getimagesize("$varURLMap");# the real size of the image
$height = $size[1]; # real height
$width = $size[0]; # real width
$varZoom = $varMapWidth / $width; # zoom-factor
$varMapHeigth = $height * $varZoom; # computed image-heigth
# Georeferencing the image (see http://en.wikipedia.org/wiki/World_file)
$A = $varAr[0][4];
$E = $varAr[0][5];
$C = $varAr[0][6];
$F = $varAr[0][7];
#---------
# POINTS #
#---------
foreach($varAr as $k=>$v) {
if($k>0) {
$varPointLon = $v[0];
$varPointLat = $v[1];
# Calculating the position of the point on the image
$xImg = ((($varPointLon - $C) / $A) * $varZoom) - ($PointExt / 2);
$yImg = ((($varPointLat - $F) / $E) * $varZoom) - ($PointExt / 2);
# Adding an additional Link to the point;
if ($v[2] == "") {$varHRef = "";} else {$varHRef = " href=\"".$v[2]."\""; }
# for Hints (Mousover) and the <alt> tag
if ($v[3] == "") {$varTitle = ""; $varAlt = "";} else {$varTitle = " title=\"".$v[3]."\""; $varAlt = " alt=\"".$v[3]."\""; }
# add some random text to <div id="myMapPoints...
$MapRand = rand();
$aPoint .= "<div id=\"myMapPoints".$MapRand."\" class=\"\" style=\"position: relative; left: 0px; top: 0px; width: 0px; height: 0px; visibility: visible;\"> <a ".$varHRef." ".$varTitle."><img name=\"myMapPoints_\" style=\"opacity: 1.0; position: absolute; top: ".$yImg."px; left: ".$xImg."px;\" src=\"".$varURLPoint."\" height=\"".$PointExt."\" width=\"".$PointExt."\" ".$varAlt." ></a></div>";
}
}
#---------------------#
# Building the output #
#---------------------#
$MapRand = rand(); # add some random text to <div id="MapPoints...
$output = "<div id=\"MapPoints".$MapRand."\" class=\"MapPoints\" style=\"position: relative; left: 0px; top: 0px; width: ".$varMapWidth."px; height: ".$varMapHeigth."px; visibility: visible; background-color: white;\"> <img name=\"myMap\" style=\"position: absolute; top: 0pt; left: 0pt;\" src=\"".$varURLMap."\" height=\"".$varMapHeigth."\" width=\"".$varMapWidth."\"> ".$aPoint."</div>";
return $output;
}
?>
MfG,
Jasper
hast du das plugin installiert???
Ja, ist installiert!
Meldet aber leider ein paar Fehler!
Siehe Testseite
MfG,
Jasper
wäre cool wenn du es hinkommst!!!
Mephisto
14.09.2006, 20:29
Äh, sorry, ich kann keine Karte finden...
http://img163.imageshack.us/img163/9208/bildschirmfotohq5.th.png (http://img163.imageshack.us/my.php?image=bildschirmfotohq5.png)
Genau das ist das Problem. Er erkennt die Bildgröße nicht automatisch.
MfG,
Jasper
Mephisto
15.09.2006, 15:31
Achso...
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.