r61351 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61350‎ | r61351 | r61352 >
Date:02:09, 22 January 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.3.
* Google Maps v3 support
Modified paths:
  • /trunk/extensions/Maps/GoogleMaps3/GoogleMap3Functions.js (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispPoint.php (modified) (history)
  • /trunk/extensions/Maps/Maps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispPoint.php
@@ -34,7 +34,7 @@
3535 $this->elementNamePrefix = $egMapsGMaps3Prefix;
3636 $this->defaultZoom = $egMapsGMaps3Zoom;
3737
38 - $this->markerStringFormat = ''; // TODO
 38+ $this->markerStringFormat = 'getGMaps3MarkerData(lat, lon, \'title\', \'label\', "icon")';
3939
4040 $this->spesificParameters = array(
4141 );
@@ -68,9 +68,11 @@
6969 initGMap3("$this->mapName", {
7070 zoom: $this->zoom,
7171 lat: $this->centre_lat,
72 - lon: $this->centre_lon,
 72+ lon: $this->centre_lon,
 73+ types: [$this->types],
 74+ mapTypeId: $this->type
7375 },
74 - []
 76+ [$this->markerString]
7577 )
7678 );
7779 /*]]>*/ </script>
Index: trunk/extensions/Maps/GoogleMaps3/GoogleMap3Functions.js
@@ -10,11 +10,16 @@
1111 /**
1212 * Created a new Map object with the provided properties and markers.
1313 */
14 -function initGMap3(name, options, markers) {
 14+function initGMap3(name, options, markerData) {
1515 options.center = new google.maps.LatLng(options.lat, options.lon);
1616
1717 var map = new google.maps.Map(document.getElementById(name), options);
1818
19 - map.mapTypes = options.types;
20 - map.setMapTypeId(options.type);
 19+ // TODO: types - http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeRegistry
 20+
 21+ // TODO: markers
 22+}
 23+
 24+function getGMaps3MarkerData(lat, lon, title, label, icon) {
 25+ return {position: new google.maps.LatLng(lat, lon), title: title, label: label, icon: icon};
2126 }
\ No newline at end of file
Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php
@@ -67,7 +67,7 @@
6868 lat: $this->centre_lat,
6969 lon: $this->centre_lon,
7070 types: [$this->types],
71 - type: $this->type,
 71+ mapTypeId: $this->type
7272 },
7373 []
7474 )
Index: trunk/extensions/Maps/Maps.php
@@ -33,7 +33,7 @@
3434 echo '<b>Warning:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.';
3535 }
3636 else {
37 - define('Maps_VERSION', '0.5.3 a1');
 37+ define('Maps_VERSION', '0.5.3 a2');
3838
3939 $egMapsScriptPath = $wgScriptPath . '/extensions/Maps';
4040 $egMapsIP = $IP . '/extensions/Maps';

Status & tagging log