Index: trunk/extensions/SlippyMap/SlippyMap.worldwind.php |
— | — | @@ -1,141 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | -* |
5 | | -* @file |
6 | | -* |
7 | | -* @description |
8 | | -* OpenStreetMap SlippyMap - MediaWiki extension |
9 | | -* |
10 | | -* This defines what happens when <slippymap> tag is placed in the wikitext |
11 | | -* |
12 | | -* We show a map based on the lat/lon/zoom data passed in. This extension brings in |
13 | | -* the OpenLayers javascript, to show a slippy map. |
14 | | -* |
15 | | -* Usage example: |
16 | | -* <slippymap lat="51.485" lon="-0.15" z="11" w="300" h="200" layer="osmarender" marker="0" /> |
17 | | -* |
18 | | -* Tile images are not cached local to the wiki. |
19 | | -* To acheive this (remove the OSM dependency) you might set up a squid proxy, |
20 | | -* and modify the requests URLs here accordingly. |
21 | | -* |
22 | | -* This file should be placed in the mediawiki 'extensions' directory |
23 | | -* ...and then it needs to be 'included' within LocalSettings.php |
24 | | -* |
25 | | -* @license |
26 | | -* |
27 | | -* Copyright 2008 Harry Wood, Jens Frank, Grant Slater, Raymond Spekking and others |
28 | | -* |
29 | | -* This program is free software; you can redistribute it and/or modify |
30 | | -* it under the terms of the GNU General Public License as published by |
31 | | -* the Free Software Foundation; either version 2 of the License, or |
32 | | -* (at your option) any later version. |
33 | | -* |
34 | | -* This program is distributed in the hope that it will be useful, |
35 | | -* but WITHOUT ANY WARRANTY; without even the implied warranty of |
36 | | -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
37 | | -* GNU General Public License for more details. |
38 | | -* |
39 | | -* You should have received a copy of the GNU General Public License |
40 | | -* along with this program; if not, write to the Free Software |
41 | | -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
42 | | -* |
43 | | -*/ |
44 | | - |
45 | | -class WorldWind extends SlippyMap { |
46 | | - |
47 | | - /** |
48 | | - * Supported map modes and their layer types |
49 | | - */ |
50 | | - public static $MAP_MODES = array( |
51 | | - "urban", "landsat", "bluemarble" |
52 | | - ); |
53 | | - |
54 | | - protected static $MAP_OPTIONS = array ( |
55 | | - 'staticRenderService' => null, |
56 | | - 'defaultZoomLevel' => 14, |
57 | | - |
58 | | - /* from OpenLayers XYZ.js */ |
59 | | - 'defaultLayer' => 'landsat', |
60 | | - 'numZoomLevels' => 19, |
61 | | - 'maxResolution' => 156543.0339, |
62 | | - 'unit' => 'm', |
63 | | - 'sphericalMercator' => true |
64 | | - ); |
65 | | - |
66 | | - public function __construct( $mapParams ) { |
67 | | - global $wgOut, $wgUser; |
68 | | - wfLoadExtensionMessages( 'SlippyMap' ); |
69 | | - |
70 | | - $this->errors = $this->validate(); |
71 | | - if ( ! $this->errors ) |
72 | | - return false; |
73 | | - |
74 | | - self::initMap( $mapParams ); |
75 | | - self::setSize(); |
76 | | - self::setZoom(); |
77 | | - self::initResolutionsAndScales(); |
78 | | - self::setBounds(); |
79 | | - } |
80 | | - |
81 | | - public function initMap( $mapParams ) { |
82 | | - $this->mapId = $mapParams['mapId']; |
83 | | - $this->lat = $mapParams['lat']; |
84 | | - $this->lon = $mapParams['lon']; |
85 | | - $this->width = $mapParams['w']; |
86 | | - $this->height = $mapParams['h']; |
87 | | - $this->mode = $mapParams['mode']; |
88 | | - $this->zoom = $mapParams['zoom']; |
89 | | - $this->caption = $mapParams['caption']; |
90 | | - $this->layer = isset( $mapParams['layer'] ) ? strtolower($mapParams['layer']) : WorldWind::$MAP_OPTIONS['defaultLayer']; |
91 | | - $this->marker = ($mapParams['marker'] != '' && $mapParams['marker'] != '0' ? 1 : 0); |
92 | | - |
93 | | - // see if the 'z' paramater is used rather than 'zoom' (and allow it) |
94 | | - if ( $this->zoom == '' && isset( $mapParams['z'] ) ) { |
95 | | - $this->zoom = $mapParams['z']; |
96 | | - } |
97 | | - } |
98 | | - |
99 | | - public function getMap() { |
100 | | - global $wgOut, $wgJsMimeType; |
101 | | - |
102 | | - $mapCode .= <<<EOT |
103 | | - <script type="{$wgJsMimeType}">slippymaps.push(new slippymap_map({$this->mapId}, { |
104 | | - mode: '{$this->mode}', |
105 | | - layer: '{$this->layer}', |
106 | | - lat: {$this->lat}, |
107 | | - lon: {$this->lon}, |
108 | | - zoom: {$this->zoom}, |
109 | | - width: {$this->width}, |
110 | | - height: {$this->height}, |
111 | | - marker: {$this->marker} |
112 | | - }));</script> |
113 | | -EOT; |
114 | | - |
115 | | - $mapCode .= self::getDynamicMap(); |
116 | | - |
117 | | - return $mapCode; |
118 | | - } |
119 | | - |
120 | | - public function getDynamicMap() { |
121 | | - $mapCode .= <<<EOT |
122 | | - <div class="mapframe" style="width:{$this->width}px"> |
123 | | - <div id="map{$this->mapId}" class="map" style="width:{$this->width}px; height:{$this->height}px;"> |
124 | | - <script type="{$wgJsMimeType}">slippymaps[{$this->mapId}].init();</script> |
125 | | - </div> |
126 | | -EOT; |
127 | | - if ( $this->caption ) { |
128 | | - $mapcode .= <<<EOT |
129 | | - <div class="mapcaption">{$this->caption}</div> |
130 | | -EOT; |
131 | | - } |
132 | | - |
133 | | - $mapCode .= <<<EOT |
134 | | - </div> |
135 | | -EOT; |
136 | | - return $mapCode; |
137 | | - } |
138 | | - |
139 | | - public function setZoom( $zoom = null ) { |
140 | | - if ( $this->zoom == '' ) $this->zoom = WorldWind::$MAP_OPTIONS['defaultZoomLevel']; |
141 | | - } |
142 | | -} |
Index: trunk/extensions/SlippyMap/SlippyMap.i18n.php |
— | — | @@ -2,1279 +2,54 @@ |
3 | 3 | /** |
4 | 4 | * Internationalisation file for SlippyMap extension. |
5 | 5 | * |
6 | | - ################################################################################## |
7 | | - # |
8 | | - # Copyright 2008 Harry Wood, Jens Frank, Grant Slater, Raymond Spekking |
9 | | - # and the autors of betawiki |
10 | | - # |
11 | | - # This program is free software; you can redistribute it and/or modify |
12 | | - # it under the terms of the GNU General Public License as published by |
13 | | - # the Free Software Foundation; either version 2 of the License, or |
14 | | - # (at your option) any later version. |
15 | | - # |
16 | | - # This program is distributed in the hope that it will be useful, |
17 | | - # but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | | - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 | | - # GNU General Public License for more details. |
20 | | - # |
21 | | - # You should have received a copy of the GNU General Public License |
22 | | - # along with this program; if not, write to the Free Software |
23 | | - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | | - # |
25 | 6 | * @ingroup Extensions |
26 | 7 | */ |
27 | 8 | |
28 | 9 | $messages = array(); |
29 | 10 | |
30 | 11 | $messages['en'] = array( |
31 | | - 'slippymap_desc' => "Allows the use of the <tt><nowiki><slippymap></nowiki></tt> tag to display an OpenLayers slippy map. Maps are from [http://openstreetmap.org openstreetmap.org]", |
32 | | - 'slippymap_latmissing' => "Missing lat value (for the latitude).", |
33 | | - 'slippymap_lonmissing' => "Missing lon value (for the longitude).", |
34 | | - 'slippymap_zoommissing' => "Missing z value (for the zoom level).", |
35 | | - 'slippymap_longdepreciated' => "Please use 'lon' instead of 'long' (parameter was renamed).", |
36 | | - 'slippymap_widthnan' => "width (w) value '%1' is not a valid integer", |
37 | | - 'slippymap_heightnan' => "height (h) value '%1' is not a valid integer", |
38 | | - 'slippymap_zoomnan' => "zoom (z) value '%1' is not a valid integer", |
39 | | - 'slippymap_latnan' => "latitude (lat) value '%1' is not a valid number", |
40 | | - 'slippymap_lonnan' => "longitude (lon) value '%1' is not a valid number", |
41 | | - 'slippymap_widthbig' => "width (w) value cannot be greater than 1000", |
42 | | - 'slippymap_widthsmall' => "width (w) value cannot be less than 100", |
43 | | - 'slippymap_heightbig' => "height (h) value cannot be greater than 1000", |
44 | | - 'slippymap_heightsmall' => "height (h) value cannot be less than 100", |
45 | | - 'slippymap_latbig' => "latitude (lat) value cannot be greater than 90", |
46 | | - 'slippymap_latsmall' => "latitude (lat) value cannot be less than -90", |
47 | | - 'slippymap_lonbig' => "longitude (lon) value cannot be greater than 180", |
48 | | - 'slippymap_lonsmall' => "longitude (lon) value cannot be less than -180", |
49 | | - 'slippymap_zoomsmall' => "zoom (z) value cannot be less than zero", |
50 | | - 'slippymap_zoom18' => "zoom (z) value cannot be greater than 17. Note that this MediaWiki extension hooks into the OpenStreetMap 'osmarender' layer which does not go beyond zoom level 17. The Mapnik layer available on openstreetmap.org, goes up to zoom level 18", |
51 | | - 'slippymap_zoombig' => "zoom (z) value cannot be greater than 17.", |
52 | | - 'slippymap_invalidlayer' => "Invalid 'layer' value '%1'", |
53 | | - 'slippymap_maperror' => "Map error:", |
54 | | - 'slippymap_osmlink' => 'http://www.openstreetmap.org/?lat=%1&lon=%2&zoom=%3', # do not translate or duplicate this message to other languages |
55 | | - 'slippymap_osmtext' => 'See this map on OpenStreetMap.org', |
56 | | - 'slippymap_code' => 'Wikicode for this map view:', |
57 | | - 'slippymap_button_code' => 'Get wikicode', |
58 | | - 'slippymap_resetview' => 'Reset view', |
59 | | - 'slippymap_license' => 'OpenStreetMap - CC-BY-SA-2.0', # do not translate or duplicate this message to other languages |
60 | | - 'slippymap_invalidmode' => "Invalid 'mode' value '$1'", |
61 | | - 'slippymap_clicktoactivate' => 'Click to activate map' |
62 | | -); |
| 12 | + 'slippymap_desc' => 'Adds a <tt><slippymap></tt> tag which allows for embedding of static & dynamic maps.Supports multiple map services including [http://openstreetmap.org OpenStreetMap] and NASA Worldwind', |
63 | 13 | |
64 | | -/** Message documentation (Message documentation) |
65 | | - * @author Purodha |
66 | | - */ |
67 | | -$messages['qqq'] = array( |
68 | | - 'slippymap_desc' => 'Short description of the Slippymap extension, shown in [[Special:Version]]. Do not translate or change links.', |
69 | | -); |
| 14 | + // The name of the extension, for use in error messages |
| 15 | + 'slippymap_extname' => 'SlippyMap', |
| 16 | + 'slippymap_tagname' => 'slippymap', |
70 | 17 | |
71 | | -/** Arabic (العربية) |
72 | | - * @author Meno25 |
73 | | - */ |
74 | | -$messages['ar'] = array( |
75 | | - 'slippymap_desc' => 'يسمح باستخدام وسم <tt><nowiki><slippymap></nowiki></tt> لعرض خريطة OpenLayers لزقة. الخرائط من [http://openstreetmap.org openstreetmap.org]', |
76 | | - 'slippymap_latmissing' => 'قيمة lat مفقودة (للارتفاع).', |
77 | | - 'slippymap_lonmissing' => 'قيمة lon مفقودة (لخط الطول).', |
78 | | - 'slippymap_zoommissing' => 'قيمة z مفقودة (لمستوى التقريب).', |
79 | | - 'slippymap_longdepreciated' => "من فضلك استخدم 'lon' بدلا من 'long' (المحدد تمت إعادة تسميته).", |
80 | | - 'slippymap_widthnan' => "قيمة العرض (w) '%1' ليست رقما صحيحا", |
81 | | - 'slippymap_heightnan' => "قيمة الارتفاع (h) '%1' ليست رقما صحيحا", |
82 | | - 'slippymap_zoomnan' => "قيمة التقريب (z) '%1' ليست رقما صحيحا", |
83 | | - 'slippymap_latnan' => "قيمة خط العرض (lat) '%1' ليست رقما صحيحا", |
84 | | - 'slippymap_lonnan' => "قيمة خط الطول (lon) '%1' ليست رقما صحيحا", |
85 | | - 'slippymap_widthbig' => 'قيمة العرض (w) لا يمكن أن تكون أكبر من 1000', |
86 | | - 'slippymap_widthsmall' => 'قيمة العرض (w) لا يمكن أن تكون أصغر من 100', |
87 | | - 'slippymap_heightbig' => 'قيمة الارتفاع (h) لا يمكن أن تكون أكبر من 1000', |
88 | | - 'slippymap_heightsmall' => 'قيمة الارتفاع (h) لا يمكن أن تكون أقل من 100', |
89 | | - 'slippymap_latbig' => 'قيمة دائرة العرض (lat) لا يمكن أن تكون أكبر من 90', |
90 | | - 'slippymap_latsmall' => 'قيمة دائرة العرض (lat) لا يمكن أن تكون أقل من -90', |
91 | | - 'slippymap_lonbig' => 'قيمة خط الطول (lon) لا يمكن أن تكون أكبر من 180', |
92 | | - 'slippymap_lonsmall' => 'قيمة خط الطول (lon) لا يمكن أن تكون أقل من -180', |
93 | | - 'slippymap_zoomsmall' => 'قيمة التقريب (z) لا يمكن أن تكون أقل من صفر', |
94 | | - 'slippymap_zoom18' => "قيمة التقريب (z) لا يمكن أن تكون أكبر من 17. لاحظ أن امتداد الميدياويكي هذا يخطف إلى طبقة OpenStreetMap 'osmarender' والتي لا تذهب أبعد من مستوى التقريب 17. طبقة Mapnik المتوفرة في openstreetmap.org، تذهب إلى مستوى تقريب 18", |
95 | | - 'slippymap_zoombig' => 'قيمة التقريب (z) لا يمكن أن تكون أكبر من 17.', |
96 | | - 'slippymap_invalidlayer' => "قيمة 'طبقة' غير صحيحة '%1'", |
97 | | - 'slippymap_maperror' => 'خطأ في الخريطة:', |
98 | | - 'slippymap_osmtext' => 'انظر هذه الخريطة في OpenStreetMap.org', |
99 | | - 'slippymap_code' => 'كود الويكي لعرض الخريطة هذا:', |
100 | | - 'slippymap_button_code' => 'الحصول على كود ويكي', |
101 | | - 'slippymap_resetview' => 'إعادة ضبط الرؤية', |
102 | | -); |
| 18 | + /** |
| 19 | + * User errors |
| 20 | + */ |
| 21 | + 'slippymap_error' => "$1 error: $2", |
| 22 | + 'slippymap_errors' => "$1 errors:", |
103 | 23 | |
104 | | -/** Egyptian Spoken Arabic (مصرى) |
105 | | - * @author Meno25 |
106 | | - */ |
107 | | -$messages['arz'] = array( |
108 | | - 'slippymap_desc' => 'يسمح باستخدام وسم <tt><nowiki><slippymap></nowiki></tt> لعرض خريطة OpenLayers لزقة. الخرائط من [http://openstreetmap.org openstreetmap.org]', |
109 | | - 'slippymap_latmissing' => 'قيمة lat مفقودة (للارتفاع).', |
110 | | - 'slippymap_lonmissing' => 'قيمة lon مفقودة (لخط الطول).', |
111 | | - 'slippymap_zoommissing' => 'قيمة z مفقودة (لمستوى التقريب).', |
112 | | - 'slippymap_longdepreciated' => "من فضلك استخدم 'lon' بدلا من 'long' (المحدد تمت إعادة تسميته).", |
113 | | - 'slippymap_widthnan' => "قيمة العرض (w) '%1' ليست رقما صحيحا", |
114 | | - 'slippymap_heightnan' => "قيمة الارتفاع (h) '%1' ليست رقما صحيحا", |
115 | | - 'slippymap_zoomnan' => "قيمة التقريب (z) '%1' ليست رقما صحيحا", |
116 | | - 'slippymap_latnan' => "قيمة خط العرض (lat) '%1' ليست رقما صحيحا", |
117 | | - 'slippymap_lonnan' => "قيمة خط الطول (lon) '%1' ليست رقما صحيحا", |
118 | | - 'slippymap_widthbig' => 'قيمة العرض (w) لا يمكن أن تكون أكبر من 1000', |
119 | | - 'slippymap_widthsmall' => 'قيمة العرض (w) لا يمكن أن تكون أصغر من 100', |
120 | | - 'slippymap_heightbig' => 'قيمة الارتفاع (h) لا يمكن أن تكون أكبر من 1000', |
121 | | - 'slippymap_heightsmall' => 'قيمة الارتفاع (h) لا يمكن أن تكون أقل من 100', |
122 | | - 'slippymap_latbig' => 'قيمة دائرة العرض (lat) لا يمكن أن تكون أكبر من 90', |
123 | | - 'slippymap_latsmall' => 'قيمة دائرة العرض (lat) لا يمكن أن تكون أقل من -90', |
124 | | - 'slippymap_lonbig' => 'قيمة خط الطول (lon) لا يمكن أن تكون أكبر من 180', |
125 | | - 'slippymap_lonsmall' => 'قيمة خط الطول (lon) لا يمكن أن تكون أقل من -180', |
126 | | - 'slippymap_zoomsmall' => 'قيمة التقريب (z) لا يمكن أن تكون أقل من صفر', |
127 | | - 'slippymap_zoom18' => "قيمة التقريب (z) لا يمكن أن تكون أكبر من 17. لاحظ أن امتداد الميدياويكى هذا يخطف إلى طبقة OpenStreetMap 'osmarender' والتى لا تذهب أبعد من مستوى التقريب 17. طبقة Mapnik المتوفرة فى openstreetmap.org، تذهب إلى مستوى تقريب 18", |
128 | | - 'slippymap_zoombig' => 'قيمة التقريب (z) لا يمكن أن تكون أكبر من 17.', |
129 | | - 'slippymap_invalidlayer' => "قيمة 'طبقة' غير صحيحة '%1'", |
130 | | - 'slippymap_maperror' => 'خطأ فى الخريطة:', |
131 | | - 'slippymap_osmtext' => 'انظر هذه الخريطة فى OpenStreetMap.org', |
132 | | - 'slippymap_code' => 'كود الويكى لعرض الخريطة هذا:', |
133 | | - 'slippymap_button_code' => 'الحصول على كود ويكي', |
134 | | - 'slippymap_resetview' => 'إعادة ضبط الرؤية', |
135 | | -); |
| 24 | + 'slippymap_error_empty_element' => 'Call $1 as <$2 [...]/>, not <$2 [...]><$2>', |
136 | 25 | |
137 | | -/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
138 | | - * @author EugeneZelenko |
139 | | - * @author Jim-by |
140 | | - * @author Red Winged Duck |
141 | | - */ |
142 | | -$messages['be-tarask'] = array( |
143 | | - 'slippymap_desc' => 'Дазваляе карыстацца тэгам <tt><nowiki><slippymap></nowiki></tt> для адлюстраваньня хуткай мапы OpenLayer. Выкарыстоўваюцца мапы [http://openstreetmap.org openstreetmap.org]', |
144 | | - 'slippymap_latmissing' => 'Няма значэньня парамэтру lat (для шыраты).', |
145 | | - 'slippymap_lonmissing' => 'Няма значэньня парамэтру lon (для даўгаты).', |
146 | | - 'slippymap_zoommissing' => 'Няма значэньня парамэтру z (для маштабу).', |
147 | | - 'slippymap_longdepreciated' => "Калі ласка, выкарыстоўвайце 'lon' замест 'long' (парамэтар быў перайменаваны).", |
148 | | - 'slippymap_widthnan' => "значэньне шырыні (w) '%1' ня ёсьць цэлы лік", |
149 | | - 'slippymap_heightnan' => "значэньне вышыні (h) '%1' ня ёсьць цэлы лік", |
150 | | - 'slippymap_zoomnan' => "значэньне маштабу (z) '%1' ня ёсьць цэлы лік", |
151 | | - 'slippymap_latnan' => "значэньне шыраты (lat) '%1' ня ёсьць лік", |
152 | | - 'slippymap_lonnan' => "значэньне даўгаты (lon) '%1' ня ёсьць лік", |
153 | | - 'slippymap_widthbig' => 'значэньне шырыні (w) ня можа быць больш за 1000', |
154 | | - 'slippymap_widthsmall' => 'значэньне шырыні (w) ня можа быць менш за 100', |
155 | | - 'slippymap_heightbig' => 'значэньне вышыні (h) ня можа быць больш за 1000', |
156 | | - 'slippymap_heightsmall' => 'значэньне вышыні (h) ня можа быць менш за 100', |
157 | | - 'slippymap_latbig' => 'значэньне шыраты (lat) ня можа быць больш за 90', |
158 | | - 'slippymap_latsmall' => 'значэньне шыраты (lat) ня можа быць менш за -90', |
159 | | - 'slippymap_lonbig' => 'значэньне даўгаты (lon) ня можа быць больш за 180', |
160 | | - 'slippymap_lonsmall' => 'значэньне даўгаты (lon) ня можа быць менш за -180', |
161 | | - 'slippymap_zoomsmall' => 'значэньне маштабу (z) ня можа быць менш за нуль', |
162 | | - 'slippymap_zoom18' => "значэньне маштабу (z) ня можа быць больш за 17. Заўважце, што гэта пашырэньне MediaWiki выкарыстоўвае слой OpenStreetMap 'osmarender', які не падтрымлівае маштабы больш за 17. Слой Mapnik, які знаходзіцца на openstreetmap.org, падтрымлівае маштаб 18", |
163 | | - 'slippymap_zoombig' => 'значэньне маштабу (z) ня можа быць больш за 17', |
164 | | - 'slippymap_invalidlayer' => "Няслушнае значэньне '%1' парамэтру 'layer'", |
165 | | - 'slippymap_maperror' => 'Памылка мапы:', |
166 | | - 'slippymap_osmtext' => 'Глядзіце гэту мапу на OpenStreetMap.org', |
167 | | - 'slippymap_code' => 'Вікікод для прагляду гэтай мапы:', |
168 | | - 'slippymap_button_code' => 'Атрымаць вікікод', |
169 | | - 'slippymap_resetview' => 'Першапачатковы выгляд', |
170 | | - 'slippymap_invalidmode' => "Няслушнае значэньне '$1' парамэтру 'mode'", |
171 | | - 'slippymap_clicktoactivate' => 'Націсьніце, каб актывізаваць мапу', |
172 | | -); |
| 26 | + // Required parameters |
| 27 | + 'slippymap_error_missing_arguments' => "You didn't supply any attributes to the <$1> tag, see [http://www.mediawiki.org/wiki/Extension:SlippyMap#Syntax usage information] for how to call it.", |
173 | 28 | |
174 | | -/** Bulgarian (Български) |
175 | | - * @author DCLXVI |
176 | | - */ |
177 | | -$messages['bg'] = array( |
178 | | - 'slippymap_desc' => 'Позволява използването на етикета <tt><nowiki><slippymap></nowiki></tt> за показване на OpenLayers slippy карти. Картите са от [http://openstreetmap.org openstreetmap.org]', |
179 | | - 'slippymap_zoommissing' => 'Липсваща стойност z (за степен на приближаване).', |
180 | | - 'slippymap_zoomsmall' => 'стойността за приближаване (z) не може да бъде отрицателно число', |
181 | | - 'slippymap_zoombig' => 'стойността за приближаване (z) не може да бъде по-голяма от 17.', |
182 | | - 'slippymap_invalidlayer' => "Невалидна стойност на 'слоя' '%1'", |
183 | | - 'slippymap_maperror' => 'Грешка в картата:', |
184 | | - 'slippymap_osmtext' => 'Преглеждане на картата в OpenStreetMap.org', |
185 | | - 'slippymap_code' => 'Уикикод за тази карта:', |
186 | | -); |
| 29 | + // Required parameters |
| 30 | + 'slippymap_error_missing_attribute_lat' => "Missing <tt>lat</tt> attribute (for the latitude).", |
| 31 | + 'slippymap_error_missing_attribute_lon' => "Missing <tt>lon</tt> attribute (for the longitude).", |
| 32 | + 'slippymap_error_missing_attribute_zoom' => "Missing <tt>zoom</tt> attribute (for the zoom level).", |
187 | 33 | |
188 | | -/** Bosnian (Bosanski) |
189 | | - * @author CERminator |
190 | | - */ |
191 | | -$messages['bs'] = array( |
192 | | - 'slippymap_desc' => 'Omogućuje korištenje oznake <tt><nowiki><slippymap></nowiki></tt> za prikaz OpenLayers slippy mapa. Mape su sa stranice [http://openstreetmap.org openstreetmap.org]', |
193 | | - 'slippymap_latmissing' => 'Nedostaje vrijednost lat (za geografsku širinu).', |
194 | | - 'slippymap_lonmissing' => 'Nedostaje vrijednost lon (za geografsku dužinu).', |
195 | | - 'slippymap_zoommissing' => 'Nedostaje vrijednost z (za nivo zumiranja).', |
196 | | - 'slippymap_longdepreciated' => "Molimo koristite 'lon' umjesto 'long' (parametar je preimenovan).", |
197 | | - 'slippymap_widthnan' => "vrijednost širine (w) '%1' nije valjan cijeli broj", |
198 | | - 'slippymap_heightnan' => "vrijednost visine (h) '%1' nije validan cijeli broj", |
199 | | - 'slippymap_zoomnan' => "vrijednost zumiranja (z) '%1' nije valjan cijeli broj", |
200 | | - 'slippymap_latnan' => "vrijednost širina (lat) '%1' nije validan broj", |
201 | | - 'slippymap_lonnan' => "vrijednost dužine (lon) '%1' nije valjan broj", |
202 | | - 'slippymap_widthbig' => 'vrijednost širina (w) ne može biti veća od 1000', |
203 | | - 'slippymap_widthsmall' => 'vrijednost širina (w) ne može biti manja od 100', |
204 | | - 'slippymap_heightbig' => 'vrijednost visina (h) ne može biti veća od 1000', |
205 | | - 'slippymap_heightsmall' => 'vrijednost visina (h) ne može biti manja od 100', |
206 | | - 'slippymap_latbig' => 'vrijednost geografske širine (lat) ne može biti veća od 90', |
207 | | - 'slippymap_latsmall' => 'vrijednost geografske širine (lat) ne može biti manja od -90', |
208 | | - 'slippymap_lonbig' => 'vrijednost geografske dužine (lon) ne može biti veća od 180', |
209 | | - 'slippymap_lonsmall' => 'vrijednost geografske dužine (lon) ne može biti manja od -180', |
210 | | - 'slippymap_zoomsmall' => 'vrijednost zumiranja (z) ne može biti manja od nule', |
211 | | - 'slippymap_zoom18' => "vrijednost zooma (z) ne može biti veća od 17. Zapamtite da je ovo MediaWiki proširenje povezano sa OpenStreetMap 'osmarender' layerom koji ne može ići iznad nivoa zooma 17. Layer Mapnik je dostupan na openstreetmap.org, a podržava nivo zooma 18", |
212 | | - 'slippymap_zoombig' => 'vrijednost zumiranja (z) ne može biti veća od 17.', |
213 | | - 'slippymap_invalidlayer' => "Nevaljana vrijednost 'layer' '%1'", |
214 | | - 'slippymap_maperror' => 'Greška mape:', |
215 | | - 'slippymap_osmtext' => 'Vidi ovu mapu na OpenStreetMap.org', |
216 | | - 'slippymap_code' => 'Wikikod za pogled ove mape:', |
217 | | - 'slippymap_button_code' => 'Preuzmi wikikod', |
218 | | - 'slippymap_resetview' => 'Poništi pogled', |
219 | | - 'slippymap_invalidmode' => "Nevaljan 'mode' vrijednost '$1'", |
220 | | - 'slippymap_clicktoactivate' => 'Kliknite za aktivaciju mape', |
221 | | -); |
| 34 | + // Invalid value |
| 35 | + 'slippymap_error_invalid_attribute_lat_value_nan' => "The value <tt>$1</tt> is not valid for the <tt>lat</tt> (latitude) attribute, the given value must be a valid number.", |
| 36 | + 'slippymap_error_invalid_attribute_lon_value_nan' => "The value <tt>$1</tt> is not valid for the <tt>lon</tt> (longitude) attribute, the given value must be a valid number.", |
| 37 | + 'slippymap_error_invalid_attribute_zoom_value_nan' => "The value <tt>$1</tt> is not valid for the <tt>zoom</tt> attribute, the given value must be a valid number.", |
| 38 | + 'slippymap_error_invalid_attribute_width_value_nan' => "The value <tt>$1</tt> is not valid for the <tt>width</tt> attribute, the given value must be a valid number.", |
| 39 | + 'slippymap_error_invalid_attribute_height_value_nan' => "The value <tt>$1</tt> is not valid for the <tt>height</tt> attribute, the given value must be a valid number.", |
| 40 | + 'slippymap_error_invalid_attribute_mode_value_not_a_mode' => "The value <tt>$1</tt> is not valid for the <tt>mode</tt> attribute, valid modes are $2.", |
| 41 | + 'slippymap_error_unknown_attribute' => "The attribute <tt>$1</tt> is unknown.", |
222 | 42 | |
223 | | -/** Czech (Česky) |
224 | | - * @author Danny B. |
225 | | - * @author Mormegil |
226 | | - */ |
227 | | -$messages['cs'] = array( |
228 | | - 'slippymap_desc' => 'Umožňuje použití tagu <code><nowiki><slippymap></nowiki></code> pro zobrazení posuvné mapy OpenLayers. Mapy pocházejí z [http://openstreetmap.org openstreetmap.org].', |
229 | | - 'slippymap_latmissing' => 'Chybí hodnota lat (zeměpisná šířka)', |
230 | | - 'slippymap_lonmissing' => 'Chybí hodnota lon (zeměpisná délka)', |
231 | | - 'slippymap_zoommissing' => 'Chybí hodnota z (úroveň přiblížení)', |
232 | | - 'slippymap_longdepreciated' => 'Prosím, použijte „lon“ namísto „long“ (parametr byl přejmenován).', |
233 | | - 'slippymap_widthnan' => 'hodnota šířky (w) „%1“ není platné celé číslo', |
234 | | - 'slippymap_heightnan' => 'hodnota výšky (h) „%1“ není platné celé číslo', |
235 | | - 'slippymap_zoomnan' => 'hodnota úrovně přiblížení (z) „%1“ není platné celé číslo', |
236 | | - 'slippymap_latnan' => 'hodnota zeměpisné šířky (lat) „%1“ není platné číslo', |
237 | | - 'slippymap_lonnan' => 'hodnota zeměpisné délky (lon) „%1“ není platné číslo', |
238 | | - 'slippymap_widthbig' => 'hodnota šířky (w) nemůže být větší než 1000', |
239 | | - 'slippymap_widthsmall' => 'hodnota šířky (w) nemůže být menší než 100', |
240 | | - 'slippymap_heightbig' => 'hodnota výšky (h) nemůže být větší než 1000', |
241 | | - 'slippymap_heightsmall' => 'hodnota výšky (h) nemůže být menší než 100', |
242 | | - 'slippymap_latbig' => 'hodnota zeměpisné šířky (lat) nemůže být větší než 90', |
243 | | - 'slippymap_latsmall' => 'hodnota zeměpisné šířky (lat) nemůže být menší než -90', |
244 | | - 'slippymap_lonbig' => 'hodnota zeměpisné délky (lon) nemůže být větší než 180', |
245 | | - 'slippymap_lonsmall' => 'hodnota zeměpisné délky (lon) nemůže být menší než -180', |
246 | | - 'slippymap_zoomsmall' => 'hodnota úrovně přiblížení (z) nemůže být menší než nula', |
247 | | - 'slippymap_zoom18' => 'Hodnota úrovně přiblížení (z) nemůže být větší než 17. Uvědomte si, že toto rozšíření MediaWiki používá vrstvu „osmarender“ z OpenStreetMap, která neobsahuje podrobnější přiblížení než 17. Vrstva „Mapnik“ na openstreetmap.org umožňuje priblížení do úrovně 18.', |
248 | | - 'slippymap_zoombig' => 'Hodnota úrovně přiblížení (z) nemůže být větší než 17.', |
249 | | - 'slippymap_invalidlayer' => 'Neplatná hodnota „layer“ „%1“', |
250 | | - 'slippymap_maperror' => 'Chyba mapy:', |
251 | | - 'slippymap_osmtext' => 'Zobrazit tuto mapu na OpenStreetMap.org', |
252 | | - 'slippymap_code' => 'Wikikód tohoto pohledu na mapu:', |
253 | | - 'slippymap_button_code' => 'Zobrazit wikikód', |
254 | | - 'slippymap_resetview' => 'Obnovit zobrazení', |
255 | | -); |
| 43 | + // Value out of range |
| 44 | + 'slippymap_error_invalid_attribute_lat_value_out_of_range' => "The value <tt>$1</tt> is not valid for the <tt>lat</tt> (latitude) attribute. Latitutes bust be between -90 and 90 degrees.", |
| 45 | + 'slippymap_error_invalid_attribute_lon_value_out_of_range' => "The value <tt>$1</tt> is not valid for the <tt>lon</tt> (longitude) attribute. Longitudes must be between -180 and 180 degrees.", |
| 46 | + 'slippymap_error_invalid_attribute_zoom_value_out_of_range' => "The value <tt>$1</tt> is not valid for the <tt>zoom</tt> attribute. Zoom levels must be between $2 and $3.", |
| 47 | + 'slippymap_error_invalid_attribute_width_value_out_of_range' => "The value <tt>$1</tt> is not valid for the <tt>width</tt> attribute. Width levels must be between $2 and $3.", |
| 48 | + 'slippymap_error_invalid_attribute_height_value_out_of_range' => "The value <tt>$1</tt> is not valid for the <tt>height</tt> attribute. Height levels must be between $2 and $3.", |
256 | 49 | |
257 | | -/** German (Deutsch) |
258 | | - * @author Raimond Spekking |
259 | | - * @author Umherirrender |
260 | | - */ |
261 | | -$messages['de'] = array( |
262 | | - 'slippymap_desc' => 'Ermöglicht die Nutzung des <tt><nowiki><slippymap></nowiki></tt>-Tags zur Anzeige einer OpenLayer-SlippyMap. Die Karten stammen von [http://openstreetmap.org openstreetmap.org]', |
263 | | - 'slippymap_latmissing' => 'Es wurde kein Wert für die geografische Breite (lat) angegeben.', |
264 | | - 'slippymap_lonmissing' => 'Es wurde kein Wert für die geografische Länge (lon) angegeben.', |
265 | | - 'slippymap_zoommissing' => 'Es wurde kein Zoom-Wert (z) angegeben.', |
266 | | - 'slippymap_longdepreciated' => 'Bitte benutze „lon“ an Stelle von „long“ (Parameter wurde umbenannt).', |
267 | | - 'slippymap_widthnan' => 'Der Wert für die Breite (w) „%1“ ist keine gültige Zahl', |
268 | | - 'slippymap_heightnan' => 'Der Wert für die Höhe (h) „%1“ ist keine gültige Zahl', |
269 | | - 'slippymap_zoomnan' => 'Der Wert für den Zoom (z) „%1“ ist keine gültige Zahl', |
270 | | - 'slippymap_latnan' => 'Der Wert für die geografische Breite (lat) „%1“ ist keine gültige Zahl', |
271 | | - 'slippymap_lonnan' => 'Der Wert für die geografische Länge (lon) „%1“ ist keine gültige Zahl', |
272 | | - 'slippymap_widthbig' => 'Die Breite (w) darf 1000 nicht überschreiten', |
273 | | - 'slippymap_widthsmall' => 'Die Breite (w) darf 100 nicht unterschreiten', |
274 | | - 'slippymap_heightbig' => 'Die Höhe (h) darf 1000 nicht überschreiten', |
275 | | - 'slippymap_heightsmall' => 'Die Höhe (h) darf 100 nicht unterschreiten', |
276 | | - 'slippymap_latbig' => 'Die geografische Breite darf nicht größer als 90 sein', |
277 | | - 'slippymap_latsmall' => 'Die geografische Breite darf nicht kleiner als -90 sein', |
278 | | - 'slippymap_lonbig' => 'Die geografische Länge darf nicht größer als 180 sein', |
279 | | - 'slippymap_lonsmall' => 'Die geografische Länge darf nicht kleiner als -180 sein', |
280 | | - 'slippymap_zoomsmall' => 'Der Zoomwert darf nicht negativ sein', |
281 | | - 'slippymap_zoom18' => 'Der Zoomwert (z) darf nicht größer als 17 sein. Beachte, dass diese MediaWiki-Erweiterung die OpenStreetMap „Osmarender“-Karte einbindet, die nicht höher als Zoom 17 geht. Die Mapnik-Karte ist auf openstreetmap.org verfügbar und geht bis Zoom 18.', |
282 | | - 'slippymap_zoombig' => 'Der Zoomwert (z) darf nicht größer als 17 sein.', |
283 | | - 'slippymap_invalidlayer' => 'Ungültiger „layer“-Wert „%1“', |
284 | | - 'slippymap_maperror' => 'Kartenfehler:', |
285 | | - 'slippymap_osmtext' => 'Diese Karte auf OpenStreetMap.org ansehen', |
286 | | - 'slippymap_code' => 'Wikitext für diese Kartenansicht:', |
287 | | - 'slippymap_button_code' => 'Zeige Wikicode', |
288 | | - 'slippymap_resetview' => 'Zurücksetzen', |
| 50 | + 'slippymap_code' => 'Wikicode for this map view:', |
| 51 | + 'slippymap_button_code' => 'Get wikicode', |
| 52 | + 'slippymap_resetview' => 'Reset view', |
| 53 | + 'slippymap_clicktoactivate' => 'Click to activate map' |
289 | 54 | ); |
290 | 55 | |
291 | | -/** Lower Sorbian (Dolnoserbski) |
292 | | - * @author Michawiki |
293 | | - */ |
294 | | -$messages['dsb'] = array( |
295 | | - 'slippymap_desc' => 'Zmóžnja wužywanje toflicki <tt><nowiki><slippymap></nowiki></tt> za zwobraznjenje pśesuwajobneje kórty OpenLayer. Kórty su z [http://openstreetmap.org openstreetmap.org]', |
296 | | - 'slippymap_latmissing' => 'Gódnota za šyrinu (lat) felujo.', |
297 | | - 'slippymap_lonmissing' => 'Gódnota za dlininu (lon) felujo.', |
298 | | - 'slippymap_zoommissing' => 'Gódnota za skalěrowanje (z) felujo.', |
299 | | - 'slippymap_longdepreciated' => "Wužywaj pšosym 'lon' město 'long' (parameter jo se pśemjenił)", |
300 | | - 'slippymap_widthnan' => "Gódnota šyrokosći (w) '%1' njejo płaśiwa ceła licba", |
301 | | - 'slippymap_heightnan' => "Gódnota wusokosći (h) '%1' njejo płaśiwa ceła licba", |
302 | | - 'slippymap_zoomnan' => "Gódnota skalowanja (z) '%1' njejo płaśiwa ceła licba", |
303 | | - 'slippymap_latnan' => "Gódnota šyriny (lat) '%1' njejo płaśiwa licba", |
304 | | - 'slippymap_lonnan' => "Gódnota dlininy (lon) '%1' njejo płaśiwa licba", |
305 | | - 'slippymap_widthbig' => 'Gódnota šyrokosći (w) njesmějo wětša ako 1000 byś', |
306 | | - 'slippymap_widthsmall' => 'Gódnota šyrokosći njesmějo mjeńša ako 100 byś', |
307 | | - 'slippymap_heightbig' => 'Gódnota wusokosći (h) njesmějo wětša ako 1000 byś', |
308 | | - 'slippymap_heightsmall' => 'Gódnota wusokosći (h) njesmějo mjeńša ako 100 byś', |
309 | | - 'slippymap_latbig' => 'Gódnota dlininy (lat) njesmějo wětša ako 90 byś', |
310 | | - 'slippymap_latsmall' => 'Gódnota šyriny (lat) njesmějo mjeńša ako -90 byś', |
311 | | - 'slippymap_lonbig' => 'Gódnota dlininy (lon) njesmějo wětša ako 180 byś', |
312 | | - 'slippymap_lonsmall' => 'Gódnota dlininy (lon) njesmějo mjeńša ako -180 byś', |
313 | | - 'slippymap_zoomsmall' => 'Gódnota skalowanja (z) njesmějo mjeńša ako nul byś', |
314 | | - 'slippymap_zoom18' => "Gódnota skalowanja (z) njesmějo wětša ako 17 byś. Glědaj, až toś to rozšyrjenje MediaWiki zapśěgujo warstu OpenStreetMap 'Osmarender', kótaraž njepśesegujo skalowańsku rowninu 17. Warsta Mapnik, kótaraž stoj na openstreetmap.org k dispoziciji, dosega až k rowninje 18.", |
315 | | - 'slippymap_zoombig' => 'Gódnota skalowanja (z) njesmějo wětša ako 17 byś.', |
316 | | - 'slippymap_invalidlayer' => "Njepłaśiwa gódnota 'warsty' '%1'", |
317 | | - 'slippymap_maperror' => 'Kórtowa zmólka:', |
318 | | - 'slippymap_osmtext' => 'Glědaj toś tu kórtu na OpenStreetMap.org', |
319 | | - 'slippymap_code' => 'Wikikod za toś ten kórtowy naglěd:', |
320 | | - 'slippymap_button_code' => 'Wikikod pokazaś', |
321 | | - 'slippymap_resetview' => 'Naglěd slědk stajiś', |
322 | | - 'slippymap_invalidmode' => "Njepłaśiwa gódnota 'mode' '$1'", |
323 | | - 'slippymap_clicktoactivate' => 'Kliknuś, aby se kórta aktiwěrowała', |
324 | | -); |
325 | 56 | |
326 | | -/** Esperanto (Esperanto) |
327 | | - * @author Yekrats |
328 | | - */ |
329 | | -$messages['eo'] = array( |
330 | | - 'slippymap_maperror' => 'Mapa eraro:', |
331 | | - 'slippymap_osmtext' => 'Vidi ĉi tiun mapon en OpenStreetMap.org', |
332 | | - 'slippymap_code' => 'Vikikodo por ĉi tiu mapvido:', |
333 | | - 'slippymap_button_code' => 'Akiri vikikodon', |
334 | | - 'slippymap_resetview' => 'Restarigi vidon', |
335 | | -); |
336 | | - |
337 | | -/** Spanish (Español) |
338 | | - * @author Crazymadlover |
339 | | - */ |
340 | | -$messages['es'] = array( |
341 | | - 'slippymap_desc' => 'Permite el uso de la etiqueta <tt><nowiki><slippymap></nowiki></tt> para mostrar un mapa de vías OpenLayers. Los mapas son de [http://openstreetmap.org openstreetmap.org]', |
342 | | - 'slippymap_latmissing' => 'valor lat perdido (para la latitud).', |
343 | | - 'slippymap_lonmissing' => 'Valor lon perdido (para la longitud).', |
344 | | - 'slippymap_zoommissing' => 'Valor z perdido (para el nivel zoom).', |
345 | | - 'slippymap_longdepreciated' => "Por favor usar 'lon' en lugar de 'long' (el parámetro fue renombrado).", |
346 | | - 'slippymap_widthnan' => "Valor de anchura (w) '%1' no es un valor entero", |
347 | | - 'slippymap_heightnan' => "Valor de altura (h) '%1' no es un valor entero", |
348 | | - 'slippymap_zoomnan' => "Valor de zoom (z) '%1' no es un valor entero", |
349 | | - 'slippymap_latnan' => "valor de latitud (lat) '%1' no es un número válido", |
350 | | - 'slippymap_lonnan' => "valor de longitud (lon) '%1' no es un número válido", |
351 | | - 'slippymap_widthbig' => 'valor de anchura (w) no puede ser mayor que 1000', |
352 | | - 'slippymap_widthsmall' => 'valor de anchura (w) no puede ser menor que 100', |
353 | | - 'slippymap_heightbig' => 'valor de altura (h) no puede ser mayor que 1000', |
354 | | - 'slippymap_heightsmall' => 'valor de altura (h) no puede ser menor que 100', |
355 | | - 'slippymap_latbig' => 'valor de latitud (lat) no puede ser mayor que 90', |
356 | | - 'slippymap_latsmall' => 'valor de latitud (lat) no puede ser menor que -90', |
357 | | - 'slippymap_lonbig' => 'valor de longitud (lon) no puede ser mayor que 180', |
358 | | - 'slippymap_lonsmall' => 'valor de longitud (lon) no puede ser menor que -180', |
359 | | - 'slippymap_zoomsmall' => 'valor de zoom (z) no puede ser menor que cero', |
360 | | - 'slippymap_zoombig' => 'valor de zoom (z) no puede ser mayor que 17.', |
361 | | - 'slippymap_maperror' => 'Error en mapa:', |
362 | | - 'slippymap_osmtext' => 'Ver este mapa en OpenStreetMap.org', |
363 | | - 'slippymap_code' => 'Wikicode para esta vista de mapa:', |
364 | | - 'slippymap_button_code' => 'Obtener wikicode', |
365 | | - 'slippymap_resetview' => 'Reestablecer vista', |
366 | | -); |
367 | | - |
368 | | -/** Basque (Euskara) |
369 | | - * @author An13sa |
370 | | - * @author Kobazulo |
371 | | - */ |
372 | | -$messages['eu'] = array( |
373 | | - 'slippymap_button_code' => 'Wikikodea lortu', |
374 | | - 'slippymap_resetview' => 'Bista berrezarri', |
375 | | -); |
376 | | - |
377 | | -/** Finnish (Suomi) |
378 | | - * @author Nike |
379 | | - * @author Str4nd |
380 | | - * @author Vililikku |
381 | | - */ |
382 | | -$messages['fi'] = array( |
383 | | - 'slippymap_desc' => 'Mahdollistaa <tt><nowiki><slippymap></nowiki></tt>-elementin käytön OpenLayers slippy map -kartan näyttämiseen. Kartat ovat osoitteesta [http://openstreetmap.org openstreetmap.org].', |
384 | | - 'slippymap_latmissing' => 'Puuttuva ”lat”-arvo leveysasteille.', |
385 | | - 'slippymap_lonmissing' => 'Puuttuva ”lon”-arvo pituusasteille.', |
386 | | - 'slippymap_zoommissing' => 'Puuttuva ”z”-arvo zoomaukselle.', |
387 | | - 'slippymap_longdepreciated' => 'Käytä ”lon”-arvoa ”long”-arvon sijasta nimenmuutoksen vuoksi.', |
388 | | - 'slippymap_widthnan' => 'leveysarvo (w) ”%1” ei ole kelvollinen kokonaisluku', |
389 | | - 'slippymap_heightnan' => 'Korkeusarvo (h) ”%1” ei ole kelvollinen kokonaisluku', |
390 | | - 'slippymap_zoomnan' => 'zoom-arvo (z) ”%1” ei ole kelvollinen kokonaisluku', |
391 | | - 'slippymap_latnan' => 'leveysastearvo (lat) ”%1” ei ole kelvollinen luku', |
392 | | - 'slippymap_lonnan' => 'Pituusastearvo ”%1” ei ole kelvollinen luku', |
393 | | - 'slippymap_widthbig' => 'leveysarvo (w) ei voi olla yli 1000', |
394 | | - 'slippymap_widthsmall' => 'leveysarvo (w) ei voi olla alle 100', |
395 | | - 'slippymap_heightbig' => 'korkeusarvo (h) ei voi olla yli 1000', |
396 | | - 'slippymap_heightsmall' => 'korkeusarvo (h) ei voi olla alle 100', |
397 | | - 'slippymap_latbig' => 'leveysastearvo (lat) ei voi olla yli 90', |
398 | | - 'slippymap_latsmall' => 'leveysastearvo (lat) ei voi olla alle -90', |
399 | | - 'slippymap_lonbig' => 'pituusastearvo (lon) ei voi olla yli 180', |
400 | | - 'slippymap_lonsmall' => 'pituusastearvo (lon) ei voi olla alle -180', |
401 | | - 'slippymap_zoomsmall' => 'zoom-arvo (z) ei voi olla alle nollan', |
402 | | - 'slippymap_zoom18' => 'Zoomaus (z) -arvo ei voi olla suurempi kuin 17. Tämä MediaWiki-laajennos hakee OpenStreetMapin Osmarender-tason, jota ei voi lähentää tasoa 17 enempää. Mapnik-taso, joka myös on käytettävissä openstreetmap.org:ssa, sisältää myös 18. lähennystason.', |
403 | | - 'slippymap_zoombig' => 'zoom-arvo (z) ei voi olla yli 17.', |
404 | | - 'slippymap_invalidlayer' => 'Virheellinen ”layer”-arvo ”%1”', |
405 | | - 'slippymap_maperror' => 'Karttavirhe:', |
406 | | - 'slippymap_osmtext' => 'Katso tämä kartta osoitteessa OpenStreetMap.org.', |
407 | | - 'slippymap_code' => 'Wikikoodi tälle karttanäkymälle:', |
408 | | - 'slippymap_button_code' => 'Hae wikikoodi', |
409 | | - 'slippymap_resetview' => 'Palauta näkymä', |
410 | | -); |
411 | | - |
412 | | -/** French (Français) |
413 | | - * @author Cedric31 |
414 | | - * @author Crochet.david |
415 | | - * @author Grondin |
416 | | - * @author IAlex |
417 | | - */ |
418 | | -$messages['fr'] = array( |
419 | | - 'slippymap_desc' => 'Autorise l’utilisation de la balise <tt><nowiki><slippymap></nowiki></tt> pour afficher une carte glissante d’OpenLayers. Les cartes proviennent de [http://openstreetmap.org openstreetmap.org]', |
420 | | - 'slippymap_latmissing' => 'Valeur lat manquante (pour la latitude).', |
421 | | - 'slippymap_lonmissing' => 'Valeur lon manquante (pour la longitude).', |
422 | | - 'slippymap_zoommissing' => 'Valeur z manquante (pour le niveau du zoom).', |
423 | | - 'slippymap_longdepreciated' => 'Veuillez utiliser « lon » au lieu de « long » (le paramètre a été renommé).', |
424 | | - 'slippymap_widthnan' => 'La largeur (w) ayant pour valeur « %1 » n’est pas un nombre entier correct.', |
425 | | - 'slippymap_heightnan' => 'La hauteur (h) ayant pour valeur « %1 » n’est pas un nombre entier correct.', |
426 | | - 'slippymap_zoomnan' => 'Le zoom (z) ayant pour valeur « %1 » n’est pas un nombre entier correct.', |
427 | | - 'slippymap_latnan' => 'La latitude (lat) ayant pour valeur « %1 » n’est pas un nombre correct.', |
428 | | - 'slippymap_lonnan' => 'La longitude (lon) ayant pour valeur « %1 » n’est pas un nombre correct.', |
429 | | - 'slippymap_widthbig' => 'La valeur de la largeur (w) ne peut excéder 1000', |
430 | | - 'slippymap_widthsmall' => 'La valeur de la largeur (w) ne peut être inférieure à 100', |
431 | | - 'slippymap_heightbig' => 'La valeur de la hauteur (h) ne peut excéder 1000', |
432 | | - 'slippymap_heightsmall' => 'La valeur de la hauteur (h) ne peut être inférieure à 100', |
433 | | - 'slippymap_latbig' => 'La valeur de la latitude (lat) ne peut excéder 90', |
434 | | - 'slippymap_latsmall' => 'La valeur de la latitude (lat) ne peut être inférieure à -90', |
435 | | - 'slippymap_lonbig' => 'La valeur de la longitude (lon) ne peut excéder 180', |
436 | | - 'slippymap_lonsmall' => 'La valeur de la longitude (lon) ne peut être inférieure à -180', |
437 | | - 'slippymap_zoomsmall' => 'La valeur du zoom (z) ne peut être négative', |
438 | | - 'slippymap_zoom18' => 'La valeur du zoom (z) ne peut excéder 17. Notez que ce crochet d’extension MediaWiki dans la couche « osmarender » de OpenStreetMap ne peut aller au-delà du niveau 17 du zoop. La couche Mapnik disponible sur openstreetmap.org, ne peut aller au-delà du niveau 18.', |
439 | | - 'slippymap_zoombig' => 'La valeur du zoom (z) ne peut excéder 17.', |
440 | | - 'slippymap_invalidlayer' => 'Valeur de « %1 » de la « couche » incorrecte', |
441 | | - 'slippymap_maperror' => 'Erreur de carte :', |
442 | | - 'slippymap_osmtext' => 'Voyez cette carte sur OpenStreetMap.org', |
443 | | - 'slippymap_code' => 'Code Wiki pour le visionnement de cette cate :', |
444 | | - 'slippymap_button_code' => 'Obtenir le code wiki', |
445 | | - 'slippymap_resetview' => 'Réinitialiser le visionnement', |
446 | | - 'slippymap_invalidmode' => 'Valeur « $1 » de « mode » invalide', |
447 | | - 'slippymap_clicktoactivate' => 'Cliquez pour activer la carte', |
448 | | -); |
449 | | - |
450 | | -/** Galician (Galego) |
451 | | - * @author Toliño |
452 | | - */ |
453 | | -$messages['gl'] = array( |
454 | | - 'slippymap_desc' => 'Permite o uso da etiqueta <tt><nowiki><slippymap></nowiki></tt> para amosar un mapa slippy. Os mapas son de [http://openstreetmap.org openstreetmap.org]', |
455 | | - 'slippymap_latmissing' => 'Falta o valor lat (para a latitude).', |
456 | | - 'slippymap_lonmissing' => 'Falta o valor lan (para a lonxitude).', |
457 | | - 'slippymap_zoommissing' => 'Falta o valor z (para o nivel do zoom).', |
458 | | - 'slippymap_longdepreciated' => 'Por favor, use "lon" no canto de "long" (o parámetro foi renomeado).', |
459 | | - 'slippymap_widthnan' => "o valor '%1' do ancho (w) non é un número enteiro válido", |
460 | | - 'slippymap_heightnan' => "o valor '%1' da altura (h) non é un número enteiro válido", |
461 | | - 'slippymap_zoomnan' => "o valor '%1' do zoom (z) non é un número enteiro válido", |
462 | | - 'slippymap_latnan' => "o valor '%1' da latitude (lat) non é un número enteiro válido", |
463 | | - 'slippymap_lonnan' => "o valor '%1' da lonxitude (lon) non é un número enteiro válido", |
464 | | - 'slippymap_widthbig' => 'o valor do ancho (w) non pode ser máis de 1000', |
465 | | - 'slippymap_widthsmall' => 'o valor do ancho (w) non pode ser menos de 100', |
466 | | - 'slippymap_heightbig' => 'o valor da altura (h) non pode ser máis de 1000', |
467 | | - 'slippymap_heightsmall' => 'o valor da altura (h) non pode ser menos de 100', |
468 | | - 'slippymap_latbig' => 'o valor da latitude (lat) non pode ser máis de 90', |
469 | | - 'slippymap_latsmall' => 'o valor da latitude (lat) non pode ser menos de -90', |
470 | | - 'slippymap_lonbig' => 'o valor da lonxitude (lon) non pode ser máis de 180', |
471 | | - 'slippymap_lonsmall' => 'o valor da lonxitude (lon) non pode ser menos de -180', |
472 | | - 'slippymap_zoomsmall' => 'o valor do zoom (z) non pode ser menos de cero', |
473 | | - 'slippymap_zoom18' => 'o valor do zoom (z) non pode ser máis de 17. Déase conta de que esta extensión MediaWiki asocia no OpenStreetMap a capa "osmarender", que non vai máis alá do nivel 17 do zoom. A capa Mapnik dispoñible en openstreetmap.org, vai máis aló do nivel 18', |
474 | | - 'slippymap_zoombig' => 'o valor do zoom (z) non pode ser máis de 17.', |
475 | | - 'slippymap_invalidlayer' => 'Valor \'%1\' da "capa" inválido', |
476 | | - 'slippymap_maperror' => 'Erro no mapa:', |
477 | | - 'slippymap_osmtext' => 'Vexa este mapa en OpenStreetMap.org', |
478 | | - 'slippymap_code' => 'Código wiki para o visionado deste mapa:', |
479 | | - 'slippymap_button_code' => 'Obter o código wiki', |
480 | | - 'slippymap_resetview' => 'Axustar a vista', |
481 | | - 'slippymap_invalidmode' => 'Valor "$1" de "modo" inválido', |
482 | | - 'slippymap_clicktoactivate' => 'Prema para activar o mapa', |
483 | | -); |
484 | | - |
485 | | -/** Swiss German (Alemannisch) |
486 | | - * @author Als-Holder |
487 | | - */ |
488 | | -$messages['gsw'] = array( |
489 | | - 'slippymap_desc' => 'Macht s megli s <tt><nowiki><slippymap></nowiki></tt>-Tag z nutze fir zum Aazeige vun ere OpenLayer-SlippyMap. D Charte stamme vu [http://openstreetmap.org openstreetmap.org]', |
490 | | - 'slippymap_latmissing' => 'S isch kei Wärt fir di geografisch Breiti (lat) aagee wore.', |
491 | | - 'slippymap_lonmissing' => 'S isch kei Wärt fir di geografisch Lengi (lon) aagee wore.', |
492 | | - 'slippymap_zoommissing' => 'S isch kei Zoom-Wärt (z) aagee wore.', |
493 | | - 'slippymap_longdepreciated' => 'Bitte bruuch „lon“ statt „long“ (Parameter isch umgnännt wore).', |
494 | | - 'slippymap_widthnan' => 'Dr Wärt fir d Breiti (w) „%1“ isch kei giltigi Zahl', |
495 | | - 'slippymap_heightnan' => 'Dr Wert fir d Hechi (h) „%1“ isch kei giltigi Zahl', |
496 | | - 'slippymap_zoomnan' => 'Dr Wert fir dr Zoom (z) „%1“ isch kei giltigi Zahl', |
497 | | - 'slippymap_latnan' => 'Dr Wärt fir di geografisch Breiti (lat) „%1“ isch kei giltigi Zahl', |
498 | | - 'slippymap_lonnan' => 'Dr Wärt fir di geografisch Lengi (lon) „%1“ isch kei giltigi Zahl', |
499 | | - 'slippymap_widthbig' => 'D Breiti (w) derf nit greßer syy wie 1000', |
500 | | - 'slippymap_widthsmall' => 'D Breiti (w) derf nit greßer syy wie 100', |
501 | | - 'slippymap_heightbig' => 'D Hechi (h) derf nit greßer syy wie 1000', |
502 | | - 'slippymap_heightsmall' => 'D Hechi (h) derf nit greßer syy wie 100', |
503 | | - 'slippymap_latbig' => 'Di geografisch Breiti derf nit greßer syy wie 90', |
504 | | - 'slippymap_latsmall' => 'Di geografisch Breiti derf nit chleiner syy wie -90', |
505 | | - 'slippymap_lonbig' => 'Di geografisch Lengi derf nit greßer syy wie 180', |
506 | | - 'slippymap_lonsmall' => 'Di geografisch Lengi derf nit chleiner syy wie -180', |
507 | | - 'slippymap_zoomsmall' => 'Dr Zoomwärt derf nit negativ syy', |
508 | | - 'slippymap_zoom18' => 'Dr Zoomwärt (z) derf nit greßer syy wie 17. Gib acht, ass die MediaWiki-Erwyterig d OpenStreetMap „Osmarender“-Charte yybindet, wu nit hecher goht wie Zoom 17. D Mapnik-Charte isch uf openstreetmap.org verfiegbar un goht bis Zoom 18.', |
509 | | - 'slippymap_zoombig' => 'Dr Zoomwärt (z) derf nit greßer syy wie 17.', |
510 | | - 'slippymap_invalidlayer' => 'Uugiltige „layer“-Wärt „%1“', |
511 | | - 'slippymap_maperror' => 'Chartefähler:', |
512 | | - 'slippymap_osmtext' => 'Die Charte uf OpenStreetMap.org bschaue', |
513 | | - 'slippymap_code' => 'Wikitäxt fir die Chartenaasicht:', |
514 | | - 'slippymap_button_code' => 'Zeig Wikicode', |
515 | | - 'slippymap_resetview' => 'Zruggsetze', |
516 | | - 'slippymap_invalidmode' => "Uugiltige 'mode'-Wärt'$1'", |
517 | | - 'slippymap_clicktoactivate' => 'Zum Aktiviere vu dr Charte drucke', |
518 | | -); |
519 | | - |
520 | | -/** Hebrew (עברית) |
521 | | - * @author Rotemliss |
522 | | - * @author YaronSh |
523 | | - */ |
524 | | -$messages['he'] = array( |
525 | | - 'slippymap_desc' => 'מתן האפשרות לשימוש בתגית <tt><nowiki><slippymap></nowiki></tt> להצגת מפת OpenLayers רדומה. המפות הן מהאתר [http://openstreetmap.org openstreetmap.org]', |
526 | | - 'slippymap_latmissing' => 'ערך ה־lat חסר (עבור קו־הרוחב).', |
527 | | - 'slippymap_lonmissing' => 'ערך ה־lon חסר(עבור קו־האורך).', |
528 | | - 'slippymap_zoommissing' => 'ערך ה־z חסר (לרמת ההגדלה).', |
529 | | - 'slippymap_longdepreciated' => "אנא השתמשו ב־'lon' במקום ב־'long' (שם הפרמטר שונה).", |
530 | | - 'slippymap_widthnan' => "ערך הרוחב (w) '%1' אינו מספר שלם תקין", |
531 | | - 'slippymap_heightnan' => "ערך הגובה (h) '%1' אינו מספר שלם תקין", |
532 | | - 'slippymap_zoomnan' => "ערך ההגדלה (z) '%1' אינו מספר שלם תקין", |
533 | | - 'slippymap_latnan' => "ערך קו־הרוחב (lat) '%1' אינו מספר תקין", |
534 | | - 'slippymap_lonnan' => "ערך קו־האורך (lon) '%1' אינו מספר תקין", |
535 | | - 'slippymap_widthbig' => 'ערך הרוחב (w) לא יכול לחרוג מעבר ל־1000.', |
536 | | - 'slippymap_widthsmall' => 'ערך הרוחב (w) לא יכול לחרוג אל מתחת ל־100', |
537 | | - 'slippymap_heightbig' => 'ערך הגובה (h) לא יכול לחרוג אל מעבר ל־1000', |
538 | | - 'slippymap_heightsmall' => 'ערך הגובה (h) לא יכול לחרוג אל מתחת ל־100', |
539 | | - 'slippymap_latbig' => 'ערך קו־הרוחב (lat) לא יכול לחרוג מעבר ל־90', |
540 | | - 'slippymap_latsmall' => 'ערך קו־הרוחב (lat) לא יכול לחרוג אל מתחת ל־ -90', |
541 | | - 'slippymap_lonbig' => 'ערך קו־האורך (lon) לא יכול לחרוג אל מעבר ל־180', |
542 | | - 'slippymap_lonsmall' => 'ערך קו־האורך (lon) לא יכול לחרוג אל מתחת ל־ -180', |
543 | | - 'slippymap_zoomsmall' => 'ערך ההגדלה (z) לא יכול לחרוג אל מתחת לאפס', |
544 | | - 'slippymap_zoom18' => "ערך ההגדלה (z) לא יכול לחרוג אל מעבר ל־17. שימו לב שהרחבת מדיה־ויקי זו מתממשקת אל שכבת ה־'osmarender' של OpenStreetMap שאינה תומכת ברמת הגדלה הגדולה מ־17. שכבת ה־Mapnik הזמינה באתר openstreetmap.org, מגיעה לרמת הגדלה 18.", |
545 | | - 'slippymap_zoombig' => 'ערך ההגדלה (z) לא יכול לחרוג אל מעבר ל־17.', |
546 | | - 'slippymap_invalidlayer' => "ערך ה־'layer' אינו תקין '%1'", |
547 | | - 'slippymap_maperror' => 'שגיאת מפה:', |
548 | | - 'slippymap_osmtext' => 'עיינו במפה זו באתר OpenStreetMap.org', |
549 | | - 'slippymap_code' => 'קוד הוויקי להצגת מפה זו:', |
550 | | - 'slippymap_button_code' => 'איחזור קוד הוויקי', |
551 | | - 'slippymap_resetview' => 'איפוס התצוגה', |
552 | | - 'slippymap_clicktoactivate' => 'לחצו כדי להפעיל את המפה', |
553 | | -); |
554 | | - |
555 | | -/** Upper Sorbian (Hornjoserbsce) |
556 | | - * @author Michawiki |
557 | | - */ |
558 | | -$messages['hsb'] = array( |
559 | | - 'slippymap_desc' => 'Zmóžnja wužiwanje taflički <tt><nowiki><slippymap></nowiki></tt> za zwobraznjenje posuwneje karty OpenLayer. Karty su z [http://openstreetmap.org openstreetmap.org]', |
560 | | - 'slippymap_latmissing' => 'Hódnota za šěrinu (lat) pobrachuje', |
561 | | - 'slippymap_lonmissing' => 'Hódnota za geografisku dołhosć (lon) pobrachuje.', |
562 | | - 'slippymap_zoommissing' => 'Hódnota za skalowanje (z) pobrachuje.', |
563 | | - 'slippymap_longdepreciated' => "Prošu wužiwaj 'lon' město 'lon' (parameter je so přemjenował)", |
564 | | - 'slippymap_widthnan' => "Hódnota šěrokosće (w) '%1' njeje płaćiwa cyła ličba", |
565 | | - 'slippymap_heightnan' => "Hódnota wysokosće (h) '%1' njeje płaćiwa cyła ličba", |
566 | | - 'slippymap_zoomnan' => "Hódnota za skalowanje (z) '%1' njeje płaćiwa cyła ličba", |
567 | | - 'slippymap_latnan' => "Hódnota za šěrinu (lat) '%1' njeje płaćiwa ličba", |
568 | | - 'slippymap_lonnan' => "Hódnota za geografisku dołhosć (lon) '%1' njeje płaćiwa ličba", |
569 | | - 'slippymap_widthbig' => 'Hódnota šěrokosće (w) njesmě wjetša hač 1000 być', |
570 | | - 'slippymap_widthsmall' => 'Hódnota šěrokosće (w) njesmě mjeńša hač 100 być', |
571 | | - 'slippymap_heightbig' => 'Hódnota wysokosće (h) njesmě wjetša hač 1000 być', |
572 | | - 'slippymap_heightsmall' => 'Hódnota wysokosće (h) njesmě mjeńša hač 100 być', |
573 | | - 'slippymap_latbig' => 'Hódnota šěriny (lat) njesmě wjetša hač 90 być', |
574 | | - 'slippymap_latsmall' => 'Hódnota šěriny (lat) njesmě mjeńša hač -90 być', |
575 | | - 'slippymap_lonbig' => 'Hódnota geografiskeje dołhosće (lon) njesmě wjetša hač 180 być', |
576 | | - 'slippymap_lonsmall' => 'Hódnota geografiskeje dołhosće (lon) njesmě mjeńša hač -180 być', |
577 | | - 'slippymap_zoomsmall' => 'Hódnota skalowanja (z) njesmě mjeńša hač nul być', |
578 | | - 'slippymap_zoom18' => "Hódnota skalowanja (z) njesmě wjetša hač 17 być. Wobkedźbuj, zo tute rozšěrjenje MediaWiki wórštu OpenStreetMap 'Osmarender' zapřijima, kotraž skalowansku runinu 17 njepřesaha. Wóršta Mapnik, kotraž na openstreetmap.org k dispoziciji steji, saha hač k skalowanskej runinje 18.", |
579 | | - 'slippymap_zoombig' => 'Hódnota skalowanja (z) njesmě wjetša hač 17 być.', |
580 | | - 'slippymap_invalidlayer' => "Njepłaćiwa hódnota 'wóršty' '%1'", |
581 | | - 'slippymap_maperror' => 'Kartowy zmylk:', |
582 | | - 'slippymap_osmtext' => 'Hlej tutu kartu na OpenStreetMap.org', |
583 | | - 'slippymap_code' => 'Wikikod za tutón kartowy napohlad:', |
584 | | - 'slippymap_button_code' => 'Wikikod pokazać', |
585 | | - 'slippymap_resetview' => 'Napohlad wróćo stajić', |
586 | | - 'slippymap_invalidmode' => "Njepłaćiwa hódnota 'mode' '$1'", |
587 | | - 'slippymap_clicktoactivate' => 'Kliknyć, zo by so karta aktiwizowała', |
588 | | -); |
589 | | - |
590 | | -/** Interlingua (Interlingua) |
591 | | - * @author McDutchie |
592 | | - */ |
593 | | -$messages['ia'] = array( |
594 | | - 'slippymap_desc' => 'Permitte le uso del etiquetta <tt><nowiki><slippymap></nowiki></tt> pro monstrar un carta glissante de OpenLayers. Le cartas proveni de [http://openstreetmap.org openstreetmap.org]', |
595 | | - 'slippymap_latmissing' => 'Valor lat mancante (pro le latitude).', |
596 | | - 'slippymap_lonmissing' => 'Valor lon mancante (pro le longitude).', |
597 | | - 'slippymap_zoommissing' => 'Valor z mancante (pro le nivello de zoom).', |
598 | | - 'slippymap_longdepreciated' => "Per favor usa 'lon' in loco de 'long' (le parametro ha essite renominate).", |
599 | | - 'slippymap_widthnan' => "Le valor '%1' del latitude (w) non es un numero integre valide", |
600 | | - 'slippymap_heightnan' => "Le valor '%1' del altitude (h) non es un numero integre valide", |
601 | | - 'slippymap_zoomnan' => "Le valor '%1' del zoom (z) non es un numero integre valide", |
602 | | - 'slippymap_latnan' => "Le valor '%1' del latitude (lat) non es un numero valide", |
603 | | - 'slippymap_lonnan' => "Le valor '%1' del longitude (lon) non es un numero valide", |
604 | | - 'slippymap_widthbig' => 'Le valor del latitude (w) non pote exceder 1000', |
605 | | - 'slippymap_widthsmall' => 'Le valor del latitude (w) non pote esser minus de 100', |
606 | | - 'slippymap_heightbig' => 'Le valor del altitude (h) non pote esser plus de 1000', |
607 | | - 'slippymap_heightsmall' => 'Le valor del altitude (h) non pote esser minus de 100', |
608 | | - 'slippymap_latbig' => 'Le valor del latitude (lat) non pote exceder 90', |
609 | | - 'slippymap_latsmall' => 'Le valor del latitude (lat) non pote esser minus de -90', |
610 | | - 'slippymap_lonbig' => 'Le valor del longitude (lon) non pote exceder 100', |
611 | | - 'slippymap_lonsmall' => 'Le valor del longitude (lon) non pote esser minus de -100', |
612 | | - 'slippymap_zoomsmall' => 'Le valor del zoom (z) non pote esser minus de zero', |
613 | | - 'slippymap_zoom18' => "Le valor del zoom (z) non pote exceder 17. Nota que iste extension de MediaWiki se installa in le strato 'osmarender' de OpenStreetMap, le qual non excede le nivello de zoom 17. Le strato Mapnik disponibile in openstreetmap.org ha un nivello de zoom maxime de 18.", |
614 | | - 'slippymap_zoombig' => 'Le valor del zoom (z) non pote exceder 17.', |
615 | | - 'slippymap_invalidlayer' => "Valor de 'strato' invalide '%1'", |
616 | | - 'slippymap_maperror' => 'Error de carta:', |
617 | | - 'slippymap_osmtext' => 'Vider iste carta in OpenStreetMap.org', |
618 | | - 'slippymap_code' => 'Codice Wiki pro iste vista del carta:', |
619 | | - 'slippymap_button_code' => 'Obtener codice wiki', |
620 | | - 'slippymap_resetview' => 'Reinitialisar vista', |
621 | | - 'slippymap_invalidmode' => "Valor de 'mode' invalide: '$1'", |
622 | | - 'slippymap_clicktoactivate' => 'Clicca pro activar le carta', |
623 | | -); |
624 | | - |
625 | | -/** Italian (Italiano) |
626 | | - * @author Darth Kule |
627 | | - */ |
628 | | -$messages['it'] = array( |
629 | | - 'slippymap_desc' => "Permette l'utilizzo del tag <tt><nowiki><slippymap></nowiki></tt> per visualizzare una mappa OpenLayers. Le mappe sono prese da [http://openstreetmap.org openstreetmap.org]", |
630 | | - 'slippymap_latmissing' => 'Manca il valore lat (per la latitudine).', |
631 | | - 'slippymap_lonmissing' => 'Manca il valore lon (per la longitudine).', |
632 | | - 'slippymap_zoommissing' => 'Manca il valore z (per il livello dello zoom).', |
633 | | - 'slippymap_longdepreciated' => "Usare 'lon' invece di 'long' (il parametro è stato rinominato).", |
634 | | - 'slippymap_widthnan' => "il valore '%1' della larghezza (w) non è un intero valido", |
635 | | - 'slippymap_heightnan' => "il valore '%1' dell'altezza (h) non è un intero valido", |
636 | | - 'slippymap_zoomnan' => "il valore '%1' dello zoom (z) non è un intero valido", |
637 | | - 'slippymap_latnan' => "il valore '%1' della latitudine (lat) non è un numero valido", |
638 | | - 'slippymap_lonnan' => "il valore '%1' della longitudine (long) non è un numero valido", |
639 | | - 'slippymap_widthbig' => 'il valore della larghezza (w) non può essere maggiore di 1000', |
640 | | - 'slippymap_widthsmall' => 'il valore della larghezza (w) non può essere minore di 100', |
641 | | - 'slippymap_heightbig' => "il valore dell'altezza (h) non può essere maggiore di 1000", |
642 | | - 'slippymap_heightsmall' => "il valore dell'altezza (h) non può essere minore di 100", |
643 | | - 'slippymap_latbig' => 'il valore della latitudine (lat) non può essere maggiore di 90', |
644 | | - 'slippymap_latsmall' => 'il valore della latitudine (lat) non può essere minore di -90', |
645 | | - 'slippymap_lonbig' => 'il valore della longitudine (lon) non può essere maggiore di 180', |
646 | | - 'slippymap_lonsmall' => 'il valore della longitudine (lon) non può essere minore di -180', |
647 | | - 'slippymap_zoomsmall' => 'il valore dello zoom (z) non può essere minore di zero', |
648 | | - 'slippymap_zoom18' => "il valore dello zoom (z) non può essere maggiore di 17. Nota che questa estensione MediaWiki utilizza il layer 'osmarender' di OpenStreetMap che non va oltre il livello 17 di zoom. Il layer Mapnik disponibile su openstreetmap.org arriva fino a un livello 18 di zoom", |
649 | | - 'slippymap_zoombig' => 'il valore dello zoom (z) non può essere maggiore di 17.', |
650 | | - 'slippymap_invalidlayer' => "Valore '%1' di 'layer' non valido", |
651 | | - 'slippymap_maperror' => 'Errore mappa:', |
652 | | - 'slippymap_osmtext' => 'Guarda questa mappa su OpenStreetMap.org', |
653 | | - 'slippymap_code' => 'Codice wiki per visualizzare questa mappa:', |
654 | | - 'slippymap_button_code' => 'Ottieni codice wiki', |
655 | | - 'slippymap_resetview' => 'Reimposta visuale', |
656 | | -); |
657 | | - |
658 | | -/** Japanese (日本語) |
659 | | - * @author Fryed-peach |
660 | | - */ |
661 | | -$messages['ja'] = array( |
662 | | - 'slippymap_desc' => 'OpenLayers による滑らかな地図を表示するための <tt><nowiki><slippymap></nowiki></tt> タグを利用できるようにする。地図は [http://openstreetmap.org openstreetmap.org] から取得される', |
663 | | - 'slippymap_latmissing' => '緯度値 lat が指定されていません。', |
664 | | - 'slippymap_lonmissing' => '経度値 lon が指定されていません。', |
665 | | - 'slippymap_zoommissing' => '拡大度 z が指定されていません。', |
666 | | - 'slippymap_longdepreciated' => '"long" ではなく "lon" を用いてください(引数が改名されました)。', |
667 | | - 'slippymap_widthnan' => '幅 (w) の値「%1」は有効な整数ではありません', |
668 | | - 'slippymap_heightnan' => '高さ (h) の値「%1」は有効な整数ではありません', |
669 | | - 'slippymap_zoomnan' => '拡大度 (z) の値「%1」は有効な整数ではありません', |
670 | | - 'slippymap_latnan' => '緯度 (lat) の値「%1」は有効な数値ではありません', |
671 | | - 'slippymap_lonnan' => '経度 (lon) の値「%1」は有効な数値ではありません', |
672 | | - 'slippymap_widthbig' => '幅 (w) の値は1000より大きくはできません', |
673 | | - 'slippymap_widthsmall' => '幅 (w) の値は100より小さくはできません', |
674 | | - 'slippymap_heightbig' => '高さ (h) の値は1000より大きくはできません', |
675 | | - 'slippymap_heightsmall' => '高さ (h) の値は100より小さくはできません', |
676 | | - 'slippymap_latbig' => '緯度 (lat) の値は90より大きくはできません', |
677 | | - 'slippymap_latsmall' => '緯度 (lat) の値は-90より小さくはできません', |
678 | | - 'slippymap_lonbig' => '経度 (lon) の値は180より大きくはできません', |
679 | | - 'slippymap_lonsmall' => '経度 (lon) の値は-180より小さくはできません', |
680 | | - 'slippymap_zoomsmall' => '拡大度 (z) の値は0より小さくはできません', |
681 | | - 'slippymap_zoom18' => '拡大度 (z) の値は17より大きくはできません。なお、この MediaWiki 拡張機能がフックしている、OpenStreetMap の "osmarender" レイヤーは17を超す拡大度を利用できません。openstreetmap.org で利用可能な "Mapnik" レイヤーは18までの拡大度が利用できます。', |
682 | | - 'slippymap_zoombig' => '拡大度 (z) の値は17より大きくはできません', |
683 | | - 'slippymap_invalidlayer' => '「layer」の値「%1」は無効', |
684 | | - 'slippymap_maperror' => '地図エラー:', |
685 | | - 'slippymap_osmtext' => 'この地図を OpenStreetMap.org で見る', |
686 | | - 'slippymap_code' => 'この地図表示用のウィキマークアップ:', |
687 | | - 'slippymap_button_code' => 'ウィキマークアップを取得', |
688 | | - 'slippymap_resetview' => '表示を更新', |
689 | | - 'slippymap_invalidmode' => '「mode」の値「$1」は無効', |
690 | | - 'slippymap_clicktoactivate' => 'クリックして地図をアクティブにする', |
691 | | -); |
692 | | - |
693 | | -/** Khmer (ភាសាខ្មែរ) |
694 | | - * @author Thearith |
695 | | - */ |
696 | | -$messages['km'] = array( |
697 | | - 'slippymap_latmissing' => 'ខ្វះតម្លៃរយៈទទឹង (សម្រាប់រយៈទទឹង)។', |
698 | | - 'slippymap_lonmissing' => 'ខ្វះតម្លៃរយៈបណ្ដោយ (សម្រាប់រយៈបណ្ដោយ)។', |
699 | | - 'slippymap_zoommissing' => 'ខ្វះតម្លៃ Z (សម្រាប់កម្រិតពង្រីក)។', |
700 | | - 'slippymap_longdepreciated' => "សូមប្រើ 'lon' ជំនួសឱ្យ 'long' (ប៉ារ៉ាម៉ែត្រត្រូវបានប្ដូរឈ្មោះ)។", |
701 | | - 'slippymap_widthnan' => "តម្លៃទទឹង (w) '%1' មិនមែនជាចំនួនគត់ត្រឹមត្រូវទេ", |
702 | | - 'slippymap_heightnan' => "តម្លៃកម្ពស់ (h) '%1' មិនមែនជាចំនួនគត់ត្រឹមត្រូវទេ", |
703 | | - 'slippymap_zoomnan' => "តម្លៃពង្រីក (z) '%1' មិនមែនជាចំនួនគត់ត្រឹមត្រូវទេ", |
704 | | - 'slippymap_latnan' => "តម្លៃទទឹង (lat) '%1' មិនមែនជាចំនួនត្រឹមត្រូវទេ", |
705 | | - 'slippymap_lonnan' => "តម្លៃបណ្ដោយ (lon) '%1' មិនមែនជាចំនួនត្រឹមត្រូវទេ", |
706 | | - 'slippymap_widthbig' => 'តម្លៃទទឹង (w) មិនអាចធំជាង ១០០០ ទេ', |
707 | | - 'slippymap_widthsmall' => 'តម្លៃទទឹង (w) មិនអាចតូចជាង ១០០ ទេ', |
708 | | - 'slippymap_heightbig' => 'តម្លៃកម្ពស់ (h) មិនអាចធំជាង ១០០០ ទេ', |
709 | | - 'slippymap_heightsmall' => 'តម្លៃកម្ពស់ (h) មិនអាចតូចជាង ១០០ ទេ', |
710 | | - 'slippymap_latbig' => 'តម្លៃរយៈទទឹង (lat) មិនអាចធំជាង ៩០ ទេ', |
711 | | - 'slippymap_latsmall' => 'តម្លៃរយៈទទឹង (lat) មិនអាចតូចជាង -៩០ ទេ', |
712 | | - 'slippymap_lonbig' => 'តម្លៃរយៈបណ្ដោយ (lon) មិនអាចធំជាង ១៨០ ទេ', |
713 | | - 'slippymap_lonsmall' => 'តម្លៃរយៈបណ្ដោយ (lon) មិនអាចតូចជាង -១៨០ ទេ', |
714 | | - 'slippymap_zoomsmall' => 'តម្លៃពង្រីក (z) មិនអាចតូចជាងសូន្យទេ', |
715 | | - 'slippymap_zoombig' => 'តម្លៃពង្រីក (z) មិនអាចធំជាង ១៧ ទេ។', |
716 | | - 'slippymap_maperror' => 'កំហុសផែនទី៖', |
717 | | - 'slippymap_osmtext' => 'មើលផែនទីនេះ នៅលើ OpenStreetMap.org', |
718 | | - 'slippymap_code' => 'កូដឹវិគីសម្រាប់មើលផែនទីនេះ៖', |
719 | | - 'slippymap_button_code' => 'យកកូដវិគី', |
720 | | - 'slippymap_resetview' => 'កំណត់ការមើលឡើងវិញ', |
721 | | -); |
722 | | - |
723 | | -/** Ripoarisch (Ripoarisch) |
724 | | - * @author Purodha |
725 | | - */ |
726 | | -$messages['ksh'] = array( |
727 | | - 'slippymap_desc' => 'Deit dä Befääl <tt> <nowiki><slippymap></nowiki> </tt> em Wiki dobei, öm en <i lang="en">OpenLayers slippy map</i> Kaat aanzezeije. De Landkaate-Date kumme dobei fun <i lang="en">[http://openstreetmap.org openstreetmap.org]</i> her.', |
728 | | - 'slippymap_latmissing' => "Dä Wäät 'lat' för de Breed om Jlobus es nit aanjejovve.", |
729 | | - 'slippymap_lonmissing' => "Dä Wäät 'lon' för de Läng om Jlobus es nit aanjejovve.", |
730 | | - 'slippymap_zoommissing' => "Dä Wäät 'z' för dä Zoom es nit aanjejovve.", |
731 | | - 'slippymap_longdepreciated' => "Bes esu joot un donn dä Parrameeter 'lon' för de Läng om Jlobus nämme, |
732 | | -un nit mieh 'long' — dä Parrameeter wood enzwesche ömjanannt.", |
733 | | - 'slippymap_widthnan' => "„%1“ en kein jöltijje positive janze Zahl för dä Wäät 'w' för de Breed fum Beld.", |
734 | | - 'slippymap_heightnan' => "„%1“ en kein jöltijje positive janze Zahl för dä Wäät 'h' för de Hühde fum Beld.", |
735 | | - 'slippymap_zoomnan' => "„%1“ en kein jöltijje janze Zahl för dä Wäät 'z' för der Zoom.", |
736 | | - 'slippymap_latnan' => "„%1“ en kein jöltijje Zahl för dä Wäät 'lat' för de Brred om Jlobus.", |
737 | | - 'slippymap_lonnan' => "„%1“ es kein jöltijje Zahl för dä Wäät 'lon' för de Läng om Jlobus.", |
738 | | - 'slippymap_widthbig' => "Dä Wäät 'w' för de Breed fum Beld darf nit övver 1000 jonn.", |
739 | | - 'slippymap_widthsmall' => "Dä Wäät 'w' för de Breed fum Beld darf nit unger 100 jonn.", |
740 | | - 'slippymap_heightbig' => "Dä Wäät 'h' för de Hühde fum Beld darf nit övver 1000 jonn.", |
741 | | - 'slippymap_heightsmall' => "Dä Wäät 'h' för de Hühde fum Beld darf nit unger 100 jonn.", |
742 | | - 'slippymap_latbig' => "Dä Wäät 'lat' för de Breed om Jlobus darf nit övver 90 sin.", |
743 | | - 'slippymap_latsmall' => "Dä Wäät 'lat' för de Breed om Jlobus darf nit unger -90 sin.", |
744 | | - 'slippymap_lonbig' => "Dä Wäät 'lon' för de Läng om Jlobus darf nit övver 180 sin.", |
745 | | - 'slippymap_lonsmall' => "Dä Wäät 'lon' för de Läng om Jlobus darf nit unger -180 sin.", |
746 | | - 'slippymap_zoomsmall' => "Dä Wäät 'z' för der Zoom darf nit unger Noll sin.", |
747 | | - 'slippymap_zoom18' => 'Dä Wäät \'z\' för dä Zoom darf nit övver 17 sin. |
748 | | -Opjepaß: Hee dä Zosatz zor MediaWiki-ßoffwäer deiht de |
749 | | -<i lang="en">OpenStreetMap</i>-Kaate vum Tüp |
750 | | -\'<i lang="en">Osmarender</i>\' enbenge, wo dä Zoom bes 17 jeiht. |
751 | | -De \'<i lang="en">Mapnik</i>\' Kaate sen och op |
752 | | -http://openstreetmap.org/ ze fenge, un dänne iere Zoom jeiht bes 18.', |
753 | | - 'slippymap_zoombig' => "Dä Wäät 'z' för dä Zoom darf nit övver 17 sin.", |
754 | | - 'slippymap_invalidlayer' => "„%1“ es ene onjöltije Wäät för 'Schesch'.", |
755 | | - 'slippymap_maperror' => 'Fähler met dä Kaat:', |
756 | | - 'slippymap_osmtext' => 'Donn die Kaat op <i lang="en">OpenStreetMap.org</i> anloore', |
757 | | - 'slippymap_code' => 'Dä Wiki-Kood för di Kaate-Aansesh es:', |
758 | | - 'slippymap_button_code' => 'Donn dä Wiki-Kood zeije', |
759 | | - 'slippymap_resetview' => 'Aansesh zeröcksetze', |
760 | | - 'slippymap_invalidmode' => '„$1“ es ene onjöltije Wäät för <code lang="en">\'mode\'</code>.', |
761 | | - 'slippymap_clicktoactivate' => 'Don klecke, öm di Kaat aanzemaache', |
762 | | -); |
763 | | - |
764 | | -/** Luxembourgish (Lëtzebuergesch) |
765 | | - * @author Robby |
766 | | - */ |
767 | | -$messages['lb'] = array( |
768 | | - 'slippymap_desc' => "Erméiglecht d'Benotzung vum Tag <tt><nowiki><slippymap></nowiki></tt> fir eng ''OpenLayers slippy map'' ze weisen. D'kaarte si vun [http://openstreetmap.org openstreetmap.org]", |
769 | | - 'slippymap_longdepreciated' => "Benitzt w.e.g. 'lon' aplaz vun 'long' (de parameter gouf ëmbennnt)", |
770 | | - 'slippymap_widthnan' => "Breet (w) de Wert '%1' ass keng gëlteg ganz Zuel", |
771 | | - 'slippymap_zoomnan' => "Zoom (z) de Wert '%1' ass keng gëlteg ganz Zuel", |
772 | | - 'slippymap_widthbig' => 'Breet (w) de Wert kann net méi grouss si wéi 1000', |
773 | | - 'slippymap_widthsmall' => 'Breet (w) de Wert kann net méi kleng si wéi 100', |
774 | | - 'slippymap_heightbig' => 'Héicht (h) de Wert kann net méi grouss wéi 1000 sinn', |
775 | | - 'slippymap_heightsmall' => 'Héicht (h) de Wert kann net méi kleng wéi 100 sinn', |
776 | | - 'slippymap_zoomsmall' => 'Zoom (z) de Wert kann net méi kleng si wéi null', |
777 | | - 'slippymap_zoombig' => 'Zoom (z) de Wert kann net méi grouss si wéi 17.', |
778 | | - 'slippymap_maperror' => 'Kaartefeeler:', |
779 | | - 'slippymap_osmtext' => 'Kuckt dës Kaart op OpenStreetMap.org', |
780 | | - 'slippymap_code' => 'Wikicode fir dës Kaart ze kucken:', |
781 | | - 'slippymap_button_code' => 'Wikicode weisen', |
782 | | - 'slippymap_resetview' => 'Zrécksetzen', |
783 | | -); |
784 | | - |
785 | | -/** Nahuatl (Nāhuatl) |
786 | | - * @author Fluence |
787 | | - */ |
788 | | -$messages['nah'] = array( |
789 | | - 'slippymap_maperror' => 'Ahcuallōtl āmatohcopa', |
790 | | -); |
791 | | - |
792 | | -/** Dutch (Nederlands) |
793 | | - * @author SPQRobin |
794 | | - * @author Siebrand |
795 | | - */ |
796 | | -$messages['nl'] = array( |
797 | | - 'slippymap_desc' => 'Laat het gebruik van de tag <tt><nowiki><slippymap></nowiki></tt> toe om een OpenLayers-kaart weer te geven. Kaarten zijn van [http://openstreetmap.org openstreetmap.org]', |
798 | | - 'slippymap_latmissing' => 'De "lat"-waarde ontbreekt (voor de breedte).', |
799 | | - 'slippymap_lonmissing' => 'De "lon"-waarde ontbreekt (voor de lengte).', |
800 | | - 'slippymap_zoommissing' => 'De "z"-waarde ontbreekt (voor het zoomniveau).', |
801 | | - 'slippymap_longdepreciated' => 'Gebruik "lon" in plaats van "long" (parameter is hernoemd).', |
802 | | - 'slippymap_widthnan' => "De waarde '%1' voor de breedte (w) is geen geldige integer", |
803 | | - 'slippymap_heightnan' => "De waarde '%1' voor de hoogte (h) is geen geldige integer", |
804 | | - 'slippymap_zoomnan' => "De waarde '%1' voor de zoom (z) is geen geldige integer", |
805 | | - 'slippymap_latnan' => "De waarde '%1' voor de breedte (lat) is geen geldig nummer", |
806 | | - 'slippymap_lonnan' => "De waarde '%1' voor de lengte (lon) is geen geldig nummer", |
807 | | - 'slippymap_widthbig' => 'De breedte (w) kan niet groter dan 1000 zijn', |
808 | | - 'slippymap_widthsmall' => 'De breedte (w) kan niet kleiner dan 100 zijn', |
809 | | - 'slippymap_heightbig' => 'De hoogte (h) kan niet groter dan 1000 zijn', |
810 | | - 'slippymap_heightsmall' => 'De hoogte (h) kan niet kleiner dan 100 zijn', |
811 | | - 'slippymap_latbig' => 'De breedte (lat) kan niet groter dan -90 zijn', |
812 | | - 'slippymap_latsmall' => 'De breedte (lat) kan niet kleiner dan -90 zijn', |
813 | | - 'slippymap_lonbig' => 'De lengte (lon) kan niet groter dan 180 zijn', |
814 | | - 'slippymap_lonsmall' => 'De lengte (lon) kan niet kleiner dan -180 zijn', |
815 | | - 'slippymap_zoomsmall' => 'De zoom (z) kan niet minder dan nul zijn', |
816 | | - 'slippymap_zoom18' => 'De zoom (z) kan niet groter zijn dan 17. Merk op dat deze MediaWiki-uitbreiding de "Osmarender"-layer van OpenSteetMap gebruikt die niet dieper dan het niveau 17 gaat. de "Mapnik"-layer, beschikbaar op openstreetmap.org, gaat tot niveau 18.', |
817 | | - 'slippymap_zoombig' => 'De zoom (z) kan niet groter dan 17 zijn', |
818 | | - 'slippymap_invalidlayer' => 'Ongeldige waarde voor \'layer\' "%1"', |
819 | | - 'slippymap_maperror' => 'Kaartfout:', |
820 | | - 'slippymap_osmtext' => 'Deze kaart op OpenStreetMap.org bekijken', |
821 | | - 'slippymap_code' => 'Wikicode voor deze kaart:', |
822 | | - 'slippymap_button_code' => 'Wikicode', |
823 | | - 'slippymap_resetview' => 'Terug', |
824 | | - 'slippymap_invalidmode' => 'Ongeldige waarde "$1" voor "mode"', |
825 | | - 'slippymap_clicktoactivate' => 'Klik om de kaart te activeren', |
826 | | -); |
827 | | - |
828 | | -/** Norwegian Nynorsk (Norsk (nynorsk)) |
829 | | - * @author Harald Khan |
830 | | - */ |
831 | | -$messages['nn'] = array( |
832 | | - 'slippymap_desc' => 'Tillét bruk av merket <tt><slippymap></tt> for å syna eit «slippy map» frå OpenLayers. Karti kjem frå [http://openstreetmap.org openstreetmap.org]', |
833 | | - 'slippymap_latmissing' => 'Manglar «lat»-verdi (for breiddegrad).', |
834 | | - 'slippymap_lonmissing' => 'Manglar «lon»-verdi (for lengdegrad).', |
835 | | - 'slippymap_zoommissing' => 'Manglar «z»-verdi (for zoom-nivået).', |
836 | | - 'slippymap_longdepreciated' => 'Nytt «lon» i staden for «long» (parameteren fekk nytt namn).', |
837 | | - 'slippymap_widthnan' => 'breiddeverdien («w») «%1» er ikkje eit gyldig heiltal', |
838 | | - 'slippymap_heightnan' => 'høgdeverdien («h») «%1» er ikkje eit gyldig heiltal', |
839 | | - 'slippymap_zoomnan' => 'zoomverdien («z») «%1» er ikkje eit gyldig heiltal', |
840 | | - 'slippymap_latnan' => 'breiddegradsverdien («lat») «%1» er ikkje eit gyldig tal', |
841 | | - 'slippymap_lonnan' => 'lengdegradsverdien («lon») «%1» er ikkje eit gyldig tal', |
842 | | - 'slippymap_widthbig' => 'breiddeverdien («w») kan ikkje vera større enn 1000', |
843 | | - 'slippymap_widthsmall' => 'breiddeverdien («w») kan ikkje vera mindre enn 100', |
844 | | - 'slippymap_heightbig' => 'høgdeverdien («h») kan ikkje vera større enn 1000', |
845 | | - 'slippymap_heightsmall' => 'høgdeverdien («h») kan ikkje vera mindre enn 100', |
846 | | - 'slippymap_latbig' => 'breiddegraden («lat») kan ikkje vera større enn 90', |
847 | | - 'slippymap_latsmall' => 'breiddegraden («lat») kan ikkje vera mindre enn -90', |
848 | | - 'slippymap_lonbig' => 'lengdegraden («lon») kan ikkje vera større enn 180', |
849 | | - 'slippymap_lonsmall' => 'lengdegraden («lon») kan ikkje vera mindre enn -180', |
850 | | - 'slippymap_zoomsmall' => 'zoomverdien («z») kan ikkje vera mindre enn null', |
851 | | - 'slippymap_zoom18' => 'zoomverdien («z») kan ikkje vera større enn 17. Merk at denne MediaWiki-utvidingi nyttar OpenStreetMap-laget «osmarender», som ikkje kan zooma meir enn til nivå 17. «Mapnik»-laget på openstreetmap.org går til zoomnivå 18', |
852 | | - 'slippymap_zoombig' => 'zoomverdien («z») kan ikkje vera større enn 17.', |
853 | | - 'slippymap_invalidlayer' => 'Ugyldig «layer»-verdi «%1»', |
854 | | - 'slippymap_maperror' => 'Kartfeil:', |
855 | | - 'slippymap_osmtext' => 'Sjå dette kartet på OpenStreetMap.org', |
856 | | - 'slippymap_code' => 'Wikikode for denne kartvisingi:', |
857 | | - 'slippymap_button_code' => 'Hent wikikode', |
858 | | - 'slippymap_resetview' => 'Attendestill vising', |
859 | | -); |
860 | | - |
861 | | -/** Norwegian (bokmål) (Norsk (bokmål)) |
862 | | - * @author Harald Khan |
863 | | - * @author Jon Harald Søby |
864 | | - */ |
865 | | -$messages['no'] = array( |
866 | | - 'slippymap_desc' => 'Tillater bruk av taggen <tt><slippymap></tt> for å vise et «slippy map» fra OpenLayers. Kartene kommer fra [http://openstreetmap.org openstreetmap.org]', |
867 | | - 'slippymap_latmissing' => 'Mangler «lat»-verdi (for breddegraden).', |
868 | | - 'slippymap_lonmissing' => 'Mangler «lon»-verdi (for lengdegraden).', |
869 | | - 'slippymap_zoommissing' => 'Mangler «z»-verdi (for zoom-nivået).', |
870 | | - 'slippymap_longdepreciated' => 'Bruk «lon» i stedet for «long» (parameteret fikk nytt navn).', |
871 | | - 'slippymap_widthnan' => 'breddeverdien («w») «%1» er ikke et gyldig heltall', |
872 | | - 'slippymap_heightnan' => 'høydeverdien («h») «%1» er ikke et gyldig heltall', |
873 | | - 'slippymap_zoomnan' => 'zoomverdien («z») «%1» er ikke et gyldig heltall', |
874 | | - 'slippymap_latnan' => 'breddegradsverdien («lat») «%1» er ikke et gyldig tall', |
875 | | - 'slippymap_lonnan' => 'lengdegradsverdien («lon») «%1» er ikke et gyldig tall', |
876 | | - 'slippymap_widthbig' => 'breddeverdien («w») kan ikke være større enn 1000', |
877 | | - 'slippymap_widthsmall' => 'breddeverdien («w») kan ikke være mindre enn 100', |
878 | | - 'slippymap_heightbig' => 'høydeverdien («h») kan ikke være større enn 1000', |
879 | | - 'slippymap_heightsmall' => 'høydeverdien («h») kan ikke være mindre enn 100', |
880 | | - 'slippymap_latbig' => 'breddegradsverdien («lat») kan ikke være større enn 90', |
881 | | - 'slippymap_latsmall' => 'breddegradsverdien («lat») kan ikke være mindre enn –90', |
882 | | - 'slippymap_lonbig' => 'lengdegradsverdien («lon») kan ikke være større enn 180', |
883 | | - 'slippymap_lonsmall' => 'lengdegradsverdien («lon») kan ikke være mindre enn –180', |
884 | | - 'slippymap_zoomsmall' => 'zoomverdien («z») kan ikke være mindre enn null', |
885 | | - 'slippymap_zoom18' => 'zoomverdien («z») kan ikke være større enn 17. Merk at denne MediaWiki-utvidelsen bruker OpenStreetMap-laget «osmarender», som ikke kan zoome mer enn til nivå 17. «Mapnik»-laget på openstreetmap.org går til zoomnivå 18.', |
886 | | - 'slippymap_zoombig' => 'zoomverdien («z») kan ikke være større enn 17.', |
887 | | - 'slippymap_invalidlayer' => 'Ugyldig «layer»-verdi «%1»', |
888 | | - 'slippymap_maperror' => 'Kartfeil:', |
889 | | - 'slippymap_osmtext' => 'Se dette kartet på OpenStreetMap.org', |
890 | | - 'slippymap_code' => 'Wikikode for denne kartvisningen:', |
891 | | - 'slippymap_button_code' => 'Hent wikikode', |
892 | | - 'slippymap_resetview' => 'Tilbakestill visning', |
893 | | -); |
894 | | - |
895 | | -/** Occitan (Occitan) |
896 | | - * @author Cedric31 |
897 | | - */ |
898 | | -$messages['oc'] = array( |
899 | | - 'slippymap_desc' => 'Autoriza l’utilizacion de la balisa <tt><nowiki><slippymap></nowiki></tt> per afichar una mapa lisanta d’OpenLayers. Las mapas provenon de [http://openstreetmap.org openstreetmap.org]', |
900 | | - 'slippymap_latmissing' => 'Valor lat mancanta (per la latitud).', |
901 | | - 'slippymap_lonmissing' => 'Valor lon mancanta (per la longitud).', |
902 | | - 'slippymap_zoommissing' => 'Valor z mancanta (pel nivèl del zoom).', |
903 | | - 'slippymap_longdepreciated' => 'Utilizatz « lon » al luòc de « long » (lo paramètre es estat renomenat).', |
904 | | - 'slippymap_widthnan' => "La largor (w) qu'a per valor « %1 » es pas un nombre entièr corrèct.", |
905 | | - 'slippymap_heightnan' => "La nautor (h) qu'a per valor « %1 » es pas un nombre entièr corrèct.", |
906 | | - 'slippymap_zoomnan' => "Lo zoom (z) qu'a per valor « %1 » es pas un nombre entièr corrèct.", |
907 | | - 'slippymap_latnan' => "La latitud (lat) qu'a per valor « %1 » es pas un nombre corrèct.", |
908 | | - 'slippymap_lonnan' => "La longitud (lon) qu'a per valor « %1 » es pas un nombre corrèct.", |
909 | | - 'slippymap_widthbig' => 'La valor de la largor (w) pòt pas excedir 1000', |
910 | | - 'slippymap_widthsmall' => 'La valor de la largor (w) pòt pas èsser inferiora a 100', |
911 | | - 'slippymap_heightbig' => 'La valor de la nautor (h) pòt pas excedir 1000', |
912 | | - 'slippymap_heightsmall' => 'La valor de la nautor (h) pòt pas èsser inferiora a 100', |
913 | | - 'slippymap_latbig' => 'La valor de la latitud (lat) pòt pas excedir 90', |
914 | | - 'slippymap_latsmall' => 'La valor de la latitud (lat) pòt pas èsser inferiora a -90', |
915 | | - 'slippymap_lonbig' => 'La valor de la longitud (lon) pòt pas excedir 180', |
916 | | - 'slippymap_lonsmall' => 'La valor de la longitud (lon) pòt pas èsser inferiora a -180', |
917 | | - 'slippymap_zoomsmall' => 'La valor del zoom (z) pòt pas èsser negativa', |
918 | | - 'slippymap_zoom18' => "La valor del zoom (z) pòt excedir 17. Notatz qu'aqueste croquet d’extension MediaWiki dins lo jaç « osmarender » de OpenStreetMap pòt pas anar de delà del nivèl 17 del zoom. Lo jaç Mapnik disponible sus openstreetmap.org, pòt pas anar de delà del nivèl 18.", |
919 | | - 'slippymap_zoombig' => 'La valor del zoom (z) pòt pas excedir 17.', |
920 | | - 'slippymap_invalidlayer' => 'Valor de « %1 » del « jaç » incorrècta', |
921 | | - 'slippymap_maperror' => 'Error de mapa :', |
922 | | - 'slippymap_osmtext' => 'Vejatz aquesta mapa sus OpenStreetMap.org', |
923 | | - 'slippymap_code' => "Còde Wiki pel visionament d'aquesta mapa :", |
924 | | - 'slippymap_button_code' => 'Obténer lo còde wiki', |
925 | | - 'slippymap_resetview' => 'Tornar inicializar lo visionament', |
926 | | - 'slippymap_invalidmode' => 'Valor « $1 » de « mòde » invalida', |
927 | | - 'slippymap_clicktoactivate' => 'Clicatz per activar la mapa', |
928 | | -); |
929 | | - |
930 | | -/** Polish (Polski) |
931 | | - * @author Maikking |
932 | | - * @author Sp5uhe |
933 | | - */ |
934 | | -$messages['pl'] = array( |
935 | | - 'slippymap_desc' => 'Pozwala na korzystanie ze znacznika <tt><nowiki><slippymap></nowiki></tt> powodującego wyświetlenie ruchomej mapy OpenLayers. Mapy pochodzą z [http://openstreetmap.org openstreetmap.org]', |
936 | | - 'slippymap_latmissing' => 'Brakująca wartość „lat” (szerokość geograficzna).', |
937 | | - 'slippymap_lonmissing' => 'Brakująca wartość „lon” (długość geograficzna).', |
938 | | - 'slippymap_zoommissing' => 'Brakująca wartość „z” (stopień powiększenia).', |
939 | | - 'slippymap_longdepreciated' => 'Należy użyć „lon” zamiast „long” (nazwa parametru została zmieniona).', |
940 | | - 'slippymap_widthnan' => 'szerokość (w) wartość „$1” nie jest liczbą całkowitą', |
941 | | - 'slippymap_heightnan' => 'wysokość (h) wartość „$1” nie jest liczbą całkowitą', |
942 | | - 'slippymap_zoomnan' => 'stopień powiększenia (z) wartość „$1” nie jest liczbą całkowitą', |
943 | | - 'slippymap_latnan' => 'szerokość geograficzna (lat) wartość „$1” nie jest liczbą', |
944 | | - 'slippymap_lonnan' => 'długość geograficzna (lon) wartość „$1” nie jest liczbą', |
945 | | - 'slippymap_widthbig' => 'szerokość (w) nie może być większa niż 1000', |
946 | | - 'slippymap_widthsmall' => 'szerokość (w) nie może być mniejsza niż 100', |
947 | | - 'slippymap_heightbig' => 'wysokość (h) nie może być większa niż 1000', |
948 | | - 'slippymap_heightsmall' => 'wysokość (h) nie może być mniejsza niż 100', |
949 | | - 'slippymap_latbig' => 'szerokość geograficzna (lat) nie może być większa niż 90', |
950 | | - 'slippymap_latsmall' => 'szerokość geograficzna (lat) nie może być mniejsza niż -90', |
951 | | - 'slippymap_lonbig' => 'długość geograficzna (lon) nie może być większa niż 180', |
952 | | - 'slippymap_lonsmall' => 'długość geograficzna (lon) nie może być mniejsza niż -180', |
953 | | - 'slippymap_zoomsmall' => 'stopień powiększenia (z) nie może być niższy niż zero', |
954 | | - 'slippymap_zoom18' => 'stopień powiększenia (z) nie może być wyższy niż 17. To rozszerzenie MediaWiki działa w OpenStreetMap w warstwie „osmarender”, która nie wykracza poza stopień powiększenia 17. W warstwie „Mapnik” dostępnej na openstreetmap.org, można uzyskać powiększenie 18', |
955 | | - 'slippymap_zoombig' => 'stopień powiększenia (z) nie może być wyższy niż 17.', |
956 | | - 'slippymap_invalidlayer' => 'Nieprawidłowa warstwa „leyer” „%1”', |
957 | | - 'slippymap_maperror' => 'Błąd mapy:', |
958 | | - 'slippymap_osmtext' => 'Zobacz tę mapę na OpenStreetMap.org', |
959 | | - 'slippymap_code' => 'Kod wiki dla tego widoku mapy:', |
960 | | - 'slippymap_button_code' => 'Pobierz kod wiki', |
961 | | - 'slippymap_resetview' => 'Zresetuj widok', |
962 | | -); |
963 | | - |
964 | | -/** Portuguese (Português) |
965 | | - * @author Lijealso |
966 | | - * @author Malafaya |
967 | | - * @author Waldir |
968 | | - */ |
969 | | -$messages['pt'] = array( |
970 | | - 'slippymap_desc' => 'Permite o uso da marca <tt><nowiki><slippymap></nowiki></tt> para apresentar um mapa corrediço OpenLayers. Os mapas provêm de [http://openstreetmap.org openstreetmap.org]', |
971 | | - 'slippymap_latmissing' => 'Faltando o valor lat (para a latitude).', |
972 | | - 'slippymap_lonmissing' => 'Faltando o valor lon (para a longitude).', |
973 | | - 'slippymap_zoommissing' => 'Falta valor z (para o nível de zoom).', |
974 | | - 'slippymap_longdepreciated' => "Por favor, use 'lon' em vez de 'long' (o parâmetro foi renomeado).", |
975 | | - 'slippymap_widthnan' => "o valor de largura (w) '%1' não é um inteiro válido", |
976 | | - 'slippymap_heightnan' => "o valor de altura (h) '%1' não é um inteiro válido", |
977 | | - 'slippymap_zoomnan' => "o valor de zoom (z) '%1' não é um inteiro válido", |
978 | | - 'slippymap_latnan' => "o valor de latitude (lat) '%1' não é um inteiro válido", |
979 | | - 'slippymap_lonnan' => "o valor de longitude (lon) '%1' não é um inteiro válido", |
980 | | - 'slippymap_widthbig' => 'o valor da largura (w) não pode ser maior que 1000', |
981 | | - 'slippymap_widthsmall' => 'o valor da largura (w) não pode ser menor que 100', |
982 | | - 'slippymap_heightbig' => 'o valor da altura (h) não pode ser maior que 1000', |
983 | | - 'slippymap_heightsmall' => 'o valor da altura (h) não pode ser menor que 100', |
984 | | - 'slippymap_latbig' => 'o valor da latitude (lat) não pode ser maior que 90', |
985 | | - 'slippymap_latsmall' => 'o valor da latitude (lat) não pode ser menor que -90', |
986 | | - 'slippymap_lonbig' => 'o valor da longitude (lon) não pode ser maior que 180', |
987 | | - 'slippymap_lonsmall' => 'o valor da longitude (lon) não pode ser menor que -180', |
988 | | - 'slippymap_zoomsmall' => 'o valor do zoom (z) não pode ser menor que zero', |
989 | | - 'slippymap_zoom18' => 'o valor do zoom (z) não pode ser maior de 17. Note que esta extensão MediaWiki liga-se ao visualizador "osmarender" do OpenStreetMap cujo valor de zoom não ultrapassa o nível 17. O visualizador Mapnik disponível no openstreetmap.org, vai até o nivel 18', |
990 | | - 'slippymap_zoombig' => 'O valor de zoom (z) não pode ser maior que 17.', |
991 | | - 'slippymap_invalidlayer' => "Valor '%1' inválido para 'layer'", |
992 | | - 'slippymap_maperror' => 'Erro no mapa:', |
993 | | - 'slippymap_osmtext' => 'Veja este mapa em OpenStreetMap.org', |
994 | | - 'slippymap_code' => 'Código wiki para esta vista do mapa:', |
995 | | - 'slippymap_button_code' => 'Buscar código wiki', |
996 | | - 'slippymap_resetview' => 'Repor vista', |
997 | | -); |
998 | | - |
999 | | -/** Brazilian Portuguese (Português do Brasil) |
1000 | | - * @author Eduardo.mps |
1001 | | - */ |
1002 | | -$messages['pt-br'] = array( |
1003 | | - 'slippymap_desc' => 'Permite o uso da marca <tt><nowiki><slippymap></nowiki></tt> para apresentar um mapa corrediço OpenLayers. Os mapas provêm de [http://openstreetmap.org openstreetmap.org]', |
1004 | | - 'slippymap_latmissing' => 'Faltando o valor lat (para a latitude).', |
1005 | | - 'slippymap_lonmissing' => 'Faltando o valor lon (para a longitude).', |
1006 | | - 'slippymap_zoommissing' => 'Falta valor z (para o nível de zoom).', |
1007 | | - 'slippymap_longdepreciated' => "Por favor, use 'lon' em vez de 'long' (o parâmetro foi renomeado).", |
1008 | | - 'slippymap_widthnan' => "o valor de largura (w) '%1' não é um inteiro válido", |
1009 | | - 'slippymap_heightnan' => "o valor de altura (h) '%1' não é um inteiro válido", |
1010 | | - 'slippymap_zoomnan' => "o valor de zoom (z) '%1' não é um inteiro válido", |
1011 | | - 'slippymap_latnan' => "o valor de latitude (lat) '%1' não é um número válido", |
1012 | | - 'slippymap_lonnan' => "o valor de longitude (lon) '%1' não é um número válido", |
1013 | | - 'slippymap_widthbig' => 'o valor da largura (w) não pode ser maior que 1000', |
1014 | | - 'slippymap_widthsmall' => 'o valor da largura (w) não pode ser menor que 100', |
1015 | | - 'slippymap_heightbig' => 'o valor da altura (h) não pode ser maior que 1000', |
1016 | | - 'slippymap_heightsmall' => 'o valor da altura (h) não pode ser menor que 100', |
1017 | | - 'slippymap_latbig' => 'o valor da latitude (lat) não pode ser maior que 90', |
1018 | | - 'slippymap_latsmall' => 'o valor da latitude (lat) não pode ser menor que -90', |
1019 | | - 'slippymap_lonbig' => 'o valor da longitude (lon) não pode ser maior que 180', |
1020 | | - 'slippymap_lonsmall' => 'o valor da longitude (lon) não pode ser menor que -180', |
1021 | | - 'slippymap_zoomsmall' => 'o valor do zoom (z) não pode ser menor que zero', |
1022 | | - 'slippymap_zoom18' => 'o valor do zoom (z) não pode ser maior que 17. Note que esta extensão MediaWiki liga-se ao visualizador "osmarender" do OpenStreetMap cujo valor de zoom não ultrapassa o nível 17. O visualizador Mapnik disponível no openstreetmap.org, vai até o nivel 18', |
1023 | | - 'slippymap_zoombig' => 'O valor de zoom (z) não pode ser maior que 17.', |
1024 | | - 'slippymap_invalidlayer' => "Valor '%1' inválido para 'layer'", |
1025 | | - 'slippymap_maperror' => 'Erro no mapa:', |
1026 | | - 'slippymap_osmtext' => 'Veja este mapa em OpenStreetMap.org', |
1027 | | - 'slippymap_code' => 'Código wiki para esta vista do mapa:', |
1028 | | - 'slippymap_button_code' => 'Buscar código wiki', |
1029 | | - 'slippymap_resetview' => 'Reiniciar vista', |
1030 | | -); |
1031 | | - |
1032 | | -/** Romanian (Română) |
1033 | | - * @author KlaudiuMihaila |
1034 | | - */ |
1035 | | -$messages['ro'] = array( |
1036 | | - 'slippymap_latmissing' => 'Valoarea lat lipsă (pentru latitudine).', |
1037 | | - 'slippymap_lonmissing' => 'Valoarea lon lipsă (pentru longitudine).', |
1038 | | -); |
1039 | | - |
1040 | | -/** Russian (Русский) |
1041 | | - * @author Ferrer |
1042 | | - * @author Александр Сигачёв |
1043 | | - */ |
1044 | | -$messages['ru'] = array( |
1045 | | - 'slippymap_desc' => 'Позволяет использовать тег <tt><nowiki><slippymap></nowiki></tt> для отображения карт OpenLayers. Карты с [http://openstreetmap.org openstreetmap.org]', |
1046 | | - 'slippymap_latmissing' => 'Отсутствует значение lat (для широты).', |
1047 | | - 'slippymap_lonmissing' => 'отсутствует значение lon (для долготы).', |
1048 | | - 'slippymap_zoommissing' => 'Отсутствует значение z (для масштаба).', |
1049 | | - 'slippymap_longdepreciated' => 'Пожалуйста, используйте «lon» вместо «long» (параметр переименован).', |
1050 | | - 'slippymap_widthnan' => 'значение ширины (width, w) «%1» не является целым числом', |
1051 | | - 'slippymap_heightnan' => 'значение высоты (height, h) «%1» не является целым числом', |
1052 | | - 'slippymap_zoomnan' => 'значение масштаб (zoom, z) «%1» не является целым числом', |
1053 | | - 'slippymap_latnan' => 'значение широты (latitude, lat) «%1» не является целым числом', |
1054 | | - 'slippymap_lonnan' => 'значение долготы (longitude, lon) «%1» не является целым числом', |
1055 | | - 'slippymap_widthbig' => 'значение ширины (width, w) не может быть больше 1000', |
1056 | | - 'slippymap_widthsmall' => 'значение ширины (width, w) не может быть меньше 100', |
1057 | | - 'slippymap_heightbig' => 'значение высоты (height, h) не может быть больше 1000', |
1058 | | - 'slippymap_heightsmall' => 'значение высоты (height, h) не может быть меньше 100', |
1059 | | - 'slippymap_latbig' => 'значение широты (latitude, lat) не может быть больше 90', |
1060 | | - 'slippymap_latsmall' => 'значение широты (latitude, lat) не может быть меньше -90', |
1061 | | - 'slippymap_lonbig' => 'значение долготы (longitude, lon) не может быть больше 180', |
1062 | | - 'slippymap_lonsmall' => 'значение долготы (longitude, lon) не может быть меньше -180', |
1063 | | - 'slippymap_zoomsmall' => 'значение масштаба (zoom, z) не может быть меньше 0', |
1064 | | - 'slippymap_zoom18' => "значение масштаба (zoom, z) не может быть больше 17. Заметьте, что этот перехватчик расширения MediaWiki внедряется в слой OpenStreetMap 'osmarender', который не выходит за уровень масштабирования 17. Слой Mapnik, доступный на on openstreetmap.org, доходит до масштаба 18.", |
1065 | | - 'slippymap_zoombig' => 'значение масштаба (zoom, z) не может быть больше 17.', |
1066 | | - 'slippymap_invalidlayer' => 'Неверное значение «%1» для «layer»', |
1067 | | - 'slippymap_maperror' => 'Ошибка карты:', |
1068 | | - 'slippymap_osmtext' => 'Просмотр карты на OpenStreetMap.org', |
1069 | | - 'slippymap_code' => 'Викикод для просмотра этой карты:', |
1070 | | - 'slippymap_button_code' => 'Получить викикод', |
1071 | | - 'slippymap_resetview' => 'Сбросить просмотр', |
1072 | | - 'slippymap_invalidmode' => 'Неправильное значение «mode» (режим) «$1»', |
1073 | | - 'slippymap_clicktoactivate' => 'Нажмите, чтобы активировать карту', |
1074 | | -); |
1075 | | - |
1076 | | -/** Slovak (Slovenčina) |
1077 | | - * @author Helix84 |
1078 | | - */ |
1079 | | -$messages['sk'] = array( |
1080 | | - 'slippymap_desc' => 'Umožňuje použitie značky <tt><nowiki><slippymap></nowiki></tt> na zobrazenie posuvnej mapy OpenLayers. Mapy sú z [http://openstreetmap.org openstreetmap.org]', |
1081 | | - 'slippymap_latmissing' => 'Chýba hodnota lat (rovnobežka).', |
1082 | | - 'slippymap_lonmissing' => 'Chýba hodnota lon (poludník).', |
1083 | | - 'slippymap_zoommissing' => 'Chýba hodnota z (úroveň priblíženia)', |
1084 | | - 'slippymap_longdepreciated' => 'Prosím, použite „lon” namiesto „long” (názov parametra sa zmenil).', |
1085 | | - 'slippymap_widthnan' => 'hodnota šírky (w) „%1” nie je platné celé číslo', |
1086 | | - 'slippymap_heightnan' => 'hodnota výšky (h) „%1” nie je platné celé číslo', |
1087 | | - 'slippymap_zoomnan' => 'hodnota úrovne priblíženia (z) „%1” nie je platné celé číslo', |
1088 | | - 'slippymap_latnan' => 'hodnota zemepisnej šírky (lat) „%1” nie je platné celé číslo', |
1089 | | - 'slippymap_lonnan' => 'hodnota zemepisnej dĺžky (lon) „%1” nie je platné celé číslo', |
1090 | | - 'slippymap_widthbig' => 'hodnota šírky (w) nemôže byť väčšia ako 1000', |
1091 | | - 'slippymap_widthsmall' => 'hodnota šírky (w) nemôže byť menšia ako 100', |
1092 | | - 'slippymap_heightbig' => 'hodnota výšky (h) nemôže byť väčšia ako 1000', |
1093 | | - 'slippymap_heightsmall' => 'hodnota výšky (h) nemôže byť menšia ako 100', |
1094 | | - 'slippymap_latbig' => 'hodnota zemepisnej dĺžky (h) nemôže byť väčšia ako 90', |
1095 | | - 'slippymap_latsmall' => 'hodnota zemepisnej dĺžky (h) nemôže byť menšia ako -90', |
1096 | | - 'slippymap_lonbig' => 'hodnota zemepisnej šírky (lon) nemôže byť väčšia ako 180', |
1097 | | - 'slippymap_lonsmall' => 'hodnota zemepisnej dĺžky (lon) nemôže byť menšia ako -180', |
1098 | | - 'slippymap_zoomsmall' => 'hodnota úrovne priblíženia (lon) nemôže byť menšia ako nula', |
1099 | | - 'slippymap_zoom18' => 'hodnota úrovne priblíženia (lon) nemôže byť väčšia ako 17. Toto rozšírenie MediaWiki využíva vrstvu „osmarender” OpenStreetMap, ktorá umožňuje úroveň priblíženia po 17. Vrstva Mapnik na openstreetmap.org umožňuje priblíženie do úrovne 18.', |
1100 | | - 'slippymap_zoombig' => 'hodnota úrovne priblíženia (lon) nemôže byť väčšia ako 17.', |
1101 | | - 'slippymap_invalidlayer' => 'Neplatná hodnota „layer” „%1”', |
1102 | | - 'slippymap_maperror' => 'Chyba mapy:', |
1103 | | - 'slippymap_osmtext' => 'Pozrite si túto mapu na OpenStreetMap.org', |
1104 | | - 'slippymap_code' => 'Wikikód tohto pohľadu na mapu:', |
1105 | | - 'slippymap_button_code' => 'Zobraziť zdrojový kód', |
1106 | | - 'slippymap_resetview' => 'Obnoviť zobrazenie', |
1107 | | - 'slippymap_invalidmode' => 'Neplatná hodnota „mode“ „$1“', |
1108 | | - 'slippymap_clicktoactivate' => 'Mapu aktivujete kliknutím', |
1109 | | -); |
1110 | | - |
1111 | | -/** Serbian Cyrillic ekavian (ћирилица) |
1112 | | - * @author Михајло Анђелковић |
1113 | | - */ |
1114 | | -$messages['sr-ec'] = array( |
1115 | | - 'slippymap_latmissing' => 'Недостаје lat вредност (за латитуду).', |
1116 | | - 'slippymap_lonmissing' => 'Недостаје lon вредност (за лонгитуду)', |
1117 | | - 'slippymap_zoommissing' => 'Недостаје z вредост (за ниво увећања).', |
1118 | | - 'slippymap_longdepreciated' => "Молимо вас да користите 'lon' уместо 'long' (параметар је био преименован).", |
1119 | | - 'slippymap_widthnan' => "задата вредност '%1' ширине (w) није исправна целобројна вредност", |
1120 | | - 'slippymap_heightnan' => "задата вредност '%1' висине (h) није исправна целобројна вредност", |
1121 | | - 'slippymap_zoomnan' => "задата вредност '%1' увећања (z) није исправна целобројна вредност", |
1122 | | - 'slippymap_latnan' => "задата вредност '%1' латитуде (lat) није исправан број", |
1123 | | - 'slippymap_lonnan' => "задата вредност '%1' лонгитуде (lon) није исправан број", |
1124 | | - 'slippymap_widthbig' => 'Ширина (w) не може бити већа од 1000', |
1125 | | - 'slippymap_widthsmall' => 'ширина (w) не може бити мања од 100', |
1126 | | - 'slippymap_heightbig' => 'висина (h) не може бити већа од 1000', |
1127 | | - 'slippymap_heightsmall' => 'Висина (h) не може бити мања од 100', |
1128 | | - 'slippymap_latbig' => 'вредност латитуде (lat) не може бити већа од 90', |
1129 | | - 'slippymap_latsmall' => 'Вредност латитуде (lat) не може бити мања од -90', |
1130 | | - 'slippymap_lonbig' => 'вредност лонгитуде (lon) не може бити већа од 180', |
1131 | | - 'slippymap_lonsmall' => 'вредност лонгитуде (lon) не може бити мања од -180', |
1132 | | - 'slippymap_zoomsmall' => 'вредност увећања (z) не може бити мања од нуле', |
1133 | | - 'slippymap_zoombig' => 'вредност увећања (z) не може бити већа од 18.', |
1134 | | - 'slippymap_osmtext' => 'Погледај ову мапу на OpenStreetMap.org', |
1135 | | -); |
1136 | | - |
1137 | | -/** Swedish (Svenska) |
1138 | | - * @author Boivie |
1139 | | - * @author M.M.S. |
1140 | | - */ |
1141 | | -$messages['sv'] = array( |
1142 | | - 'slippymap_desc' => 'Tillåter användning av taggen <tt><slippymap></tt> för att visa "slippy map" från OpenLayers. Kartorna kommer från [http://openstreetmap.org openstreetmap.org]', |
1143 | | - 'slippymap_latmissing' => 'Saknat "lat"-värde (för breddgraden).', |
1144 | | - 'slippymap_lonmissing' => 'Saknat "lon"-värde (för längdgraden).', |
1145 | | - 'slippymap_zoommissing' => 'Saknat z-värde (för zoom-nivån).', |
1146 | | - 'slippymap_longdepreciated' => 'Var god använd "lon" istället för "long" (parametern fick ett nytt namn).', |
1147 | | - 'slippymap_widthnan' => 'breddvärdet (w) "%1" är inte ett giltigt heltal', |
1148 | | - 'slippymap_heightnan' => 'höjdvärdet (h) "%1" är inte ett giltigt heltal', |
1149 | | - 'slippymap_zoomnan' => 'zoomvärdet (z) "%1" är inte ett giltigt heltal', |
1150 | | - 'slippymap_latnan' => 'breddgradsvärdet (lat) "%1" är inte ett giltigt nummer', |
1151 | | - 'slippymap_lonnan' => 'längdgradsvärdet (lon) "%1" är inte ett giltigt nummer', |
1152 | | - 'slippymap_widthbig' => 'breddvärdet (w) kan inte vara större än 1000', |
1153 | | - 'slippymap_widthsmall' => 'breddvärdet (w) kan inte vara mindre än 100', |
1154 | | - 'slippymap_heightbig' => 'höjdvärdet (h) kan inte vara större än 1000', |
1155 | | - 'slippymap_heightsmall' => 'höjdvärdet (h) kan inte vara mindre än 100', |
1156 | | - 'slippymap_latbig' => 'breddgradsvärdet (lat) kan inte vara större än 90', |
1157 | | - 'slippymap_latsmall' => 'breddgradsvärdet (lat) kan inte vara mindre än -90', |
1158 | | - 'slippymap_lonbig' => 'längdgradsvärdet (lon) kan inte vara större än 180', |
1159 | | - 'slippymap_lonsmall' => 'längdgradsvärdet (lon) kan inte vara mindre än -180', |
1160 | | - 'slippymap_zoomsmall' => 'zoomvärdet (z) kan inte vara mindre än noll', |
1161 | | - 'slippymap_zoom18' => "zoomvärdet (z) kan inte vara högre än 17. Observera att detta programtillägg använder OpenStreetMap-lagret 'osmarender', som inte kan zoomas mer än till nivå 17. Mapnik-lagret på openstreetmap.org zoomar till nivå 18", |
1162 | | - 'slippymap_zoombig' => 'zoomvärdet (z) kan inte vara högre än 17.', |
1163 | | - 'slippymap_invalidlayer' => "Ogiltigt 'layer'-värde '%1'", |
1164 | | - 'slippymap_maperror' => 'Kartfel:', |
1165 | | - 'slippymap_osmtext' => 'Se den här kartan på OpenStreetMap.org', |
1166 | | - 'slippymap_code' => 'Wikikod för denna kartvisning:', |
1167 | | - 'slippymap_button_code' => 'Hämta wikikod', |
1168 | | - 'slippymap_resetview' => 'Återställ visning', |
1169 | | -); |
1170 | | - |
1171 | | -/** Telugu (తెలుగు) |
1172 | | - * @author Veeven |
1173 | | - */ |
1174 | | -$messages['te'] = array( |
1175 | | - 'slippymap_maperror' => 'పటపు పొరపాటు:', |
1176 | | -); |
1177 | | - |
1178 | | -/** Tagalog (Tagalog) |
1179 | | - * @author AnakngAraw |
1180 | | - */ |
1181 | | -$messages['tl'] = array( |
1182 | | - 'slippymap_desc' => "Nagpapahintulot sa paggamit ng tatak na <tt><nowiki><slippymap></nowiki></tt> upang maipakita/mapalitaw ang isang pampuwesto/pangkinaroroonang (''slippy'') mapa ng OpenLayers. Nanggaling ang mga mapa mula sa [http://openstreetmap.org openstreetmap.org]", |
1183 | | - 'slippymap_latmissing' => 'Nawawalang halaga para sa latitud (lat).', |
1184 | | - 'slippymap_lonmissing' => 'Nawawalang halaga para sa longhitud (lon).', |
1185 | | - 'slippymap_zoommissing' => "Nawawalang halagang 't' (mula sa 'tutok') para sa antas ng paglapit/pagtutok (''zoom'').", |
1186 | | - 'slippymap_longdepreciated' => "Pakigamit lamang ang 'lon' sa halip na 'long' (muling pinangalanan ang parametro).", |
1187 | | - 'slippymap_widthnan' => "ang halaga ng lapad (l) na '%1' ay hindi isang tanggap na buumbilang (''integer'')", |
1188 | | - 'slippymap_heightnan' => "ang halaga ng taas (t) na '%1' ay hindi isang tanggap na buumbilang (''integer'')", |
1189 | | - 'slippymap_zoomnan' => "ang halaga ng pagtutok/paglapit ('t' mula sa 'tutok' o ''zoom'') na '%1' ay hindi isang tanggap na buumbilang (''integer'')", |
1190 | | - 'slippymap_latnan' => "ang halaga ng latitud (lat) na '%1' ay hindi isang tanggap na buumbilang (''integer'')", |
1191 | | - 'slippymap_lonnan' => "ang halaga ng longhitud (lon) na '%1' ay hindi isang tanggap na buumbilang (''integer'')", |
1192 | | - 'slippymap_widthbig' => 'hindi maaaring humigit/lumabis kaysa 1000 ang halaga ng lapad (l)', |
1193 | | - 'slippymap_widthsmall' => 'hindi maaaring bumaba kaysa 1000 ang halaga ng lapad (l)', |
1194 | | - 'slippymap_heightbig' => 'hindi maaaring humigit/lumabis kaysa 1000 ang halaga ng taas (t)', |
1195 | | - 'slippymap_heightsmall' => 'hindi maaaring bumaba kaysa 1000 ang halaga ng taas (t)', |
1196 | | - 'slippymap_latbig' => 'hindi maaaring humigit/lumabis kaysa 90 ang halaga ng latitud (lat)', |
1197 | | - 'slippymap_latsmall' => 'hindi maaaring bumaba kaysa -90 ang halaga ng latitud (lat)', |
1198 | | - 'slippymap_lonbig' => 'hindi maaaring humigit/lumabis kaysa 180 ang halaga ng longhitud (lon)', |
1199 | | - 'slippymap_lonsmall' => 'hindi maaaring bumaba kaysa -180 ang halaga ng longhitud (lon)', |
1200 | | - 'slippymap_zoomsmall' => "hindi maaaring bumaba kaysa wala/sero ang halaga ng pagtutok/paglapit ('t' mula sa 'tutok') o ''zoom''.", |
1201 | | - 'slippymap_zoom18' => "hindi maaaring humigit/lumabis kaysa 17 ang halaga ng pagtutok/paglapit ('t' mula sa 'tutok') o ''zoom''. Tandaan lamang na ang mga karugtong na ito na pang-Mediawiki ay kumakawing/kumakabit patungo sa sapin/patong na 'osmarender' ng OpenStreetMap na hindi lumalagpas mula sa kaantasan ng pagkakatutok na 17. Ang sapin/patong na Mapnik na makukuha mula sa openstreetmap.org ay umaabot pataas sa kaantasan ng pagkakatutok na 18", |
1202 | | - 'slippymap_zoombig' => "hindi maaaring humigit/lumabis kaysa 17 ang halaga ng pagtutok/paglapit ('t' mula sa 'tutok') o ''zoom''.", |
1203 | | - 'slippymap_invalidlayer' => "Hindi tanggap ang halaga ng 'patong' o 'sapin' na '%1'", |
1204 | | - 'slippymap_maperror' => 'Kamalian sa mapa:', |
1205 | | - 'slippymap_osmtext' => 'Tingnan ang mapang ito sa OpenStreetMap.org', |
1206 | | - 'slippymap_code' => 'Kodigo ng wiki ("wiki-kodigo") para sa tanawin ng mapang ito:', |
1207 | | - 'slippymap_button_code' => 'Kuhanin ang kodigo ng wiki', |
1208 | | - 'slippymap_resetview' => 'Muling itakda ang tanawin', |
1209 | | -); |
1210 | | - |
1211 | | -/** Vietnamese (Tiếng Việt) |
1212 | | - * @author Minh Nguyen |
1213 | | - */ |
1214 | | -$messages['vi'] = array( |
1215 | | - 'slippymap_desc' => 'Thêm thẻ <tt><nowiki><slippymap></nowiki></tt> để nhúng bản đồ trơn OpenLayers. Các bản đồ do [http://openstreetmap.org openstreetmap.org] cung cấp.', |
1216 | | - 'slippymap_latmissing' => 'Thiếu giá trị lat (vĩ độ).', |
1217 | | - 'slippymap_lonmissing' => 'Thiếu giá trị lon (kinh độ).', |
1218 | | - 'slippymap_zoommissing' => 'Thiếu giá trị z (cấp thu phóng).', |
1219 | | - 'slippymap_longdepreciated' => 'Xin hãy dùng “lon” thay vì “long” (tham số đã được đổi tên).', |
1220 | | - 'slippymap_widthnan' => 'giá trị chiều rộng (w), “%1”, không phải là nguyên số hợp lệ', |
1221 | | - 'slippymap_heightnan' => 'giá trị chiều cao (h), “%1”, không phải là nguyên số hợp lệ', |
1222 | | - 'slippymap_zoomnan' => 'giá trị cấp thu phóng (z), “%1”, không phải là nguyên số hợp lệ', |
1223 | | - 'slippymap_latnan' => 'giá trị vĩ độ (lat), “%1”, không phải là số hợp lệ', |
1224 | | - 'slippymap_lonnan' => 'giá trị kinh độ (lon), “%1”, không phải là số hợp lệ', |
1225 | | - 'slippymap_widthbig' => 'giá trị chiều rộng (w) tối đa là “1000”', |
1226 | | - 'slippymap_widthsmall' => 'giá trị chiều rộng (w) tối thiểu là “100”', |
1227 | | - 'slippymap_heightbig' => 'giá trị chiều cao (h) tối đa là “1000”', |
1228 | | - 'slippymap_heightsmall' => 'giá trị chiều cao (h) tối thiểu là “100”', |
1229 | | - 'slippymap_latbig' => 'giá trị vĩ độ (lat) tối đa là “90”', |
1230 | | - 'slippymap_latsmall' => 'giá trị vĩ độ (lat) tối thiểu là “-90”', |
1231 | | - 'slippymap_lonbig' => 'giá trị kinh độ (lon) tối đa là “180”', |
1232 | | - 'slippymap_lonsmall' => 'giá trị kinh độ (lon) tối thiểu là “-180”', |
1233 | | - 'slippymap_zoomsmall' => 'giá trị cấp thu phóng tối thiểu là “0”', |
1234 | | - 'slippymap_zoom18' => 'giá trị cấp thu phóng (z) tối đa là 17. Lưu ý rằng phần mở rộng MediaWiki này dựa trên lớp “osmarender” của OpenStreetMap, nó không vẽ rõ hơn cấp 17. Lớp Mapnik tại openstreetmap.org tới được cấp 18.', |
1235 | | - 'slippymap_zoombig' => 'giá trị cấp thu phóng (z) tối đa là 17.', |
1236 | | - 'slippymap_invalidlayer' => 'Giá trị “layer” không hợp lệ: “%1”.', |
1237 | | - 'slippymap_maperror' => 'Lỗi trong bản đồ:', |
1238 | | - 'slippymap_osmtext' => 'Xem bản đồ này tại OpenStreetMap.org', |
1239 | | - 'slippymap_code' => 'Mã wiki để nhúng phần bản đồ này:', |
1240 | | - 'slippymap_button_code' => 'Xem mã wiki', |
1241 | | - 'slippymap_resetview' => 'Mặc định lại bản đồ', |
1242 | | - 'slippymap_invalidmode' => 'Giá trị “mode” không hợp lệ: “$1”', |
1243 | | - 'slippymap_clicktoactivate' => 'Nhấn để khởi động bản đồ', |
1244 | | -); |
1245 | | - |
1246 | | -/** Volapük (Volapük) |
1247 | | - * @author Smeira |
1248 | | - */ |
1249 | | -$messages['vo'] = array( |
1250 | | - 'slippymap_maperror' => 'Mapapöl:', |
1251 | | -); |
1252 | | - |
1253 | | -/** Simplified Chinese (中文(简体)) |
1254 | | - * @author Gzdavidwong |
1255 | | - */ |
1256 | | -$messages['zh-hans'] = array( |
1257 | | - 'slippymap_widthbig' => '宽度值(w)不能大于1000', |
1258 | | - 'slippymap_widthsmall' => '宽度值(w)不能小于100', |
1259 | | - 'slippymap_heightbig' => '高度值(h)不能大于1000', |
1260 | | - 'slippymap_heightsmall' => '高度值(h)不能小于100', |
1261 | | - 'slippymap_latbig' => '纬度值(lat)不能大于90', |
1262 | | - 'slippymap_latsmall' => '纬度值(lat)不能小于-90', |
1263 | | - 'slippymap_lonbig' => '经度值(lon)不能大于180', |
1264 | | - 'slippymap_lonsmall' => '经度值(lon)不能小于-180', |
1265 | | -); |
1266 | | - |
1267 | | -/** Traditional Chinese (中文(繁體)) |
1268 | | - * @author Gzdavidwong |
1269 | | - * @author Wrightbus |
1270 | | - */ |
1271 | | -$messages['zh-hant'] = array( |
1272 | | - 'slippymap_widthbig' => '寬度值(w)不能大於1000', |
1273 | | - 'slippymap_widthsmall' => '寬度值(w)不能小於100', |
1274 | | - 'slippymap_heightbig' => '高度值(h)不能大於1000', |
1275 | | - 'slippymap_heightsmall' => '高度值(h)不能少於100', |
1276 | | - 'slippymap_latbig' => '緯度值(lat)不能大於90', |
1277 | | - 'slippymap_latsmall' => '緯度值(lat)不能小於-90', |
1278 | | - 'slippymap_lonbig' => '經度值(lon)不能大於180', |
1279 | | - 'slippymap_lonsmall' => '經度值(lon)不能小於-180', |
1280 | | -); |
1281 | | - |
Index: trunk/extensions/SlippyMap/SlippyMap.php |
— | — | @@ -23,18 +23,12 @@ |
24 | 24 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
25 | 25 | */ |
26 | 26 | |
27 | | -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
28 | | - $wgHooks['ParserFirstCallInit'][] = 'SlippyMapHooks::onParserFirstCallInit'; |
29 | | -} else { |
30 | | - $wgExtensionFunctions[] = 'SlippyMapHooks::onParserFirstCallInit'; |
31 | | -} |
32 | | - |
33 | 27 | $wgExtensionCredits['parserhook'][] = array( |
34 | 28 | 'path' => __FILE__, |
35 | 29 | 'name' => 'Slippy Map', |
36 | 30 | 'author' => array('[http://harrywood.co.uk Harry Wood]', 'Jens Frank', 'Aude', 'Ævar Arnfjörð Bjarmason'), |
37 | 31 | 'url' => 'http://www.mediawiki.org/wiki/Extension:SlippyMap', |
38 | | - 'description' => 'Adds a <slippymap> which allows for embedding of static & dynamic maps.Supports multiple map services including [http://openstreetmap.org OpenStreetMap] and NASA Worldwind', |
| 32 | + 'description' => 'Adds a <tt><slippymap></tt> tag which allows for embedding of static & dynamic maps.Supports multiple map services including [http://openstreetmap.org OpenStreetMap] and NASA Worldwind', |
39 | 33 | 'descriptionmsg' => 'slippymap_desc', |
40 | 34 | ); |
41 | 35 | |
— | — | @@ -45,23 +39,81 @@ |
46 | 40 | $wgExtensionMessagesFiles['SlippyMap'] = $dir . 'SlippyMap.i18n.php'; |
47 | 41 | |
48 | 42 | /* The classes which make up our extension*/ |
49 | | -$wgAutoloadClasses['SlippyMapHooks'] = $dir . 'SlippyMap.hooks.php'; |
50 | | -$wgAutoloadClasses['SlippyMap'] = $dir . 'SlippyMap.class.php'; |
51 | | -$wgAutoloadClasses['WorldWind'] = $dir . 'SlippyMap.worldwind.php'; |
| 43 | +$wgAutoloadClasses['SlippyMapHook'] = $dir . 'SlippyMap.hooks.php'; |
| 44 | +$wgAutoloadClasses['SlippyMap'] = $dir . 'SlippyMap.class.php'; |
| 45 | +$wgAutoloadClasses['SlippyMapExportCgiBin'] = $dir . 'SlippyMapExportCgiBin.class.php'; |
| 46 | +$wgAutoloadClasses['WorldWind'] = $dir . 'SlippyMap.worldwind.php'; |
52 | 47 | |
53 | 48 | /* Parser tests */ |
54 | 49 | $wgParserTestFiles[] = $dir . '/slippyMapParserTests.txt'; |
55 | 50 | |
| 51 | +/* Parser hook */ |
| 52 | +if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
| 53 | + $wgHooks['ParserFirstCallInit'][] = 'wfSlippyMapHook'; |
| 54 | +} else { |
| 55 | + // Legacy support |
| 56 | + $wgExtensionFunctions[] = 'wfSlippyMapHook'; |
| 57 | +} |
| 58 | + |
| 59 | +function wfSlippyMapHook() { |
| 60 | + new SlippyMapHook; |
| 61 | + return true; |
| 62 | +} |
| 63 | + |
56 | 64 | /* |
57 | 65 | * Configuration variables |
58 | 66 | */ |
59 | 67 | |
60 | 68 | /* Allowed mode= values on this server */ |
61 | | -$wgMapModes = array( 'osm', 'satellite' ); |
| 69 | +$wgSlippyMapModes = array( |
| 70 | + 'osm' => array( |
| 71 | + // First layer = default |
| 72 | + 'layers' => array( 'mapnik', 'osmarender', 'maplint', 'cycle' ), |
62 | 73 | |
63 | | -/* |
| 74 | + // Default zoom |
| 75 | + 'defaultZoomLevel' => 14, |
| 76 | + |
| 77 | + 'static_rendering' => array( |
| 78 | + 'type' => 'SlippyMapExportCgiBin', |
| 79 | + 'options' => array( |
| 80 | + 'base_url' => 'http://tile.openstreetmap.org/cgi-bin/export', |
| 81 | + |
| 82 | + 'format' => 'png', |
| 83 | + 'numZoomLevels' => 19, |
| 84 | + 'maxResolution' => 156543.0339, |
| 85 | + 'unit' => 'm', |
| 86 | + 'sphericalMercator' => true |
| 87 | + ), |
| 88 | + ), |
| 89 | + ), |
| 90 | + 'satellite' => array( |
| 91 | + 'layers' => array( 'urban', 'landsat', 'bluemarble' ), |
| 92 | + 'defaultZoomLevel' => 14, |
| 93 | + 'static_rendering' => null, |
| 94 | + ), |
| 95 | +); |
| 96 | + |
| 97 | +/** |
| 98 | + * Minimum / maximum allowed width/height values for our maps. |
| 99 | + * |
| 100 | + * * Micromaps aren't useful to anybody and we don't want to worry |
| 101 | + about OpenLayers controls in an area smaller than a certain size. |
| 102 | + * |
| 103 | + * * We don't want to generate a giant static map, and restricting the |
| 104 | + size probably helps against some vandal attacks aimed at |
| 105 | + confusing users. |
| 106 | + */ |
| 107 | + |
| 108 | +$wgSlippyMapSizeRestrictions = array( |
| 109 | + 'width' => array( 100, 1000 ), |
| 110 | + 'height' => array( 100, 1000 ), |
| 111 | +); |
| 112 | + |
| 113 | + |
| 114 | +/** |
64 | 115 | * If true the a JS slippy map will be shown by default to supporting |
65 | 116 | * clients, otherwise they'd have to click on the static image to |
66 | 117 | * enable the slippy map. |
67 | 118 | */ |
68 | | -$wgAutoLoadMaps = false; |
| 119 | +$wgSlippyMapAutoLoadMaps = false; |
| 120 | + |
Index: trunk/extensions/SlippyMap/SlippyMap.hooks.php |
— | — | @@ -1,177 +1,124 @@ |
2 | 2 | <?php |
3 | | -if ( ! defined( 'MEDIAWIKI' ) ) |
4 | | - die(); |
| 3 | +/** |
| 4 | + * Hooks for SlippyMap extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
5 | 9 | |
6 | | -class SlippyMapHooks { |
| 10 | +class SlippyMapHook { |
7 | 11 | |
8 | | - var $mapId; |
9 | | - |
10 | 12 | /** |
| 13 | + * Each map we render gets a unique ID. Required to avoid |
| 14 | + * JavaScript namespace collisions. |
| 15 | + * |
| 16 | + * @var int |
| 17 | + */ |
| 18 | + var $mId; |
| 19 | + |
| 20 | + /** |
11 | 21 | * Property: SlippyMapMarkerList |
12 | 22 | * Evil hack as documented at |
13 | 23 | * http://www.mediawiki.org/wiki/Manual:Tag_extensions#How_can_I_avoid_modification_of_my_extension.27s_HTML_output.3F |
14 | 24 | * This is here so that random <p> and <pre> tags aren't added to the inline JavaScript output |
15 | 25 | */ |
16 | | - var $SlippyMapMarkerList = array(); |
17 | | - |
18 | | - /** |
19 | | - * Search string used to check for SlippyMap invocation |
20 | | - */ |
21 | | - protected static $WIKITEXT_PATTERN = "slippymap"; |
| 26 | + var $mParserMarkers = array(); |
22 | 27 | |
23 | 28 | public function __construct() { |
24 | | - $this->mapId = 0; |
25 | | - } |
| 29 | + global $wgParser, $wgHooks, $wgOut, $wgScriptPath, $wgStyleVersion; |
26 | 30 | |
27 | | - /** |
28 | | - * Sets up the slippy map and links JavaScript files |
29 | | - * |
30 | | - * Register the extension with the WikiText parser |
31 | | - * the first parameter is the name of the new tag. |
32 | | - * In this case it defines the tag <slippymap> ... </slippymap> |
33 | | - * the second parameter is the callback function for |
34 | | - * processing the text between the tags |
35 | | - * |
36 | | - * @return true |
37 | | - */ |
| 31 | + // Load i18n |
| 32 | + self::loadMessages(); |
38 | 33 | |
39 | | - public static function onParserFirstCallInit( ) { |
40 | | - global $wgArticle, $wgOut, $wgLang, $wgParser, $wgScriptPath, $wgJsMimeType, $wgStyleVersion, $wgAutoLoadMaps; |
41 | | - global $wgHooks; |
| 34 | + // Initialize unique map id |
| 35 | + $this->mId = 0; |
42 | 36 | |
43 | | - $smh = new SlippyMapHooks(); |
| 37 | + // Hook for adding JS variables to <head> |
| 38 | + $wgHooks['MakeGlobalVariablesScript'][] = array( &$this, 'jsVariables' ); |
44 | 39 | |
45 | | - /** |
46 | | - * If not a special page ( $wgArticle exists ), |
47 | | - * then check for slippymap tag and |
48 | | - * add openlayers if page includes slippymap |
49 | | - * otherwise, do not add slippymap and openlayers js |
50 | | - * where unnecessary and will slow page load time. |
51 | | - */ |
52 | | - if ( ( isset( $wgArticle ) && strstr($wgArticle->getRawText(), SlippyMapHooks::$WIKITEXT_PATTERN ) ) |
53 | | - // Horrible hack. But it'll go away in time when this whole if () is replaced by delayed loading of OL |
54 | | - || class_exists("ParserTest") ) { |
| 40 | + // Add JavaScript files to <head> |
| 41 | + $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?' . $wgStyleVersion ); |
| 42 | + $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/SlippyMap.js?' . $wgStyleVersion ); |
55 | 43 | |
56 | | - wfLoadExtensionMessages( 'SlippyMap' ); |
| 44 | + // Add our CSS to <head> |
| 45 | + $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/SlippyMap/SlippyMap.css?' . $wgStyleVersion ); |
57 | 46 | |
58 | | - if ( $wgAutoLoadMaps ) { |
59 | | - $autoload = 'true'; |
60 | | - } else { |
61 | | - $autoload = 'false'; |
62 | | - } |
| 47 | + // Expand our maps after tidy has run |
| 48 | + $wgHooks['ParserAfterTidy'][] = array( &$this, 'afterTidy' ); |
63 | 49 | |
64 | | - $script = array( |
65 | | - "<script type=\"$wgJsMimeType\">/*<![CDATA[*/", |
66 | | - "var wgSlippyMapCode = " . Xml::encodeJsVar( wfMsg( 'slippymap_code' ) ) . ";", |
67 | | - "var wgSlippyMapButtonCode = " . Xml::encodeJsVar( wfMsg( 'slippymap_button_code' ) ) . ";", |
68 | | - "var wgSlippyMapResetview = " . Xml::encodeJsVar( wfMsg( 'slippymap_resetview' ) ) . ";", |
69 | | - "var wgSlippyMapLanguageCode = " . Xml::encodeJsVar( $wgLang->getCode() ) . ";", |
70 | | - "var autoInitMaps = {$autoload};", |
71 | | - "/*]]>*/</script>", |
72 | | - ); |
| 50 | + // Register the hook with the parser |
| 51 | + $wgParser->setHook( 'slippymap', array( &$this, 'render' ) ); |
73 | 52 | |
74 | | - $wgOut->addScript( implode( "\n\t\t", $script ) . "\n" ); |
75 | | - $wgOut->addScript( "<script type='$wgJsMimeType' src='" . $wgScriptPath . "/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?{$wgStyleVersion}'></script>" ); |
76 | | - $wgOut->addScript( "<script type='$wgJsMimeType' src='" . $wgScriptPath . "/extensions/SlippyMap/SlippyMap.js?{$wgStyleVersion}'></script>" ); |
77 | | - $wgOut->addLink( array( 'rel' => 'stylesheet','type' => 'text/css','href' => $wgScriptPath . '/extensions/SlippyMap/SlippyMap.css' ) ); |
78 | | - $wgHooks['ParserAfterTidy'][] = 'SlippyMapHooks::wfSlippyMapParserAfterTidy'; |
79 | | - $wgParser->setHook( 'slippymap', array( $smh, 'wfParseMapAttributes' ) ); |
80 | | - } |
81 | | - |
82 | | - return true; |
| 53 | + // Continue |
| 54 | + return true; |
83 | 55 | } |
84 | | - |
85 | | - public function wfParseMapAttributes( $input, $argv, $parser ) |
86 | | - { |
87 | | - global $wgOut, $SlippyMapMarkerList, $wgMapModes; |
88 | 56 | |
89 | | - /** |
90 | | - * Support old style parameters from $input |
91 | | - * Parse the pipe separated name value pairs (e.g. 'aaa=bbb|ccc=ddd') |
92 | | - * With the new syntax we expect nothing in the $input, so this will result in '' values |
93 | | - */ |
| 57 | + public function render( $input, $args, $parser ) { |
| 58 | + // Create SlippyMap |
| 59 | + $slippyMap = new SlippyMap( $parser ); |
94 | 60 | |
95 | | - $oldStyleParamStrings = explode( '|', $input ); |
96 | | - foreach ( $oldStyleParamStrings as $oldStyleParamString ) { |
97 | | - $oldStyleParamString = trim( $oldStyleParamString ); |
98 | | - $eqPos = strpos( $oldStyleParamString, "=" ); |
99 | | - if ( $eqPos === false ) { |
100 | | - $oldStyleParams[$oldStyleParamString] = 'true'; |
101 | | - } else { |
102 | | - $oldStyleParams[substr( $oldStyleParamString, 0, $eqPos )] = trim( htmlspecialchars( substr( $oldStyleParamString, $eqPos + 1 ) ) ); |
103 | | - } |
| 61 | + // Hack to ease testing for invalid/valid paramater values |
| 62 | + // when we're running parsertests. |
| 63 | + $return_dummy_map = false; |
| 64 | + if ( isset( $args['dummy'] ) && class_exists("ParserTest") ) { |
| 65 | + $return_dummy_map = true; |
104 | 66 | } |
105 | | - |
106 | | - foreach ( $argv as $key=>$val ) { |
107 | | - // Receive new style args: <slippymap aaa=bbb ccc=ddd></slippymap> |
108 | | - if ( isset( $val ) ) { |
109 | | - $key = strtolower( $key ); |
110 | | - $mapParams[$key] = $val; |
111 | | - } |
112 | | - } |
| 67 | + unset( $args['dummy'] ); |
113 | 68 | |
114 | | - /** |
115 | | - * If using old style params, turn them into a mapParams array |
116 | | - */ |
117 | | - if ( ( isset( $mapParams ) && ( count( $mapParams ) == 0 ) ) && ( isset( $oldStyleParams ) && ( count( $oldStyleParams ) > 0 ) ) ) { |
118 | | - foreach ( $oldStyleParams as $key => $val ) { |
119 | | - // Receive new style args: <slippymap aaa=bbb ccc=ddd></slippymap> |
120 | | - if ( isset( $val ) ) { |
121 | | - $key = strtolower( $key ); |
122 | | - $mapParams[$key] =& $val; |
123 | | - } |
| 69 | + // Configure slippyMap |
| 70 | + $had_errors = ! $slippyMap->extractOptions( $input, $args ); |
| 71 | + |
| 72 | + // Render & return output |
| 73 | + if ( $had_errors ) { |
| 74 | + return $slippyMap->renderErrors(); |
| 75 | + } else { |
| 76 | + if ( $return_dummy_map ) { |
| 77 | + return "A dummy map"; |
| 78 | + } else { |
| 79 | + $marker = $this->stashMarker( $slippyMap->render( $this->mId ) ); |
| 80 | + $this->mId += 1; |
| 81 | + return $marker; |
124 | 82 | } |
125 | 83 | } |
| 84 | + } |
126 | 85 | |
127 | | - /** |
128 | | - * Give the map a unique id, so there can be multiple maps |
129 | | - */ |
130 | | - $mapParams['mapId'] = $this->mapId; |
131 | | - $mode = isset( $mapParams['mode'] ) ? $mapParams['mode'] : null; |
132 | | - |
133 | | - if ( $mode && ! in_array( $mode, $wgMapModes ) ) { |
134 | | - $errors = wfMsg( 'slippymap_invalidmode', htmlspecialchars( $this->mode ) ); |
135 | | - $wgOut->addHTML( '<h3>' . $mode . ' is an invalid map mode</h3>' ); |
136 | | - } else { |
137 | | - $output = ''; |
138 | | - switch ( $mode ) { |
139 | | - case 'satellite': |
140 | | - $map = new WorldWind( $mapParams ); |
141 | | - break; |
142 | | - default: |
143 | | - $map = new SlippyMap( $mapParams ); |
144 | | - } |
| 86 | + /** |
| 87 | + * Hook to add JS variables to <head> |
| 88 | + */ |
| 89 | + public function jsVariables( $vars ) { |
| 90 | + global $wgLang, $wgSlippyMapAutoLoadMaps; |
145 | 91 | |
146 | | - $output .= $map->getMap( ); |
147 | | - $this->mapId++; |
148 | | - $markercount = count( $SlippyMapMarkerList ); |
149 | | - $pMarker = "SlippyMap-marker".$markercount."-SlippyMap"; |
150 | | - $SlippyMapMarkerList[$markercount] = $output; |
151 | | - return $pMarker; |
| 92 | + $vars['wgSlippyMapCode'] = wfMsg( 'slippymap_code' ); |
| 93 | + $vars['wgSlippyMapButtonCode'] = wfMsg( 'slippymap_button_code' ); |
| 94 | + $vars['wgSlippyMapResetview'] = wfMsg( 'slippymap_resetview' ); |
| 95 | + $vars['wgSlippyMapLanguageCode'] = $wgLang->getCode(); |
| 96 | + $vars['wgSlippyMapSlippyByDefault'] = $wgSlippyMapAutoLoadMaps; |
152 | 97 | |
153 | | - } |
| 98 | + return true; |
| 99 | + } |
154 | 100 | |
| 101 | + private function stashMarker( $text ) { |
| 102 | + $pMarker = "SlippyMap-marker{$this->mId}-SlippyMap"; |
| 103 | + $this->mParserMarkers[$this->mId] = $text; |
| 104 | + return $pMarker; |
155 | 105 | } |
156 | 106 | |
157 | | - /** |
158 | | - * Evil hack |
159 | | - * @see http://www.mediawiki.org/wiki/Manual:Tag_extensions#How_can_I_avoid_modification_of_my_extension.27s_HTML_output.3F |
160 | | - */ |
161 | | - public static function wfSlippyMapParserAfterTidy( &$parser, &$text ) { |
162 | | - global $SlippyMapMarkerList; |
| 107 | + public function afterTidy( &$parser, &$text ) { |
163 | 108 | $keys = array(); |
164 | | - $marker_count = count( $SlippyMapMarkerList ); |
| 109 | + $marker_count = count( $this->mParserMarkers ); |
165 | 110 | |
166 | 111 | for ($i = 0; $i < $marker_count; $i++) { |
167 | 112 | $keys[] = 'SlippyMap-marker' . $i . '-SlippyMap'; |
168 | 113 | } |
169 | 114 | |
170 | | - $text = str_replace( $keys, $SlippyMapMarkerList, $text ); |
| 115 | + $text = str_replace( $keys, $this->mParserMarkers, $text ); |
| 116 | + |
171 | 117 | return true; |
172 | 118 | } |
173 | 119 | |
174 | | - function error( $msg ) { |
175 | | - $error = '<strong class="error">' . $msg . '</strong>'; |
176 | | - return $error; |
| 120 | + private static function loadMessages() { |
| 121 | + wfProfileIn( __METHOD__ ); |
| 122 | + wfLoadExtensionMessages( 'SlippyMap' ); |
| 123 | + wfProfileOut( __METHOD__ ); |
177 | 124 | } |
178 | 125 | } |
Index: trunk/extensions/SlippyMap/SlippyMapExportCgiBin.class.php |
— | — | @@ -0,0 +1,132 @@ |
| 2 | +<?php |
| 3 | +class SlippyMapExportCgiBin { |
| 4 | + var $lat; |
| 5 | + var $lon; |
| 6 | + var $zoom; |
| 7 | + var $width; |
| 8 | + var $height; |
| 9 | + var $url; |
| 10 | + |
| 11 | + /** borrowed from OpenLayers.DOTS_PER_UNIT */ |
| 12 | + private static $INCHES_PER_UNIT = array ( |
| 13 | + 'dd' => 4374754, |
| 14 | + 'm' => 39.3701 |
| 15 | + ); |
| 16 | + |
| 17 | + /** borrowed from OpenLayers.DOTS_PER_INCH */ |
| 18 | + private static $DOTS_PER_INCH = 72; |
| 19 | + |
| 20 | + /** pixel size in meters */ |
| 21 | + private static $PIXEL_SIZE = 0.00028; |
| 22 | + |
| 23 | + /** |
| 24 | + * Constructor |
| 25 | + */ |
| 26 | + public function __construct( $lat, $lon, $zoom, $width, $height, $options ) { |
| 27 | + $this->lat = $lat; |
| 28 | + $this->lon = $lon; |
| 29 | + $this->zoom = $zoom; |
| 30 | + $this->width = $width; |
| 31 | + $this->height = $height; |
| 32 | + $this->options = $options; |
| 33 | + |
| 34 | + self::initResolutionsAndScales(); |
| 35 | + self::setBounds(); |
| 36 | + } |
| 37 | + |
| 38 | + public function getUrl() { |
| 39 | + return |
| 40 | + $this->options['base_url'] |
| 41 | + . '?' |
| 42 | + . 'bbox=' . implode( ',', $this->bounds ) |
| 43 | + . '&scale=' . $this->scale |
| 44 | + . '&format=' . $this->options['format']; |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * This sets the map bounds |
| 49 | + */ |
| 50 | + public function setBounds() { |
| 51 | + |
| 52 | + /* Determine scale and map bounds for static render request */ |
| 53 | + $resolution = $this->resolutions[round( $this->zoom )]; |
| 54 | + $this->scale = self::getScaleFromResolution( $resolution ); |
| 55 | + |
| 56 | + /* |
| 57 | + * Calculate width for Mapnik output using a standard pixel size of 0.00028m |
| 58 | + * @see http://trac.mapnik.org/wiki/ScaleAndPpi |
| 59 | + */ |
| 60 | + $w_deg = $this->width * self::$PIXEL_SIZE * $this->scale; |
| 61 | + $h_deg = $this->height * self::$PIXEL_SIZE * $this->scale; |
| 62 | + |
| 63 | + $center = array( $this->lon, $this->lat ); |
| 64 | + if ( $this->options['sphericalMercator'] ) { |
| 65 | + // Calculate bounds within a spherical mercator projection if that is what the scale is based on |
| 66 | + $mercatorCenter = self::forwardMercator( $center ); |
| 67 | + $mbounds = array( |
| 68 | + $mercatorCenter[0] - $w_deg / 2, |
| 69 | + $mercatorCenter[1] - $h_deg / 2, |
| 70 | + $mercatorCenter[0] + $w_deg / 2, |
| 71 | + $mercatorCenter[1] + $h_deg / 2 |
| 72 | + ); |
| 73 | + $this->bounds = self::inverseMercator( $mbounds ); |
| 74 | + } |
| 75 | + else { |
| 76 | + // Calculate bounds within WGS84 |
| 77 | + $this->bounds = array( $center[0] - $w_deg / 2, $center[1] - $h_deg / 2, $center[0] + $w_deg / 2, $center[1] + $h_deg / 2 ); |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + /** |
| 82 | + * Borrowed from OpenLayers.Util.getScaleFromResolution |
| 83 | + */ |
| 84 | + protected function getScaleFromResolution( $resolution ) { |
| 85 | + return $resolution * self::$INCHES_PER_UNIT[$this->options['unit']] * self::$DOTS_PER_INCH; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Determines resolutions and scales based on a maximum resolution and number of zoom levels |
| 90 | + * Borrowed from OpenLayers.Layer.initResolutions |
| 91 | + */ |
| 92 | + protected function initResolutionsAndScales() { |
| 93 | + $this->resolutions = array(); |
| 94 | + $base = 2; |
| 95 | + |
| 96 | + for ( $i = 0; $i < $this->options['numZoomLevels']; $i++ ) { |
| 97 | + $this->resolutions[$i] = $this->options['maxResolution'] / pow( $base, $i ); |
| 98 | + $this->scales[$i] = $this->getScaleFromResolution( $this->resolutions[$i] ); |
| 99 | + } |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Convert from WGS84 to spherical mercator |
| 104 | + */ |
| 105 | + protected static function forwardMercator($lonlat) { |
| 106 | + for ($i=0; $i<count($lonlat); $i+=2) { |
| 107 | + /* lon */ |
| 108 | + $lonlat[$i] = $lonlat[$i] * (2 * M_PI * 6378137 / 2.0) / 180.0; |
| 109 | + |
| 110 | + /* lat */ |
| 111 | + $lonlat[$i+1] = log(tan((90 + $lonlat[$i+1]) * M_PI / 360.0)) / (M_PI / 180.0); |
| 112 | + $lonlat[$i+1] = $lonlat[$i+1] * (2 * M_PI * 6378137 / 2.0) / 180.0; |
| 113 | + } |
| 114 | + return $lonlat; |
| 115 | + } |
| 116 | + |
| 117 | + /** |
| 118 | + * Convert from spherical mercator to WGS84 |
| 119 | + */ |
| 120 | + protected static function inverseMercator($lonlat) { |
| 121 | + for ($i=0; $i<count($lonlat); $i+=2) { |
| 122 | + /* lon */ |
| 123 | + $lonlat[$i] = $lonlat[$i] / ((2 * M_PI * 6378137 / 2.0) / 180.0); |
| 124 | + |
| 125 | + /* lat */ |
| 126 | + $lonlat[$i+1] = $lonlat[$i+1] / ((2 * M_PI * 6378137 / 2.0) / 180.0); |
| 127 | + $lonlat[$i+1] = 180.0 / M_PI * (2 * atan(exp($lonlat[$i+1] * M_PI / 180.0)) - M_PI / 2); |
| 128 | + } |
| 129 | + |
| 130 | + return $lonlat; |
| 131 | + } |
| 132 | +} |
| 133 | +?> |
Index: trunk/extensions/SlippyMap/SlippyMap.class.php |
— | — | @@ -1,182 +1,333 @@ |
2 | 2 | <?php |
3 | | -/** |
4 | | -* |
5 | | -* @file |
6 | | -* |
7 | | -* @description |
8 | | -* OpenStreetMap SlippyMap - MediaWiki extension |
9 | | -* |
10 | | -* This defines what happens when <slippymap> tag is placed in the wikitext |
11 | | -* |
12 | | -* We show a map based on the lat/lon/zoom data passed in. This extension brings in |
13 | | -* the OpenLayers javascript, to show a slippy map. |
14 | | -* |
15 | | -* Usage example: |
16 | | -* <slippymap lat="51.485" lon="-0.15" z="11" w="300" h="200" layer="osmarender" marker="0" /> |
17 | | -* |
18 | | -* Tile images are not cached local to the wiki. |
19 | | -* To acheive this (remove the OSM dependency) you might set up a squid proxy, |
20 | | -* and modify the requests URLs here accordingly. |
21 | | -* |
22 | | -* This file should be placed in the mediawiki 'extensions' directory |
23 | | -* ...and then it needs to be 'included' within LocalSettings.php |
24 | | -* |
25 | | -* @license |
26 | | -* |
27 | | -* Copyright 2008 Harry Wood, Jens Frank, Grant Slater, Raymond Spekking and others |
28 | | -* |
29 | | -* This program is free software; you can redistribute it and/or modify |
30 | | -* it under the terms of the GNU General Public License as published by |
31 | | -* the Free Software Foundation; either version 2 of the License, or |
32 | | -* (at your option) any later version. |
33 | | -* |
34 | | -* This program is distributed in the hope that it will be useful, |
35 | | -* but WITHOUT ANY WARRANTY; without even the implied warranty of |
36 | | -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
37 | | -* GNU General Public License for more details. |
38 | | -* |
39 | | -* You should have received a copy of the GNU General Public License |
40 | | -* along with this program; if not, write to the Free Software |
41 | | -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
42 | | -* |
43 | | -*/ |
| 3 | +/** |
| 4 | + * Classes for SlippyMap extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
44 | 9 | |
45 | 10 | class SlippyMap { |
46 | 11 | |
47 | | - var $mapId; |
48 | | - var $lat; |
49 | | - var $lon; |
50 | | - var $width; |
51 | | - var $height; |
52 | | - var $mode; |
53 | | - var $layer; |
54 | | - var $zoom; |
55 | | - var $caption; |
56 | | - var $scale; |
57 | | - var $resolution; |
58 | | - var $resolutions; |
59 | | - var $scales; |
| 12 | + /* Fields */ |
60 | 13 | |
61 | 14 | /** |
62 | | - * minimum_longitude, minimum_latitude, maximum_longitude, maximum_latitude |
| 15 | + * @var object |
63 | 16 | */ |
64 | | - var $bounds; |
65 | | - |
66 | | - /* |
67 | | - * Constants |
68 | | - * Using static members instead of constants because arrays can't be const |
69 | | - */ |
70 | | - protected static $DEFAULT_IMAGE_FORMAT = "png"; |
71 | | - |
| 17 | + protected $mParser; |
| 18 | + |
72 | 19 | /** |
73 | | - * Supported map modes and their layer types |
| 20 | + * |
74 | 21 | */ |
75 | | - public static $MAP_MODES = array( |
76 | | - "mapnik", "osmarender", "maplint", "cycle" |
| 22 | + protected $mArgsRequired = array( |
| 23 | + 'lat', |
| 24 | + 'lon' |
77 | 25 | ); |
78 | | - |
79 | | - protected static $MAP_OPTIONS = array ( |
80 | | - 'staticRenderService' => 'http://tile.openstreetmap.org/cgi-bin/export?bbox=##bbox##&scale=##scale##&format=##format##', |
81 | | - //'staticRenderService' => null, |
82 | | - 'defaultZoomLevel' => 14, |
83 | | - |
84 | | - /* from OpenLayers XYZ.js */ |
85 | | - 'defaultLayer' => 'mapnik', |
86 | | - 'numZoomLevels' => 19, |
87 | | - 'maxResolution' => 156543.0339, |
88 | | - 'unit' => 'm', |
89 | | - 'sphericalMercator' => true |
| 26 | + |
| 27 | + protected $mArgsList = array( |
| 28 | + 'lat' => 'mLat', |
| 29 | + 'lon' => 'mLon', |
| 30 | + 'zoom' => 'mZoom', |
| 31 | + 'width' => 'mWidth', |
| 32 | + 'height' => 'mHeight', |
| 33 | + 'mode' => 'mMode', |
| 34 | + 'layer' => 'mLayer', |
| 35 | + 'caption' => 'mCaption', |
90 | 36 | ); |
91 | | - |
92 | | - /** borrowed from OpenLayers.DOTS_PER_UNIT */ |
93 | | - protected static $INCHES_PER_UNIT = array ( |
94 | | - 'dd' => 4374754, |
95 | | - 'm' => 39.3701 |
96 | | - ); |
97 | | - |
98 | | - /** borrowed from OpenLayers.DOTS_PER_INCH */ |
99 | | - protected static $DOTS_PER_INCH = 72; |
100 | | - |
101 | | - /** pixel size in meters */ |
102 | | - protected static $PIXEL_SIZE = 0.00028; |
103 | | - |
| 37 | + |
104 | 38 | /** |
105 | | - * This constructs the map object |
| 39 | + * An array of error messages that apply to our arguments as |
| 40 | + * extracted from extractOptions. |
106 | 41 | * |
107 | | - * @param $mapParams array of map parameters |
| 42 | + * Here because we want to announce all problems with the |
| 43 | + * extension usage at once to the user instead of playing the fix |
| 44 | + * one parameter error at a time game. |
| 45 | + * |
| 46 | + * @var array |
108 | 47 | */ |
109 | | - public function __construct( $mapParams ) { |
110 | | - global $wgOut, $wgUser; |
111 | | - wfLoadExtensionMessages( 'SlippyMap' ); |
| 48 | + protected $mArgsError = array(); |
112 | 49 | |
113 | | - $this->errors = $this->validate(); |
114 | | - if ( ! $this->errors ) |
| 50 | + /** |
| 51 | + */ |
| 52 | + protected $mArgs = array(); |
| 53 | + |
| 54 | + /* Functions */ |
| 55 | + |
| 56 | + /** |
| 57 | + * Constructor |
| 58 | + * |
| 59 | + * @param object $parser Parser instance |
| 60 | + */ |
| 61 | + public function __construct( $parser ) { |
| 62 | + $this->mParser = $parser; |
| 63 | + $this->mMode = 'osm'; |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * Extract and validate options from input and argv. |
| 68 | + * |
| 69 | + * Returns a boolean indicating whether there were any errors |
| 70 | + * during argument processing. |
| 71 | + * |
| 72 | + * @param string $input Parser hook input |
| 73 | + * @param string $argv Parser hook arguments |
| 74 | + * @return boolean |
| 75 | + */ |
| 76 | + public function extractOptions( $input, $args ) { |
| 77 | + wfProfileIn( __METHOD__ ); |
| 78 | + |
| 79 | + /* <slippymap></slippymap> */ |
| 80 | + if ( $input === '' ) { |
| 81 | + $this->mArgsError[] = wfMsg( 'slippymap_error_empty_element', wfMsg( 'slippymap_extname' ), wfMsg( 'slippymap_tagname' ) ); |
| 82 | + } |
| 83 | + |
| 84 | + /* No arguments */ |
| 85 | + if ( count( $args ) == 0 ) { |
| 86 | + $this->mArgsError[] = wfMsg( 'slippymap_error_missing_arguments', wfMSg( 'slippymap_tagname' ) ); |
| 87 | + |
| 88 | + /* Some arguments */ |
| 89 | + } else { |
| 90 | + |
| 91 | + /* Make sure we have lat/lon/zoom */ |
| 92 | + foreach ($this->mArgsRequired as $requiredArg) { |
| 93 | + if ( ! isset( $args[$requiredArg] ) ) { |
| 94 | + $this->mArgsError[] = wfMsg( 'slippymap_error_missing_attribute_' . $requiredArg ); |
| 95 | + } |
| 96 | + } |
| 97 | + |
| 98 | + /* Keys that the user made up, this is a fatal error since |
| 99 | + * we want to protect our namespace |
| 100 | + */ |
| 101 | + foreach ( array_keys( $args ) as $user_key ) { |
| 102 | + if ( ! isset( $this->mArgsList[$user_key] ) ) |
| 103 | + $this->mArgsError[] = wfMsg( 'slippymap_error_unknown_attribute', $user_key ); |
| 104 | + } |
| 105 | + |
| 106 | + /** |
| 107 | + * Go through the list of options and add them to our |
| 108 | + * fields if they validate. |
| 109 | + */ |
| 110 | + foreach ( $this->mArgsList as $key => $classVar ) { |
| 111 | + if ( isset( $args[$key] ) ) { |
| 112 | + $val = $args[$key]; |
| 113 | + |
| 114 | + if ( $this->validateArgument($key, $val) ) { |
| 115 | + $this->$classVar = $args[$key]; |
| 116 | + } else { |
| 117 | + /* Invalid value */ |
| 118 | + } |
| 119 | + } |
| 120 | + } |
| 121 | + } |
| 122 | + |
| 123 | + if ( count( $this->mArgsError ) == 0 ) { |
| 124 | + $this->defaultOptions(); |
| 125 | + wfProfileOut( __METHOD__ ); |
| 126 | + return true; |
| 127 | + } else { |
115 | 128 | return false; |
116 | | - |
117 | | - self::initMap( $mapParams ); |
118 | | - self::setSize(); |
119 | | - self::setZoom(); |
120 | | - self::initResolutionsAndScales(); |
121 | | - self::setBounds(); |
| 129 | + } |
122 | 130 | } |
123 | 131 | |
124 | 132 | /** |
125 | | - * This initializes the map object, with parameters |
| 133 | + * Fill in defaults for those options for those options that |
| 134 | + * weren't set during extractOptions() |
| 135 | + */ |
| 136 | + public function defaultOptions( ) { |
| 137 | + global $wgSlippyMapModes; |
| 138 | + |
| 139 | + if ( ! isset( $this->mMode ) ) { |
| 140 | + $modes = array_keys( $wgSlippyMapModes ); |
| 141 | + $default_mode = $modes[0]; |
| 142 | + |
| 143 | + $this->mMode = $default_mode; |
| 144 | + } |
| 145 | + |
| 146 | + if ( ! isset( $this->mLayer ) ) { |
| 147 | + $this->mLayer = $wgSlippyMapModes[$this->mMode]['layers'][0]; |
| 148 | + } |
| 149 | + |
| 150 | + if ( ! isset( $this->mZoom ) ) { |
| 151 | + $this->mZoom = $wgSlippyMapModes[$this->mMode]['defaultZoomLevel']; |
| 152 | + } |
| 153 | + |
| 154 | + if ( ! isset( $this->mMarker ) ) { |
| 155 | + $this->mMarker = 0; |
| 156 | + } |
| 157 | + |
| 158 | + if ( ! isset( $this->mCaption ) ) { |
| 159 | + $this->mCaption = ''; |
| 160 | + } |
| 161 | + |
| 162 | + if ( ! isset( $this->mWidth ) || ! isset( $this->mHeight ) ) { |
| 163 | + $thumbsize = self::getUserThumbSize(); |
| 164 | + |
| 165 | + if ( ! isset( $this->mWidth ) ) |
| 166 | + $this->mWidth = $thumbsize; |
| 167 | + if ( ! isset( $this->mHeight ) ) |
| 168 | + $this->mHeight = $thumbsize * .72; |
| 169 | + |
| 170 | + // trim off the 'px' on the end of pixel measurement numbers (ignore if present) |
| 171 | + if ( substr( $this->mWidth, -2 ) == 'px' ) |
| 172 | + $this->mWidth = (int) substr( $this->width, 0, -2 ); |
| 173 | + |
| 174 | + if ( substr( $this->mHeight, - 2 ) == 'px' ) |
| 175 | + $this->mHeight = (int) substr( $this->height, 0, -2 ); |
| 176 | + } |
| 177 | + } |
| 178 | + |
| 179 | + private static function getUserThumbSize() { |
| 180 | + global $wgUser, $wgOut, $wgThumbLimits; |
| 181 | + |
| 182 | + return $wgThumbLimits[$wgUser->getOption( 'thumbsize' )]; |
| 183 | + } |
| 184 | + |
| 185 | + /** |
| 186 | + * Validate the values of a keys listed in $this->mArgsList. |
126 | 187 | * |
127 | | - * @param $mapParams array of map parameters |
| 188 | + * @param string $key A key we know to be good |
| 189 | + * @param string $val A user supplied value to validate for the key |
128 | 190 | */ |
129 | | - public function initMap( $mapParams ) { |
130 | | - $this->mapId = $mapParams['mapId']; |
131 | | - $this->lat = isset( $mapParams['lat'] ) ? $mapParams['lat'] : null; |
132 | | - $this->lon = isset( $mapParams['lon'] ) ? $mapParams['lon'] : null; |
133 | | - $this->width = isset( $mapParams['w'] ) ? $mapParams['w'] : null; |
134 | | - $this->height = isset( $mapParams['h'] ) ? $mapParams['h'] : null; |
135 | | - $this->mode = isset( $mapParams['mode'] ) ? $mapParams['mode'] : null; |
136 | | - $this->zoom = isset( $mapParams['zoom'] ) ? $mapParams['zoom'] : null; |
137 | | - $this->caption = isset( $mapParams['caption'] ) ? $mapParams['caption'] : null; |
138 | | - $this->layer = isset( $mapParams['layer'] ) ? strtolower($mapParams['layer']) : SlippyMap::$MAP_OPTIONS['defaultLayer']; |
139 | | - $this->marker = ( ( isset( $mapParams['marker'] ) && $mapParams['marker'] != '' && $mapParams['marker'] != '0' ) ? 1 : 0 ); |
| 191 | + private function validateArgument( $key, $val ) { |
| 192 | + global $wgSlippyMapSizeRestrictions; |
| 193 | + global $wgSlippyMapModes; |
| 194 | + global $wgLang; |
140 | 195 | |
141 | | - // see if the 'z' paramater is used rather than 'zoom' (and allow it) |
142 | | - if ( $this->zoom == '' && isset( $mapParams['z'] ) ) { |
143 | | - $this->zoom = $mapParams['z']; |
| 196 | + wfProfileIn( __METHOD__ ); |
| 197 | + |
| 198 | + $ok = false; |
| 199 | + |
| 200 | + switch ( $key ) { |
| 201 | + case 'lat': |
| 202 | + case 'lon': |
| 203 | + if ( ! preg_match( '~^ -? [0-9]{1,3} (?: \\. [0-9]{1,20} )? $~x', $val ) ) { |
| 204 | + $this->mArgsError[] = wfMsg( 'slippymap_error_invalid_attribute_' . $key . '_value_nan', $val ); |
| 205 | + } else { |
| 206 | + /* Note: I'm not calling $wgLang->formatNum( $val ) here on purpose */ |
| 207 | + if ( $key === 'lat' && ( $val > 90 || $val < -90 ) ) { |
| 208 | + $this->mArgsError[] = wfMsg( 'slippymap_error_invalid_attribute_' . $key . '_value_out_of_range', $val ); |
| 209 | + } else if ( $key === 'lon' && ( $val > 180 || $val < -180 ) ) { |
| 210 | + $this->mArgsError[] = wfMsg( 'slippymap_error_invalid_attribute_' . $key . '_value_out_of_range', $val ); |
| 211 | + } else { |
| 212 | + $ok = true; |
| 213 | + } |
| 214 | + } |
| 215 | + break; |
| 216 | + |
| 217 | + case 'zoom': |
| 218 | + if ( ! preg_match( '~^ [0-9]{1,2} $~x', $val ) ) { |
| 219 | + $this->mArgsError[] = wfMsg( 'slippymap_error_invalid_attribute_' . $key . '_value_nan', $val ); |
| 220 | + } else { |
| 221 | + /* TODO: Make configurable depending on layer settings */ |
| 222 | + $min_zoom = 0; |
| 223 | + $max_zoom = 18; |
| 224 | + |
| 225 | + /* Note: I'm not calling $wgLang->formatNum( $val ) here on purpose */ |
| 226 | + if ( ( $val > $max_zoom || $val < $min_zoom ) ) { |
| 227 | + $this->mArgsError[] = wfMsg( 'slippymap_error_invalid_attribute_' . $key . '_value_out_of_range', $val, $min_zoom, $max_zoom ); |
| 228 | + } else { |
| 229 | + $ok = true; |
| 230 | + } |
| 231 | + } |
| 232 | + break; |
| 233 | + |
| 234 | + case 'width': |
| 235 | + case 'height': |
| 236 | + if ( ! preg_match( '~^ [0-9]{1,20} $~x', $val ) ) { |
| 237 | + $this->mArgsError[] = wfMsg( 'slippymap_error_invalid_attribute_' . $key . '_value_nan', $val ); |
| 238 | + } else { |
| 239 | + list ($min_width, $max_width) = $wgSlippyMapSizeRestrictions['width']; |
| 240 | + list ($min_height, $max_height) = $wgSlippyMapSizeRestrictions['height']; |
| 241 | + |
| 242 | + if ( $key == 'width' && ( $val > $max_width || $val < $min_width ) ) { |
| 243 | + $this->mArgsError[] = wfMsg( |
| 244 | + 'slippymap_error_invalid_attribute_' . $key . '_value_out_of_range', |
| 245 | + $val, |
| 246 | + $min_width, |
| 247 | + $max_width |
| 248 | + ); |
| 249 | + } else if ( $key == 'height' && ( $val > $max_height || $val < $min_height ) ) { |
| 250 | + $this->mArgsError[] = wfMsg( |
| 251 | + 'slippymap_error_invalid_attribute_' . $key . '_value_out_of_range', |
| 252 | + $val, |
| 253 | + $min_width, |
| 254 | + $max_width |
| 255 | + ); |
| 256 | + } else { |
| 257 | + $ok = true; |
| 258 | + } |
| 259 | + } |
| 260 | + break; |
| 261 | + |
| 262 | + case 'mode': |
| 263 | + $modes = array_keys( $wgSlippyMapModes ); |
| 264 | + if ( ! in_array( $val, $modes ) ) { |
| 265 | + $this->mArgsError[] = wfMsg( |
| 266 | + 'slippymap_error_invalid_attribute_' . $key . '_value_not_a_mode', |
| 267 | + $val, |
| 268 | + $wgLang->listToText( array_map( array( &$this, 'addHtmlTT' ), $modes ) ) |
| 269 | + ); |
| 270 | + } else { |
| 271 | + $ok = true; |
| 272 | + } |
| 273 | + break; |
| 274 | + case 'layer': |
| 275 | + /* TODO validate */ |
| 276 | + case 'caption': |
| 277 | + /* Anything goes as far as the caption is concerned. It's the parser's problem if it's not OK */ |
| 278 | + $ok = true; |
| 279 | + break; |
| 280 | + |
| 281 | + default: |
| 282 | + die("internal error: Unknown parameter"); |
144 | 283 | } |
| 284 | + |
| 285 | + wfProfileOut( __METHOD__ ); |
| 286 | + return $ok; |
145 | 287 | } |
146 | 288 | |
147 | 289 | /** |
148 | | - * This generates map html code |
| 290 | + * Callback function for array_map to add <tt> to array elements. |
| 291 | + */ |
| 292 | + private static function addHtmlTT( $str ) { |
| 293 | + return "<tt>$str</tt>"; |
| 294 | + } |
| 295 | + |
| 296 | + /** |
| 297 | + * Return HTML output for the parser tag, hopefully a rendered map |
| 298 | + * but if we've had any errors return an error message instead. |
149 | 299 | * |
150 | | - * @return string: containing map html code |
| 300 | + * @param int id |
151 | 301 | */ |
152 | | - public function getMap() { |
| 302 | + public function render( $id ) { |
153 | 303 | global $wgOut, $wgJsMimeType; |
| 304 | + global $wgSlippyMapModes; |
154 | 305 | |
155 | 306 | $mapcode = <<<EOT |
156 | 307 | |
157 | | - <script type="{$wgJsMimeType}">slippymaps.push(new slippymap_map({$this->mapId}, { |
158 | | - mode: '{$this->mode}', |
159 | | - layer: '{$this->layer}', |
160 | | - lat: {$this->lat}, |
161 | | - lon: {$this->lon}, |
162 | | - zoom: {$this->zoom}, |
163 | | - width: {$this->width}, |
164 | | - height: {$this->height}, |
165 | | - marker: {$this->marker} |
| 308 | + <script type="{$wgJsMimeType}">slippymaps.push(new slippymap_map($id, { |
| 309 | + mode: '{$this->mMode}', |
| 310 | + layer: '{$this->mLayer}', |
| 311 | + lat: {$this->mLat}, |
| 312 | + lon: {$this->mLon}, |
| 313 | + zoom: {$this->mZoom}, |
| 314 | + width: {$this->mWidth}, |
| 315 | + height: {$this->mHeight}, |
| 316 | + marker: {$this->mMarker} |
166 | 317 | }));</script> |
167 | 318 | |
168 | 319 | <!-- mapframe --> |
169 | | - <div class="mapframe" style="width:{$this->width}px"> |
| 320 | + <div class="mapframe" style="width:{$this->mWidth}px"> |
170 | 321 | EOT; |
171 | 322 | |
172 | | - // TODO: NOSCRIPT support |
173 | | - if ( isset( SlippyMap::$MAP_OPTIONS['staticRenderService'] ) ) { |
174 | | - $mapcode .= self::getStaticMap(); |
| 323 | + $static_rendering = $wgSlippyMapModes[$this->mMode]['static_rendering']; |
| 324 | + if ( isset( $static_rendering ) ) { |
| 325 | + $mapcode .= self::getStaticMap( $id, $static_rendering ); |
175 | 326 | } else { |
176 | | - $mapcode .= self::getDynamicMap(); |
| 327 | + $mapcode .= self::getDynamicMap( $id ); |
177 | 328 | } |
178 | 329 | |
179 | | - if ( $this->caption ) { |
180 | | - $mapcode .= '<div class="mapcaption">{$this->caption}</div>'; |
| 330 | + if ( $this->mCaption ) { |
| 331 | + $mapcode .= "<div class='mapcaption'>" . $this->mParser->recursiveTagParse($this->mCaption) . "</div>"; |
181 | 332 | } |
182 | 333 | |
183 | 334 | $mapcode .= <<<EOT |
— | — | @@ -188,17 +339,18 @@ |
189 | 340 | return $mapcode; |
190 | 341 | } |
191 | 342 | |
| 343 | + |
192 | 344 | /** |
193 | 345 | * This generates dynamic map code |
194 | 346 | * |
195 | 347 | * @return string: containing dynamic map html code |
196 | 348 | */ |
197 | | - protected function getDynamicMap() { |
| 349 | + protected function getDynamicMap( $id ) { |
198 | 350 | global $wgJsMimeType; |
199 | 351 | $mapcode = <<<EOT |
200 | 352 | <!-- map div --> |
201 | | - <div id="map{$this->mapId}" class="map" style="width:{$this->width}px; height:{$this->height}px;"> |
202 | | - <script type="{$wgJsMimeType}">slippymaps[{$this->mapId}].init();</script> |
| 353 | + <div id="map{$id}" class="map" style="width:{$this->mWidth}px; height:{$this->mHeight}px;"> |
| 354 | + <script type="{$wgJsMimeType}">slippymaps[{$id}].init();</script> |
203 | 355 | <!-- /map div --> |
204 | 356 | </div> |
205 | 357 | EOT; |
— | — | @@ -210,269 +362,77 @@ |
211 | 363 | * |
212 | 364 | * @return string: containing static map html code |
213 | 365 | */ |
214 | | - protected function getStaticMap() { |
215 | | - $clickToActivate = wfMsg('slippymap_clicktoactivate'); |
216 | | - $mapcode = <<<EOT |
| 366 | + protected function getStaticMap( $id, $static_rendering ) { |
| 367 | + $staticType = $static_rendering['type']; |
| 368 | + $staticOptions = $static_rendering['options']; |
217 | 369 | |
218 | | - <!-- map div --> |
219 | | - <div id="map{$this->mapId}" class="map" style="width:{$this->width}px; height:{$this->height}px;"> |
220 | | - <!-- Static preview --> |
221 | | - <img |
222 | | - id="mapPreview{$this->mapId}" |
223 | | - class="mapPreview" |
224 | | - src="{$this->getImgSrc()}" |
225 | | - onclick="slippymaps[{$this->mapId}].init();" |
226 | | - width="{$this->width}" |
227 | | - height="{$this->height}" |
228 | | - alt="Slippy Map" |
229 | | - title="{$clickToActivate}"/> |
230 | | - <!-- /map div --> |
231 | | - </div> |
| 370 | + $static = new $staticType($this->mLat, $this->mLon, $this->mZoom, $this->mWidth, $this->mHeight, $staticOptions); |
| 371 | + $rendering_url = $static->getUrl(); |
| 372 | + |
| 373 | + $clickToActivate = wfMsgHtml('slippymap_clicktoactivate'); |
| 374 | + $mapcode = <<<EOT |
| 375 | + |
| 376 | + <!-- map div --> |
| 377 | + <div id="map{$id}" class="map" style="width:{$this->mWidth}px; height:{$this->mHeight}px;"> |
| 378 | + <!-- Static preview --> |
| 379 | + <img |
| 380 | + id="mapPreview{$id}" |
| 381 | + class="mapPreview" |
| 382 | + src="{$rendering_url}" |
| 383 | + onclick="slippymaps[{$id}].init();" |
| 384 | + width="{$this->mWidth}" |
| 385 | + height="{$this->mHeight}" |
| 386 | + alt="Slippy Map" |
| 387 | + title="{$clickToActivate}"/> |
| 388 | + <!-- /map div --> |
| 389 | + </div> |
232 | 390 | EOT; |
233 | 391 | |
234 | 392 | return $mapcode; |
235 | 393 | } |
236 | 394 | |
237 | | - /** |
238 | | - * This sets the zoom level |
239 | | - * |
240 | | - * @param $zoom optional |
241 | | - */ |
242 | | - public function setZoom( $zoom = null ) { |
243 | | - if ( $this->zoom == '' ) $this->zoom = SlippyMap::$MAP_OPTIONS['defaultZoomLevel']; |
244 | | - } |
| 395 | + /* /AIDS */ |
245 | 396 | |
246 | 397 | /** |
247 | | - * This sets the map size |
248 | | - * |
249 | | - */ |
250 | | - public function setSize() { |
251 | | - global $wgUser, $wgOut, $wgThumbLimits; |
252 | | - // set thumbsize based on user preferences |
253 | | - $thumbsize = $wgThumbLimits[$wgUser->getOption( 'thumbsize' )]; |
254 | | - |
255 | | - // default values (meaning these parameters can be missed out) |
256 | | - if ( $this->width == '' ) $this->width = $thumbsize; |
257 | | - if ( $this->height == '' ) $this->height = round( $thumbsize * .72 ); |
258 | | - |
259 | | - // trim off the 'px' on the end of pixel measurement numbers (ignore if present) |
260 | | - if ( substr( $this->width, -2 ) == 'px' ) |
261 | | - $this->width = (int) substr( $this->width, 0, -2 ); |
262 | | - |
263 | | - if ( substr( $this->height, - 2 ) == 'px' ) |
264 | | - $this->height = (int) substr( $this->height, 0, -2 ); |
265 | | - |
266 | | - } |
267 | | - |
268 | | - /** |
269 | | - * This sets the map bounds |
270 | | - * |
| 398 | + * Reads $this->mArgsError and returns HTML explaining what the |
| 399 | + * user did wrong. |
271 | 400 | */ |
272 | | - public function setBounds() { |
273 | | - |
274 | | - /* Determine scale and map bounds for static render request */ |
275 | | - $this->resolution = $this->resolutions[round( $this->zoom )]; |
276 | | - $this->scale = self::getScaleFromResolution( $this->resolution ); |
277 | | - |
278 | | - /* |
279 | | - * Calculate width for Mapnik output using a standard pixel size of 0.00028m |
280 | | - * @see http://trac.mapnik.org/wiki/ScaleAndPpi |
281 | | - */ |
282 | | - $w_deg = $this->width * SlippyMap::$PIXEL_SIZE * $this->scale; |
283 | | - $h_deg = $this->height * SlippyMap::$PIXEL_SIZE * $this->scale; |
284 | | - |
285 | | - $center = array( $this->lon, $this->lat ); |
286 | | - if ( SlippyMap::$MAP_OPTIONS['sphericalMercator'] ) { |
287 | | - // Calculate bounds within a spherical mercator projection if that is what the scale is based on |
288 | | - $mercatorCenter = SlippyMap::forwardMercator( $center ); |
289 | | - $mbounds = array( |
290 | | - $mercatorCenter[0] - $w_deg / 2, |
291 | | - $mercatorCenter[1] - $h_deg / 2, |
292 | | - $mercatorCenter[0] + $w_deg / 2, |
293 | | - $mercatorCenter[1] + $h_deg / 2 |
294 | | - ); |
295 | | - $this->bounds = SlippyMap::inverseMercator( $mbounds ); |
296 | | - } |
297 | | - else { |
298 | | - // Calculate bounds within WGS84 |
299 | | - $this->bounds = array( $center[0] - $w_deg / 2, $center[1] - $h_deg / 2, $center[0] + $w_deg / 2, $center[1] + $h_deg / 2 ); |
300 | | - } |
| 401 | + public function renderErrors() { |
| 402 | + return $this->mParser->recursiveTagParse( $this->errorHtml() ); |
301 | 403 | } |
302 | 404 | |
303 | | - /** |
304 | | - * This retreives the image source |
305 | | - * |
306 | | - */ |
307 | | - public function getImgSrc() { |
308 | | - if ( isset( SlippyMap::$MAP_OPTIONS['staticRenderService'] ) ) { |
309 | | - return $this->parameterize( SlippyMap::$MAP_OPTIONS['staticRenderService'], |
310 | | - array( 'bbox' => implode( ',', $this->bounds ), |
311 | | - 'scale' => $this->scale, |
312 | | - 'lat' => $this->lat, |
313 | | - 'long' => $this->lon, |
314 | | - 'z' => $this->zoom, |
315 | | - 'w' => $this->width, |
316 | | - 'h' => $this->height, |
317 | | - 'format' => SlippyMap::$DEFAULT_IMAGE_FORMAT |
318 | | - ) |
319 | | - ); |
320 | | - } |
321 | | - } |
322 | | - |
323 | | - /** |
324 | | - * Substitutes parameters in a template using double hash sign delimiters, for example: |
325 | | - * |
326 | | - * <code> |
327 | | - * <tag xml:lang="##lang##"/> |
328 | | - * </code> |
329 | | - * |
330 | | - * A corresponding parameter "lang" may then be used to provide a replacement that is |
331 | | - * transparently substituted. |
332 | | - * |
333 | | - * @param string $template The template text |
334 | | - * @param array $params A map with parameter names as keys and their replacements as values |
335 | | - * @return string Parameterized text |
336 | | - */ |
337 | | - protected static function parameterize( $template, $params ) { |
338 | | - foreach ( $params as $key => $value ) { |
339 | | - $template = str_replace( "##{$key}##", $value, $template ); |
340 | | - } |
341 | | - return $template; |
342 | | - } |
343 | | - |
344 | | - /** |
345 | | - * Borrowed from OpenLayers.Util.getScaleFromResolution |
346 | | - */ |
347 | | - protected function getScaleFromResolution( $resolution ) { |
348 | | - return $resolution * SlippyMap::$INCHES_PER_UNIT[SlippyMap::$MAP_OPTIONS['unit']] * SlippyMap::$DOTS_PER_INCH; |
349 | | - } |
350 | | - |
351 | | - /** |
352 | | - * Determines resolutions and scales based on a maximum resolution and number of zoom levels |
353 | | - * Borrowed from OpenLayers.Layer.initResolutions |
354 | | - */ |
355 | | - protected function initResolutionsAndScales() { |
356 | | - $this->resolutions = array(); |
357 | | - $base = 2; |
358 | | - |
359 | | - for ( $i = 0; $i < SlippyMap::$MAP_OPTIONS['numZoomLevels']; $i++ ) { |
360 | | - $this->resolutions[$i] = SlippyMap::$MAP_OPTIONS['maxResolution'] / pow( $base, $i ); |
361 | | - $this->scales[$i] = $this->getScaleFromResolution( $this->resolutions[$i] ); |
362 | | - } |
363 | | - } |
364 | | - |
365 | | - /** |
366 | | - * Convert from WGS84 to spherical mercator |
367 | | - */ |
368 | | - protected static function forwardMercator($lonlat) { |
369 | | - for ($i=0; $i<count($lonlat); $i+=2) { |
370 | | - /* lon */ |
371 | | - $lonlat[$i] = $lonlat[$i] * (2 * M_PI * 6378137 / 2.0) / 180.0; |
372 | | - |
373 | | - /* lat */ |
374 | | - $lonlat[$i+1] = log(tan((90 + $lonlat[$i+1]) * M_PI / 360.0)) / (M_PI / 180.0); |
375 | | - $lonlat[$i+1] = $lonlat[$i+1] * (2 * M_PI * 6378137 / 2.0) / 180.0; |
376 | | - } |
377 | | - return $lonlat; |
378 | | - } |
379 | | - |
380 | | - /** |
381 | | - * Convert from spherical mercator to WGS84 |
382 | | - */ |
383 | | - protected static function inverseMercator($lonlat) { |
384 | | - for ($i=0; $i<count($lonlat); $i+=2) { |
385 | | - /* lon */ |
386 | | - $lonlat[$i] = $lonlat[$i] / ((2 * M_PI * 6378137 / 2.0) / 180.0); |
387 | | - |
388 | | - /* lat */ |
389 | | - $lonlat[$i+1] = $lonlat[$i+1] / ((2 * M_PI * 6378137 / 2.0) / 180.0); |
390 | | - $lonlat[$i+1] = 180.0 / M_PI * (2 * atan(exp($lonlat[$i+1] * M_PI / 180.0)) - M_PI / 2); |
391 | | - } |
392 | | - |
393 | | - return $lonlat; |
394 | | - } |
395 | | - |
396 | | - /** |
397 | | - * This checks that the map mode is valid |
398 | | - * |
399 | | - * @param $mode string |
400 | | - */ |
401 | | - public function validMode( $mode ) { |
402 | | - global $wgMapModes; |
403 | | - $this->errors = ''; |
404 | | - |
405 | | - if ( ! in_array( $mode, $wgMapModes ) ) { |
406 | | - $this->errors .= wfMsg( 'slippymap_invalidmode', htmlspecialchars( $this->mode ) ); |
407 | | - return false; |
408 | | - } |
409 | | - |
410 | | - return true; |
411 | | - } |
412 | | - |
413 | | - /** |
414 | | - * This validates the map parameters |
415 | | - * |
416 | | - */ |
417 | | - public function validate() { |
418 | | - wfLoadExtensionMessages( 'SlippyMap' ); |
419 | | - $errors = null; |
420 | | - |
421 | | - if ( $this->lat == '' ) $errors .= wfMsg( 'slippymap_latmissing' ) . ' '; |
422 | | - if ( $this->lon == '' ) $errors .= wfMsg( 'slippymap_lonmissing' ) . ' '; |
423 | | - if ( $this->zoom == '' ) $errors .= wfMsg( 'slippymap_zoommissing' ) . ' '; |
424 | | - |
425 | | - if ( $errors == '' ) { |
426 | | - // no errors so far. Now check the values |
427 | | - if ( !is_numeric( $this->width ) ) { |
428 | | - $errors = wfMsg( 'slippymap_widthnan', $this->width ); |
429 | | - } else if ( !is_numeric( $this->height ) ) { |
430 | | - $errors = wfMsg( 'slippymap_heightnan', $this->height ); |
431 | | - } else if ( !is_numeric( $this->zoom ) ) { |
432 | | - $errors = wfMsg( 'slippymap_zoomnan', $this->zoom ); |
433 | | - } else if ( !is_numeric( $this->lat ) ) { |
434 | | - $errors = wfMsg( 'slippymap_latnan', $this->lat ); |
435 | | - } else if ( !is_numeric( $this->lon ) ) { |
436 | | - $errors = wfMsg( 'slippymap_lonnan', $this->lon ); |
437 | | - } else if ( $this->width > 1000 ) { |
438 | | - $errors = wfMsg( 'slippymap_widthbig' ); |
439 | | - } else if ( $this->width < 100 ) { |
440 | | - $errors = wfMsg( 'slippymap_widthsmall' ); |
441 | | - } else if ( $this->height > 1000 ) { |
442 | | - $errors = wfMsg( 'slippymap_heightbig' ); |
443 | | - } else if ( $this->height < 100 ) { |
444 | | - $errors = wfMsg( 'slippymap_heightsmall' ); |
445 | | - } else if ( $this->lat > 90 ) { |
446 | | - $errors = wfMsg( 'slippymap_latbig' ); |
447 | | - } else if ( $this->lat < -90 ) { |
448 | | - $errors = wfMsg( 'slippymap_latsmall' ); |
449 | | - } else if ( $this->lon > 180 ) { |
450 | | - $errors = wfMsg( 'slippymap_lonbig' ); |
451 | | - } else if ( $this->lon < -180 ) { |
452 | | - $errors = wfMsg( 'slippymap_lonsmall' ); |
453 | | - } else if ( $this->zoom < 0 ) { |
454 | | - $errors = wfMsg( 'slippymap_zoomsmall' ); |
455 | | - } else if ( $this->zoom == 18 ) { |
456 | | - $errors = wfMsg( 'slippymap_zoom18' ); |
457 | | - } else if ( $this->zoom > 17 ) { |
458 | | - $errors = wfMsg( 'slippymap_zoombig' ); |
| 405 | + protected function errorHtml() { |
| 406 | + if ( count( $this->mArgsError ) == 1 ) { |
| 407 | + return |
| 408 | + Xml::tags( |
| 409 | + 'strong', |
| 410 | + array( 'class' => 'error' ), |
| 411 | + wfMsg( 'slippymap_error', |
| 412 | + wfMsg( 'slippymap_extname' ), |
| 413 | + $this->mArgsError[0] |
| 414 | + ) |
| 415 | + ); |
| 416 | + } else { |
| 417 | + $li = ''; |
| 418 | + foreach ($this->mArgsError as $error) { |
| 419 | + $li .= Xml::tags( |
| 420 | + 'li', |
| 421 | + array( 'class' => 'error' ), |
| 422 | + $error |
| 423 | + ); |
459 | 424 | } |
| 425 | + return |
| 426 | + Xml::tags( |
| 427 | + 'strong', |
| 428 | + array( 'class' => 'error' ), |
| 429 | + wfMsgNoTrans( 'slippymap_errors', wfMsgNoTrans( 'slippymap_extname' ) ) |
| 430 | + . |
| 431 | + Xml::tags( |
| 432 | + 'ul', |
| 433 | + null, |
| 434 | + $li |
| 435 | + ) |
| 436 | + ); |
460 | 437 | } |
461 | | - |
462 | | - return $errors; |
463 | 438 | } |
464 | | - |
465 | | - /** |
466 | | - * This outputs the errors |
467 | | - * |
468 | | - * @return string error |
469 | | - */ |
470 | | - public function getErrors() { |
471 | | - if ( $this->errors != "" ) { |
472 | | - // Something was wrong. Spew the error message and input text. |
473 | | - $output = ''; |
474 | | - $output .= "<span class=\"error\">" . wfMsg( 'slippymap_maperror' ) . ' ' . $this->errors . "</span><br />"; |
475 | | - $output .= htmlspecialchars( $input ); |
476 | | - return $output; |
477 | | - } |
478 | | - } |
479 | 439 | } |
Index: trunk/extensions/SlippyMap/SlippyMap.js |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | var mapId = 0; |
48 | 48 | var layer = null; |
49 | 49 | |
50 | | -if (autoInitMaps) { |
| 50 | +if (wgSlippyMapSlippyByDefault) { |
51 | 51 | addOnloadHook(slippymap_init); |
52 | 52 | } |
53 | 53 | |
— | — | @@ -164,7 +164,6 @@ |
165 | 165 | {T:"104"}, { tileSize: new OpenLayers.Size(512,512) }); |
166 | 166 | // TODO |
167 | 167 | } else if (this.layer == 'landsat') { |
168 | | - |
169 | 168 | // TODO |
170 | 169 | } else if (this.layer == 'bluemarble') { |
171 | 170 | |
— | — | @@ -206,7 +205,7 @@ |
207 | 206 | |
208 | 207 | prompt( |
209 | 208 | wgSlippyMapCode, |
210 | | - "<slippymap h=" + size.h + " w=" + size.w + " z=" + Z + " lat=" + LL.lat + " lon=" + LL.lon + " mode=" + this.mode + " layer=" + this.layer + " marker=" + this.marker + " />" |
| 209 | + "<slippymap lat=" + LL.lat + " lon=" + LL.lon + " zoom=" + Z + " width=" + size.w + " height=" + size.h + " mode=" + this.mode + " layer=" + this.layer + (this.marker == 0 ? "" : " marker=" + this.marker) + " />" |
211 | 210 | ); |
212 | 211 | } |
213 | 212 | |