r61289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61288‎ | r61289 | r61290 >
Date:02:43, 20 January 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.3.
* Google Maps v3 support
Modified paths:
  • /trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispPoint.php (modified) (history)
  • /trunk/extensions/Maps/Maps.i18n.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispPoint.php
@@ -60,6 +60,7 @@
6161 public function addSpecificMapHTML() {
6262 global $wgJsMimeType;
6363
 64+ // TODO
6465 $this->output .=<<<END
6566
6667 END;
Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php
@@ -60,7 +60,19 @@
6161
6262 // TODO
6363 $this->output .=<<<END
64 -
 64+<div id="$this->mapName" style="width:100%; height:100%"></div>
 65+<script type="$wgJsMimeType"> /*<![CDATA[*/
 66+addOnloadHook(
 67+ function() {
 68+ var latlng = new google.maps.LatLng(-34.397, 150.644);
 69+ var myOptions = {
 70+ zoom: 8,
 71+ center: latlng,
 72+ mapTypeId: google.maps.MapTypeId.ROADMAP
 73+ };
 74+ var map = new google.maps.Map(document.getElementById("$this->mapName"), myOptions);
 75+}
 76+/*]]>*/ </script>
6577 END;
6678
6779 }
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php
@@ -20,7 +20,7 @@
2121 die( 'Not an entry point.' );
2222 }
2323
24 -$egMapsServices['googlemaps'] = array(
 24+$egMapsServices['googlemaps2'] = array(
2525 'pf' => array(
2626 'display_point' => array('class' => 'MapsGoogleMapsDispPoint', 'file' => 'GoogleMaps/Maps_GoogleMapsDispPoint.php', 'local' => true),
2727 'display_map' => array('class' => 'MapsGoogleMapsDispMap', 'file' => 'GoogleMaps/Maps_GoogleMapsDispMap.php', 'local' => true),
@@ -28,7 +28,7 @@
2929 'classes' => array(
3030 array('class' => 'MapsGoogleMaps', 'file' => 'GoogleMaps/Maps_GoogleMaps.php', 'local' => true)
3131 ),
32 - 'aliases' => array('google', 'googlemap', 'gmap', 'gmaps'),
 32+ 'aliases' => array('googlemaps', 'google', 'googlemap', 'gmap', 'gmaps'),
3333 );
3434
3535 /**
@@ -40,7 +40,7 @@
4141 */
4242 class MapsGoogleMaps {
4343
44 - const SERVICE_NAME = 'googlemaps';
 44+ const SERVICE_NAME = 'googlemaps2';
4545
4646 public static function initialize() {
4747 self::initializeParams();
Index: trunk/extensions/Maps/Maps.i18n.php
@@ -32,7 +32,8 @@
3333 'maps_map_cannot_be_displayed' => 'The map cannot be displayed.',
3434
3535 // Mapping services
36 - 'maps_googlemaps' => 'Google Maps',
 36+ 'maps_googlemaps2' => 'Google Maps v2',
 37+ 'maps_googlemaps3' => 'Google Maps v3',
3738 'maps_yahoomaps' => 'Yahoo! Maps',
3839 'maps_openlayers' => 'OpenLayers',
3940 'maps_osm' => 'OpenStreetMap',
@@ -41,7 +42,7 @@
4243 'maps_click_to_activate' => 'Click to activate map',
4344 'maps_centred_on' => 'Map centered on $1, $2.',
4445
45 - // Google Maps overlays
 46+ // Google Maps v2 overlays
4647 'maps_overlays' => 'Overlays',
4748 'maps_photos' => 'Photos',
4849 'maps_videos' => 'Videos',
@@ -96,7 +97,7 @@
9798 'maps_unrecognized_coords_for' => '{{PLURAL:$2|الإحداثي التالي|الإحداثيات التالية}} لم يتم التعرف عليها و {{PLURAL:$2|تمت|تمت}} إزالتها من الخريطة:
9899 $1',
99100 'maps_map_cannot_be_displayed' => 'الخريطة لا يمكن عرضها.',
100 - 'maps_googlemaps' => 'خرائط جوجل',
 101+ 'maps_googlemaps2' => 'خرائط جوجل',
101102 'maps_yahoomaps' => 'خرائط ياهو!',
102103 'maps_openlayers' => 'أوبن لايرز',
103104 'maps_osm' => 'أوبن ستريت ماب',
@@ -114,7 +115,7 @@
115116 */
116117 $messages['arz'] = array(
117118 'maps_name' => 'خرايط',
118 - 'maps_googlemaps' => 'خرايط جوجل',
 119+ 'maps_googlemaps2' => 'خرايط جوجل',
119120 'maps_yahoomaps' => 'خرايط ياهو',
120121 );
121122
@@ -672,7 +673,7 @@
673674 'maps_unrecognized_coords_for' => 'De volgende {{PLURAL:$2|coördinaat is niet herkend en is|coördinaten zijn niet herkend en zijn}} weggelaten uit de kaart:
674675 $1.',
675676 'maps_map_cannot_be_displayed' => 'De kaart kan niet weergegeven worden.',
676 - 'maps_googlemaps' => 'Google Maps',
 677+ 'maps_googlemaps2' => 'Google Maps v2',
677678 'maps_yahoomaps' => 'Yahoo! Maps',
678679 'maps_openlayers' => 'OpenLayers',
679680 'maps_click_to_activate' => 'Klik om de kaart te activeren',
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -69,17 +69,17 @@
7070
7171 # Array of String. Array containing all the mapping services that will be made available to the user.
7272 # Currently Maps provides the following services: googlemaps, yahoomaps, openlayers
73 -$egMapsAvailableServices = array('googlemaps', 'googlemaps3', 'yahoomaps', 'openlayers', 'osm');
 73+$egMapsAvailableServices = array('googlemaps2', 'googlemaps3', 'yahoomaps', 'openlayers', 'osm');
7474
7575 # String. The default mapping service, which will be used when no default service is present in the
7676 # $egMapsDefaultServices array for a certain feature. A service that supports all features is recommended.
7777 # This service needs to be enabled, if not, the first one from the available services will be taken.
78 -$egMapsDefaultService = 'googlemaps';
 78+$egMapsDefaultService = 'googlemaps2';
7979
8080 # Array of String. The default mapping service for each feature, which will be used when no valid service is provided by the user.
8181 # Each service needs to be enabled, if not, the first one from the available services will be taken.
8282 # Note: The default service needs to be available for the feature you set it for, since it's used as a fallback mechanism.
83 -$egMapsDefaultServices = array('pf' => 'googlemaps');
 83+$egMapsDefaultServices = array('pf' => 'googlemaps2');
8484
8585
8686
@@ -94,7 +94,7 @@
9595 'class' => 'MapsGoogleGeocoder',
9696 'file' => 'Geocoders/Maps_GoogleGeocoder.php',
9797 'local' => true,
98 - 'overrides' => array('googlemaps'),
 98+ 'overrides' => array('googlemaps2'),
9999 ),
100100 'yahoo' => array(
101101 'class' => 'MapsYahooGeocoder',

Follow-up revisions

RevisionCommit summaryAuthorDate
r61292Follow-up r61289: Update optional messages for translatewikiraymond06:51, 20 January 2010

Status & tagging log