← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~sinzui/launchpad/remove-gmaps-0 into lp:launchpad/devel

 

Curtis Hovey has proposed merging lp:~sinzui/launchpad/remove-gmaps-0 into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #277276 It should be possible to set your timezone without showing the map
  https://bugs.launchpad.net/bugs/277276
  #625556 gmap2 loading must be controlled with a featureflag
  https://bugs.launchpad.net/bugs/625556
  #633178 remove gmap code
  https://bugs.launchpad.net/bugs/633178


This is my branch to remove Google maps.

    lp:~sinzui/launchpad/remove-gmaps-0
    Diff size: 1263 (-846, +62)
    Launchpad bug:
          https://bugs.launchpad.net/bugs/277276
          https://bugs.launchpad.net/bugs/625556
          https://bugs.launchpad.net/bugs/633178
    Test command: ./bin/test -vv \
          -t personlocation -t location-widget -t person-views -t team-views \
          -t team-map
    Pre-implementation: statik, jml
    Target release: 10.10


Remove Google maps
------------------

This branch removes the Google map dependency from Launchpad. Launchpad still
has a concept of location and map, but they are hidden. We may remove the
map concept in October if there is no progress in getting a map tile server.
This branch address 3 specific issues:

https://bugs.launchpad.net/bugs/633178
    Remove Google maps (deletes)

https://bugs.launchpad.net/bugs/625556
    Remove the gmap2 feature flag because nothing uses gmaps (deletes)

https://bugs.launchpad.net/bugs/277276
    Allow users to set their timezone without using a map
    This last point requires rewrites of code (adds)


Rules
-----

    * Update the location widget to only render the time zone
    * Simplify the edit location form because it is not doing anything
      special anymore
    * Remove the Google map calls from the templates
    * Remove the gmap2 calls from the view code
    * Remove the mapping library that uses Google maps
    * Remove the gmap2 feature flag


QA
--

    * Visit your profile page
    * Verify a map is not displayed
    * Choose to edit your time zone
    * Verify a map is not shown and that there is no javascript error.
    * Set your timezone and save
    * Verify your timezone is set

    * Visit https://edge.launchpad.net/~launchpad
    * Verify a map is not shown.
    * Assuming someone bookmarked the map page,
      visit https://edge.launchpad.net/~launchpad/+map
    * Verify a map is not shown and that there is no JS error.


Lint
----

Linting changed files:
  lib/canonical/launchpad/doc/location-widget.txt
  lib/canonical/launchpad/webapp/servers.py
  lib/canonical/widgets/location.py
  lib/canonical/widgets/templates/location.pt
  lib/lp/app/templates/base-layout-macros.pt
  lib/lp/registry/browser/__init__.py
  lib/lp/registry/browser/configure.zcml
  lib/lp/registry/browser/person.py
  lib/lp/registry/browser/team.py
  lib/lp/registry/browser/tests/person-views.txt
  lib/lp/registry/browser/tests/team-views.txt
  lib/lp/registry/doc/personlocation.txt
  lib/lp/registry/stories/location/personlocation-edit.txt
  lib/lp/registry/stories/location/personlocation.txt
  lib/lp/registry/stories/location/team-map.txt
  lib/lp/registry/templates/person-portlet-map.pt
  lib/lp/registry/templates/team-index.pt
  lib/lp/registry/templates/team-portlet-map.pt

Lint wants me to fix some test format issues. I can do this before I land
the branch.

Test
----

    * lib/canonical/launchpad/doc/location-widget.txt
      * Removed tests for gmap.
    * lib/lp/registry/browser/tests/person-views.txt
      * Removed tests that shows how gmaps were used by the view.
    * lib/lp/registry/browser/tests/team-views.txt
      * Removed tests that showed maps use gmaps.
      * The map tests remain because there is a small chance we can use OSM
        to provide maps.
    * lib/lp/registry/doc/personlocation.txt
      * Remove the gmap portion of the location object tests.
    * lib/lp/registry/stories/location/personlocation-edit.txt
      * Removed the gmap portion of the edit location test.
    * lib/lp/registry/stories/location/personlocation.txt
      * Removed gmap portion of the test.
    * lib/lp/registry/stories/location/team-map.txt
      * Removed gmap portion of the test.
      * The map tests remain because there is a small chance we can use OSM
        to provide maps.


Implementation
--------------

    * lib/canonical/launchpad/webapp/servers.py
      * Removed code and tests to support gmap2 flags in the request.
    * lib/canonical/widgets/location.py
      * Removed gmap2.
      * Updated the timezone help text from the template to the field.
    * lib/canonical/widgets/templates/location.pt
      * Removed the map, but kept the hidden lat-long fields so that the
        widget continues to work.
      * Moved the help text to the field.
    * lib/lp/app/templates/base-layout-macros.pt
      * Removed the gmap2 mapping library and rules to include it in the page.
    * lib/lp/registry/browser/__init__.py
      * Removed the MapMixin and the feature flag.
    * lib/lp/registry/browser/configure.zcml
      * Switched +editlocation to use the generic template.
      * Removed the unused team view...teams do not have a link to edit their
        location.
    * lib/lp/registry/browser/person.py
      * Removed the gmap2 setup code.
      * Removed the unused TeamEditLocationView
      * Simplified the user +editlocation since it does not need gmaps and
        we only need to show time zone at this time.
    * lib/lp/registry/browser/team.py
      * Removed the gmap2 setup code.
    * lib/lp/registry/templates/person-portlet-map.pt
      * Removed the gmap. This template also rendered timezone so it must
        remain.
    * lib/lp/registry/templates/team-index.pt
      * Removed the call to render the small map.
    * lib/lp/registry/templates/team-portlet-map.pt
      * Removed the gmap check.
-- 
https://code.launchpad.net/~sinzui/launchpad/remove-gmaps-0/+merge/36169
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/remove-gmaps-0 into lp:launchpad/devel.
=== modified file 'lib/canonical/launchpad/doc/location-widget.txt'
--- lib/canonical/launchpad/doc/location-widget.txt	2010-08-11 15:47:27 +0000
+++ lib/canonical/launchpad/doc/location-widget.txt	2010-09-21 16:51:00 +0000
@@ -9,22 +9,18 @@
     >>> salgado = getUtility(IPersonSet).getByName('salgado')
     >>> field = LocationField(__name__='location', title=u'Location')
 
-JavaScript and JSON are used in the Google Maps API.  By setting the
-needs_gmap2 and needs_json attributes of the request, the main template
+JavaScript and JSON are used by the location widget.  By setting the
+needs_json attributes of the request, the main template
 will include the necessary code to enable these features.
 
     >>> bound_field = field.bind(salgado)
     >>> request = LaunchpadTestRequest(
     ...     # Let's pretend requests are coming from Brazil.
     ...     environ={'REMOTE_ADDR': '201.13.165.145'})
-    >>> request.needs_gmap2
-    False
     >>> request.needs_json
     False
 
     >>> widget = LocationWidget(bound_field, request)
-    >>> request.needs_gmap2
-    True
     >>> request.needs_json
     True
 

=== modified file 'lib/canonical/launchpad/webapp/servers.py'
--- lib/canonical/launchpad/webapp/servers.py	2010-09-16 21:08:51 +0000
+++ lib/canonical/launchpad/webapp/servers.py	2010-09-21 16:51:00 +0000
@@ -522,7 +522,6 @@
         self.needs_datepicker_iframe = False
         self.needs_datetimepicker_iframe = False
         self.needs_json = False
-        self.needs_gmap2 = False
         super(BasicLaunchpadRequest, self).__init__(
             body_instream, environ, response)
 
@@ -834,12 +833,10 @@
     >>> request.needs_datepicker_iframe
     False
 
-    And for JSON and GMap2:
+    And for JSON:
 
     >>> request.needs_json
     False
-    >>> request.needs_gmap2
-    False
 
     """
     implements(INotificationRequest, IBasicLaunchpadRequest, IParticipation,
@@ -857,7 +854,6 @@
         self.needs_datepicker_iframe = False
         self.needs_datetimepicker_iframe = False
         self.needs_json = False
-        self.needs_gmap2 = False
         # stub out the FeatureController that would normally be provided by
         # the publication mechanism
         self.features = NullFeatureController()

=== modified file 'lib/canonical/widgets/location.py'
--- lib/canonical/widgets/location.py	2010-09-11 19:25:13 +0000
+++ lib/canonical/widgets/location.py	2010-09-21 16:51:00 +0000
@@ -42,6 +42,7 @@
     This is a single object which contains the latitude, longitude and time
     zone of the location.
     """
+
     def __init__(self, latitude, longitude, time_zone):
         self.latitude = latitude
         self.longitude = longitude
@@ -59,13 +60,16 @@
         # json-handling, so we flag that in the request so that our
         # base-layout includes the necessary javascript files.
         request.needs_json = True
-        request.needs_gmap2 = True
         super(LocationWidget, self).__init__(context, request)
         fields = form.Fields(
             Float(__name__='latitude', title=_('Latitude'), required=False),
             Float(__name__='longitude', title=_('Longitude'), required=False),
-            Choice(__name__='time_zone', vocabulary='TimezoneName',
-                   title=_('Time zone'), required=True))
+            Choice(
+                __name__='time_zone', vocabulary='TimezoneName',
+                title=_('Time zone'), required=True,
+                description=_(
+                    'Once the time zone is correctly set, events '
+                    'in Launchpad will be displayed in local time.')))
         # This will be the initial zoom level and center of the map.
         self.zoom = 2
         self.center_lat = 15.0

=== modified file 'lib/canonical/widgets/templates/location.pt'
--- lib/canonical/widgets/templates/location.pt	2009-07-17 17:59:07 +0000
+++ lib/canonical/widgets/templates/location.pt	2010-09-21 16:51:00 +0000
@@ -2,32 +2,11 @@
   xmlns:tal="http://xml.zope.org/namespaces/tal";
   xmlns:i18n="http://xml.zope.org/namespaces/i18n";
   omit-tag="">
-<tal:latitude replace="structure view/latitude_widget/hidden" />
-<tal:longitude replace="structure view/longitude_widget/hidden" />
-<p class="formHelp">
-  You can drag the marker to change the location, and zoom into the map to
-  see more details and verify the location's accuracy.
-  If your mouse has a scroll wheel, use it to more quickly zoom the
-  map in and out. Double-clicking will also zoom in and move the
-  marker. Please <strong>do not disclose sensitive information such
-  as a specific home location</strong> without the permission of
-  the person involved - rather just indicate a city so that the time
-  zone is correct.
-</p>
-<p id="map_div" style="width: 100%; height: 300px; border: 1px; float: left;"
-  ></p>
-
-<tal:render-map replace="structure view/map_javascript" />
-
-<p>
-  <label>Time zone:
-  <img id="tz_spinner" src="/@@/nospin" width="14" height="14" />
-  </label>
-  <tal:latitude replace="structure view/time_zone_widget" />
-</p>
-
-<p class="formHelp">
-  Once the time zone is correctly set, events in Launchpad will be
-  displayed in local time.
-</p>
+  <tal:latitude replace="structure view/latitude_widget/hidden" />
+  <tal:longitude replace="structure view/longitude_widget/hidden" />
+  <div>
+      <tal:time-zone replace="structure view/time_zone_widget" />
+  </div>
+  <div class="formHelp"
+     tal:content="view/time_zone_widget/hint" />
 </tal:root>

=== removed file 'lib/lp/app/javascript/mapping.js'
--- lib/lp/app/javascript/mapping.js	2010-07-15 10:55:27 +0000
+++ lib/lp/app/javascript/mapping.js	1970-01-01 00:00:00 +0000
@@ -1,365 +0,0 @@
-/**
- * Launchpad mapping tools.
- *
- * Map rendering and marker creation depends on the Google GMap2 library.
- *
- * @module lp.app.mapping
- * @namespace lp.app.mapping
- * @required Google GMap2
- */
-YUI.add('lp.app.mapping', function(Y) {
-    var module = Y.namespace('lp.app.mapping');
-
-    module.RETURN_FALSE = function() {return false;};
-    module.RETURN_NULL = function() {return null;};
-
-    // Replace the crucial GMap functions so that the supporting functions
-    // will work if the GMap script is not loaded.
-    var gBrowserIsCompatible = module.RETURN_FALSE;
-    var gDownloadUrl = module.RETURN_NULL;
-
-    module.has_gmaps = (typeof(GBrowserIsCompatible) == 'function');
-
-    if (module.has_gmaps) {
-        // The GMap2 is is loaded; use the real functions.
-        // jslint does not like functions that look like classes.
-        gBrowserIsCompatible = GBrowserIsCompatible;
-        gDownloadUrl = GDownloadUrl;
-    }
-
-
-    /**
-     * Add a marker for each participant.
-     *
-     * @function setMarkersInfoWindow
-     * @param {String} data the participant XML.
-     * @param {GMap2} map the Google map to add the markers to.
-     * @param {GLatLngBounds} required_bounds the boundaries or null.
-     * @param {limit} optional max number of markers to set.
-     */
-    module.setMarkersInfoWindow = function(data, map, required_bounds,
-                                            limit) {
-        var xml = GXml.parse(data);
-        var markers = xml.documentElement.getElementsByTagName("participant");
-        var participant = null;
-
-        function attrToProp(attr) {
-            participant[attr.name] = attr.value;
-        }
-
-        limit = typeof(limit) == 'number' ? limit : markers.length;
-        if (markers.length < limit) {
-            limit = markers.length;
-        }
-
-        for (var i = 0; i < limit; i++) {
-            participant = {};
-            Y.Array.each(markers[i].attributes, attrToProp);
-            var point = new GLatLng(
-                parseFloat(participant.lat), parseFloat(participant.lng));
-            if (required_bounds) {
-                required_bounds.extend(point);
-            }
-            var marker = new GMarker(point);
-            marker.bindInfoWindowHtml(Y.substitute([
-                '<div style="text-align: center">',
-                '<a href="{url}">{displayname} ({name})</a><br />',
-                '{logo_html}<br />',
-                'Local time: {local_time}</div>'].join(""),
-                participant));
-            map.addOverlay(marker);
-        }
-    };
-
-    /**
-     * Add a marker for each participant, and update the zoom level.
-     *
-     * @function setMarkersInfoWindowForSmallMap
-     * @param {String} data the participant XML.
-     * @param {GMap2} map the Google map to add the markers to.
-     * @param {limit} optional max number of markers to set.
-     */
-    module.setMarkersInfoWindowForSmallMap = function(data, map, limit) {
-        var required_bounds = new GLatLngBounds();
-        module.setMarkersInfoWindow(data, map, required_bounds, limit);
-        var zoom_level = map.getBoundsZoomLevel(required_bounds);
-        // Some browsers do not display the map when the zoom_level is at the
-        // end of the range, reduce the zoom_level by 1.
-        zoom_level = Math.min(4, zoom_level - 1);
-        map.setZoom(zoom_level);
-    };
-
-    /**
-     * Set the timezone field to the lat-log location.
-     *
-     * @function setLocation
-     * @param {Number} lat a GLatLng.lat bounded number.
-     * @param {Number} lng a GLatLng.lng bounded number.
-     * @parma {String} geoname the user-name to make geonames requests.
-     * @param {String} tz_name the id of the timezone field.
-     * @param {String} lat_name the id of the latitude field.
-     * @param {String} lng_name the id of the longitude field.
-     */
-    module.setLocation = function(lat, lng, geoname,
-                                   tz_name, lat_name, lng_name) {
-        Y.one(Y.DOM.byId(lat_name)).set('value', lat);
-        Y.one(Y.DOM.byId(lng_name)).set('value', lng);
-        var spinner = Y.one('#tz_spinner');
-        spinner.set('src', '/@@/spinner');
-
-        function succeeded() {
-            if (request.readyState == 4) {
-                if (request.responseText) {
-                    var tz = request.responseJSON.timezoneId;
-                    Y.one(Y.DOM.byId(tz_name)).set('value', tz);
-                    spinner.set('src', '/@@/nospin');
-                }
-            }
-        }
-
-        var url = 'http://ba-ws.geonames.net/timezoneJSON' +
-            '?username=' + geoname + '&lat=' + lat + '&lng=' + lng;
-        // This is a cross-site script request.
-        var request = new JSONScriptRequest();
-        request.open("GET", url);
-        request.onreadystatechange = succeeded;
-        request.send(null);
-    };
-
-    /**
-     * Show/hide all small maps in pages.
-     *
-     * The state is stored as ``small_maps`` in the launchpad_views cookie.
-     *
-     * @function toggleShowSmallMaps
-     * @param {Event} e the event for this callback.
-     */
-    module.toggleShowSmallMaps = function (checkbox) {
-        var is_shown = checkbox.get('checked');
-        Y.lp.launchpad_views.set('small_maps', is_shown);
-        var display = is_shown ? 'block' : 'none';
-        var maps = Y.all('.small-map');
-        maps.each(function(map) {map.setStyle('display', display);});
-        if (is_shown && !module.has_gmaps) {
-            // The server must add the Google GMap2 dependencies to the page.
-            window.location.reload();
-        }
-    };
-
-    /**
-     * Add a checkbox to show/hide all small maps in pages.
-     *
-     * @function setupShowSmallMapsControl
-     * @param {String} div_id the CSS3 id of the div that controls the map.
-     */
-    module.setupShowSmallMapsControl = function (div_id) {
-        var show_small_maps = Y.lp.launchpad_views.get('small_maps');
-        var checkbox = Y.Node.create(
-            '<input type="checkbox" name="show_small_maps" />');
-        checkbox.set(
-            'checked', show_small_maps);
-        checkbox.on(
-            'click', function(e) {module.toggleShowSmallMaps(checkbox);});
-        var label_text = Y.Node.create('Display map');
-        var label = Y.Node.create('<label></label>');
-        label.appendChild(checkbox);
-        label.appendChild(label_text);
-        var action_div = Y.one(div_id);
-        action_div.appendChild(label);
-        if (!show_small_maps) {
-            module.toggleShowSmallMaps(checkbox);
-        }
-    };
-
-    /**
-     * Create a small map with the launchpad default configuration.
-     *
-     * @function getSmallMap
-     * @param {String} div_id the id of the map div.
-     * @param {Number} center_lat a GLatLng.lat bounded number.
-     * @param {Number} center_lng a GLatLng.lng bounded number.
-     * @return {GMap2} the Google map
-     */
-    module.getSmallMap = function(div_id, center_lat, center_lng) {
-        var mapdiv = Y.DOM.byId(div_id);
-        mapdiv.style.width = '400px';
-        var map = new GMap2(mapdiv);
-        var center = new GLatLng(center_lat, center_lng);
-        map.setCenter(center, 1);
-        map.setMapType(G_NORMAL_MAP);
-        return map;
-    };
-
-    /**
-     * Create a small map of where a person is located.
-     *
-     * @function renderPersonMapSmall
-     * @param {Number} center_lat a GLatLng.lat bounded number.
-     * @param {Number} center_lng a GLatLng.lng bounded number.
-     */
-    module.renderPersonMapSmall = function(center_lat, center_lng) {
-        module.setupShowSmallMapsControl('#person_map_actions');
-        if (!gBrowserIsCompatible()) {
-            return;
-        }
-        var map = module.getSmallMap(
-            'person_map_div', center_lat, center_lng);
-        map.addControl(new GSmallZoomControl());
-        var center = new GLatLng(center_lat, center_lng);
-        var marker = new GMarker(center);
-        map.addOverlay(marker);
-    };
-
-    /**
-     * Create a small map of where a team's members are located. The map is
-     * limited to 24 members.
-     *
-     * @function renderTeamMapSmall
-     * @param {Number} center_lat a GLatLng.lat bounded number.
-     * @param {Number} center_lng a GLatLng.lng bounded number.
-     */
-    module.renderTeamMapSmall = function(center_lat, center_lng) {
-        module.setupShowSmallMapsControl('#team_map_actions');
-        if (!gBrowserIsCompatible()) {
-            return;
-        }
-        var team_map = module.getSmallMap(
-            'team_map_div', center_lat, center_lng);
-        gDownloadUrl("+mapdataltd", function(data) {
-            module.setMarkersInfoWindowForSmallMap(data, team_map);
-            });
-    };
-
-    /**
-     * Create a large map with the launchpad default configuration.
-     *
-     * @function getLargeMap
-     * @param {String} div_id the id of the map div.
-     * @return {GMap2} The Google map
-     */
-    module.getLargeMap = function(div_id) {
-        var mapdiv = Y.DOM.byId(div_id);
-        var mapheight = (parseInt(mapdiv.offsetWidth, 10) / 16 * 9);
-        mapheight = Math.min(mapheight, Y.DOM.winHeight() - 180);
-        mapheight = Math.max(mapheight, 400);
-        mapdiv.style.height = mapheight + 'px';
-        var map = new GMap2(mapdiv);
-        map.setMapType(G_HYBRID_MAP);
-        map.addControl(new GLargeMapControl());
-        map.addControl(new GMapTypeControl());
-        map.addControl(new GScaleControl());
-        map.enableScrollWheelZoom();
-        var overview_control = new GOverviewMapControl();
-        map.addControl(overview_control);
-        GEvent.addListener(map, 'zoomend', function(old, current) {
-            try {
-                if (current < 3) {
-                    overview_control.hide();
-                } else {
-                    overview_control.show();
-                }
-            } catch(e) {
-                // Google removed this undocumented method.
-            }
-        });
-        return map;
-    };
-
-    /**
-     * Create a large map of where a team's members are located.
-     *
-     * @function renderTeamMap
-     * @param {Number} min_lat the minimum GLatLng.lat bounded number.
-     * @param {Number} max_lat the maximum GLatLng.lat bounded number.
-     * @param {Number} min_lng the minimum GLatLng.lng bounded number.
-     * @param {Number} max_lng the maximum GLatLng.lng bounded number.
-     * @param {Number} center_lat a GLatLng.lat bounded number.
-     * @param {Number} center_lng a GLatLng.lng bounded number.
-     */
-    module.renderTeamMap = function(min_lat, max_lat, min_lng, max_lng,
-                                     center_lat, center_lng) {
-        if (!gBrowserIsCompatible()) {
-            return;
-        }
-        var team_map = module.getLargeMap("team_map_div");
-        var center = new GLatLng(center_lat, center_lng);
-        team_map.setCenter(center, 0);
-        var sw = new GLatLng(min_lat, min_lng);
-        var ne = new GLatLng(max_lat, max_lng);
-        var required_bounds = new GLatLngBounds(sw, ne);
-        var zoom_level = team_map.getBoundsZoomLevel(required_bounds);
-        // Some browsers do not display the map when the zoom_level is at
-        // the end of the range, reduce the zoom_level by 1.
-        zoom_level = Math.min(
-            G_HYBRID_MAP.getMaximumResolution(), zoom_level - 1);
-        team_map.setZoom(zoom_level);
-        gDownloadUrl("+mapdata", function(data) {
-            module.setMarkersInfoWindow(data, team_map);
-            });
-    };
-
-    /**
-     * Create a large, markable map of where a person is located.
-     *
-     * @function renderPersonMap
-     * @param {Number} center_lat a GLatLng.lat bounded number.
-     * @param {Number} center_lng a GLatLng.lng bounded number.
-     * @param {String} displayname the user's display name.
-     * @param {String} name the user's launchpad id.
-     * @param {String} logo_html the markup to display the user's logo.
-     * @param {String} geoname the identity used to access ba-ws.geonames.net.
-     * @param {String} tz_name the id of the timezone field.
-     * @param {String} lat_name the id of the latitude field.
-     * @param {String} lng_name the id of the longitude field.
-     * @param {number} zoom the initial zoom-level.
-     * @param {Boolean} show_marker Show the marker for the person.
-     */
-    module.renderPersonMap = function(center_lat, center_lng, displayname,
-                                       name, logo_html, geoname, lat_name,
-                                       lng_name, tz_name, zoom, show_marker) {
-        if (!gBrowserIsCompatible()) {
-            return;
-        }
-        var map = module.getLargeMap('map_div');
-        var center = new GLatLng(center_lat, center_lng);
-        map.setCenter(center, zoom);
-        var marker = new GMarker(center, {draggable: true});
-        marker.bindInfoWindowHtml(Y.substitute(
-            '<div style="text-align: center">' +
-            '<strong>{displayname}</strong><br />' +
-            '{logo_html}<br />({name})</div>',
-            {displayname: displayname, logo_html: logo_html, name: name}),
-            {maxWidth: 120});
-
-        GEvent.addListener(marker, "dragend", function() {
-            var point = marker.getLatLng();
-            module.setLocation(
-                point.lat(), point.lng(), geoname,
-                tz_name, lat_name, lng_name);
-        });
-
-        GEvent.addListener(marker, "dragstart", function() {
-            marker.closeInfoWindow();
-        });
-
-        map.addOverlay(marker);
-        if (!show_marker) {
-            marker.hide();
-        }
-
-        GEvent.addListener(map, "zoomend", function() {
-            marker.closeInfoWindow();
-        });
-
-        GEvent.addListener(map, "click", function(overlay, point) {
-            marker.setPoint(point);
-            if (marker.isHidden()) {
-                marker.show();
-                map.panTo(point);
-            }
-            module.setLocation(
-                point.lat(), point.lng(), geoname,
-                tz_name, lat_name, lng_name);
-        });
-    };
-}, "0.1", {"requires":["node", "dom", "substitute", "lp"]});

=== modified file 'lib/lp/app/templates/base-layout-macros.pt'
--- lib/lp/app/templates/base-layout-macros.pt	2010-08-20 13:33:51 +0000
+++ lib/lp/app/templates/base-layout-macros.pt	2010-09-21 16:51:00 +0000
@@ -179,8 +179,6 @@
     <script type="text/javascript"
             tal:attributes="src string:${lp_js}/app/picker.js"></script>
     <script type="text/javascript"
-            tal:attributes="src string:${lp_js}/app/mapping.js"></script>
-    <script type="text/javascript"
             tal:attributes="src string:${lp_js}/bugs/bugtracker_overlay.js"></script>
     <script type="text/javascript"
             tal:attributes="src string:${lp_js}/registry/milestoneoverlay.js"></script>
@@ -287,14 +285,6 @@
     <script type="text/javascript"
             tal:attributes="src string:${icingroot_contrib}/JSONScriptRequest.js"></script>
   </tal:needs_json>
-  <tal:needs-gmap2 condition="request/needs_gmap2">
-    <script type="text/javascript"
-            tal:condition="devmode"
-            tal:attributes="src string:http://maps.google.com/maps?${map_query};";></script>
-    <script type="text/javascript"
-            tal:condition="not: devmode"
-            tal:attributes="src string:https://maps-api-ssl.google.com/maps?oe=utf-8&amp;client=gme-canonical${map_query};";></script>
-  </tal:needs-gmap2>
 
   <metal:load-lavascript use-macro="context/@@+base-layout-macros/load-javascript" />
 

=== modified file 'lib/lp/registry/browser/__init__.py'
--- lib/lp/registry/browser/__init__.py	2010-09-03 15:02:39 +0000
+++ lib/lp/registry/browser/__init__.py	2010-09-21 16:51:00 +0000
@@ -7,7 +7,6 @@
 
 __all__ = [
     'get_status_counts',
-    'MapMixin',
     'MilestoneOverlayMixin',
     'RegistryEditFormView',
     'RegistryDeleteViewMixin',
@@ -32,7 +31,6 @@
     )
 from lp.registry.interfaces.productseries import IProductSeries
 from lp.registry.interfaces.series import SeriesStatus
-from lp.services.propertycache import cachedproperty
 
 
 class StatusCount:
@@ -258,19 +256,3 @@
     @action("Change", name='change')
     def change_action(self, action, data):
         self.updateContextFromData(data)
-
-
-class MapMixin:
-
-    @cachedproperty
-    def gmap2_enabled(self):
-        # XXX sinzui 2010-08-27 bug=625556: This is a hack to use
-        # feature flags, which are not ready for general use in the production
-        # code, but has just enough to support this use case:
-        # Do not enable gmap2 if Google's service is not operational.
-        from lp.services.features.flags import FeatureController
-
-        def in_scope(value):
-            return True
-
-        return FeatureController(in_scope).getFlag('gmap2') == 'on'

=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml	2010-08-31 10:00:44 +0000
+++ lib/lp/registry/browser/configure.zcml	2010-09-21 16:51:00 +0000
@@ -818,7 +818,7 @@
             for="lp.registry.interfaces.person.IPerson"
             class="lp.registry.browser.person.PersonEditLocationView"
             permission="launchpad.Edit"
-            template="../templates/person-editlocation.pt"/>
+            template="../../app/templates/generic-edit.pt"/>
         <browser:page
             name="+contactuser"
             for="lp.registry.interfaces.person.IPerson"
@@ -1069,11 +1069,6 @@
         <browser:page
             for="lp.registry.interfaces.person.ITeam"
             permission="zope.Public"
-            class="lp.registry.browser.person.TeamEditLocationView"
-            name="+editlocation"/>
-        <browser:page
-            for="lp.registry.interfaces.person.ITeam"
-            permission="zope.Public"
             name="+listing-simple"
             template="../templates/team-listing-simple.pt"/>
         <browser:page

=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2010-09-19 00:35:22 +0000
+++ lib/lp/registry/browser/person.py	2010-09-21 16:51:00 +0000
@@ -65,7 +65,6 @@
     'SearchSubscribedQuestionsView',
     'TeamAddMyTeamsView',
     'TeamBreadcrumb',
-    'TeamEditLocationView',
     'TeamEditMenu',
     'TeamIndexMenu',
     'TeamJoinView',
@@ -148,7 +147,6 @@
     helpers,
     )
 from canonical.launchpad.browser.feeds import FeedsMixin
-from canonical.launchpad.browser.launchpad import get_launchpad_views
 from canonical.launchpad.interfaces.account import (
     AccountStatus,
     IAccount,
@@ -244,7 +242,6 @@
 from lp.code.browser.sourcepackagerecipelisting import HasRecipesMenuMixin
 from lp.code.errors import InvalidNamespace
 from lp.code.interfaces.branchnamespace import IBranchNamespaceSet
-from lp.registry.browser import MapMixin
 from lp.registry.browser.branding import BrandingChangeView
 from lp.registry.browser.mailinglists import enabled_with_active_mailing_list
 from lp.registry.browser.menu import (
@@ -3325,7 +3322,7 @@
         return self.state is EmailAddressVisibleState.ALLOWED
 
 
-class PersonIndexView(XRDSContentNegotiationMixin, MapMixin, PersonView):
+class PersonIndexView(XRDSContentNegotiationMixin, PersonView):
     """View class for person +index and +xrds pages."""
 
     xrds_template = ViewPageTemplateFile(
@@ -3333,14 +3330,6 @@
 
     def initialize(self):
         super(PersonIndexView, self).initialize()
-        # This view requires the gmap2 Javascript in order to render the map
-        # with the person's usual location. The location is only availble if
-        # the location is set, visible, and the viewing user wants to see it.
-        launchpad_views = get_launchpad_views(self.request.cookies)
-        self._small_map = launchpad_views['small_maps']
-        if (self.gmap2_enabled
-            and self.has_visible_location and self._small_map):
-            self.request.needs_gmap2 = True
         if self.request.method == "POST":
             self.processForm()
 
@@ -3397,9 +3386,6 @@
         assert self.has_visible_location, (
             "Can't generate the map for a person who hasn't set a "
             "visible location.")
-        assert self.request.needs_gmap2 or not self._small_map, (
-            "To use this method a view must flag that it needs gmap2.")
-
         replacements = {'center_lat': self.context.latitude,
                         'center_lng': self.context.longitude}
         return u"""
@@ -5638,7 +5624,7 @@
 class PersonLocationForm(Interface):
 
     location = LocationField(
-        title=_('Use the map to indicate default location'),
+        title=_('Time zone'),
         required=True)
     hide = Bool(
         title=_("Hide my location details from others."),
@@ -5649,37 +5635,15 @@
     """Edit a person's location."""
 
     schema = PersonLocationForm
-    field_names = ['location', 'hide']
+    field_names = ['location']
     custom_widget('location', LocationWidget)
-
-    @property
-    def page_title(self):
-        return smartquote(
-            "%s's location and timezone" % self.context.displayname)
-
-    label = page_title
-
-    @property
-    def initial_values(self):
-        """See `LaunchpadFormView`.
-
-        Set the initial value for the 'hide' field.  The initial value for the
-        'location' field is set by its widget.
-        """
-        if self.context.location is None:
-            return {}
-        else:
-            return {'hide': not self.context.location.visible}
-
-    def initialize(self):
-        self.next_url = canonical_url(self.context)
-        self.for_team_name = self.request.form.get('for_team')
-        if self.for_team_name is not None:
-            for_team = getUtility(IPersonSet).getByName(self.for_team_name)
-            if for_team is not None:
-                self.next_url = canonical_url(for_team) + '/+map'
-        super(PersonEditLocationView, self).initialize()
-        self.cancel_url = self.next_url
+    page_title = label = 'Set timezone'
+
+    @property
+    def next_url(self):
+        return canonical_url(self.context)
+
+    cancel_url = next_url
 
     @action(_("Update"), name="update")
     def action_update(self, action, data):
@@ -5696,17 +5660,6 @@
             self.context.setLocationVisibility(visible)
 
 
-class TeamEditLocationView(LaunchpadView):
-    """Redirect to the team's +map page.
-
-    We do that because it doesn't make sense to specify the location of a
-    team."""
-
-    def initialize(self):
-        self.request.response.redirect(
-            canonical_url(self.context, view_name="+map"))
-
-
 def archive_to_person(archive):
     """Adapts an `IArchive` to an `IPerson`."""
     return IPerson(archive.owner)

=== modified file 'lib/lp/registry/browser/team.py'
--- lib/lp/registry/browser/team.py	2010-09-19 03:13:01 +0000
+++ lib/lp/registry/browser/team.py	2010-09-21 16:51:00 +0000
@@ -25,10 +25,7 @@
 
 from datetime import datetime
 import math
-from urllib import (
-    quote,
-    unquote,
-    )
+from urllib import unquote
 
 import pytz
 from zope.app.form.browser import TextAreaWidget
@@ -71,7 +68,6 @@
     LaunchpadRadioWidget,
     )
 from lp.app.errors import UnexpectedFormData
-from lp.registry.browser import MapMixin
 from lp.registry.browser.branding import BrandingChangeView
 from lp.registry.interfaces.mailinglist import (
     IMailingList,
@@ -1083,7 +1079,7 @@
         self.request.response.addInfoNotification(msg)
 
 
-class TeamMapView(MapMixin, LaunchpadView):
+class TeamMapView(LaunchpadView):
     """Show all people with known locations on a map.
 
     Also provides links to edit the locations of people in the team without
@@ -1093,12 +1089,6 @@
     label = "Team member locations"
     limit = None
 
-    def initialize(self):
-        # Tell our base-layout to include Google's gmap2 javascript so that
-        # we can render the map.
-        if self.gmap2_enabled and self.mapped_participants_count > 0:
-            self.request.needs_gmap2 = True
-
     @cachedproperty
     def mapped_participants(self):
         """Participants with locations."""

=== modified file 'lib/lp/registry/browser/tests/person-views.txt'
--- lib/lp/registry/browser/tests/person-views.txt	2010-08-28 23:01:18 +0000
+++ lib/lp/registry/browser/tests/person-views.txt	2010-09-21 16:51:00 +0000
@@ -301,113 +301,6 @@
     Portuguese (Brazil)
 
 
-Location
---------
-
-The Person profile page contains the location portlet that shows a map.
-The map requires the google GMap JavaScript to display, so the views set
-the state of the request's needs_gmap2 attribute to True only when the
-user has set his latitude, it is visible, and the viewing user wishes to
-see it. The map is not rendered if the user has not set his location.
-
-    >>> sample_person.latitude is None
-    True
-
-    >>> person_view = create_initialized_view(sample_person, '+index')
-    >>> person_view.request.needs_gmap2
-    False
-
-The map_portlet_html property that creates the map cannot be called.
-
-    >>> print person_view.map_portlet_html
-    Traceback (most recent call last):
-     ...
-    AssertionError: Can't generate the map for a person who hasn't set
-                    a visible location.
-
-If the user sets his location, but does not make it visible, needs_gmap2
-will still be False and the map_portlet_html property cannot be called.
-
-    >>> login_person(sample_person)
-    >>> sample_person.setLocation(
-    ...     38.81, 77.1, 'America/New_York', sample_person)
-    >>> sample_person.setLocationVisibility(False)
-    >>> login('no-priv@xxxxxxxxxxxxx')
-
-    >>> person_view = create_initialized_view(sample_person, '+index')
-    >>> person_view.request.needs_gmap2
-    False
-
-    >>> print person_view.map_portlet_html
-    Traceback (most recent call last):
-     ...
-    AssertionError: Can't generate the map for a person who hasn't set
-                    a visible location.
-
-When the user set's his visibility to True, needs_gmap2 will be true and
-the map_portlet_html can be called.
-
-    >>> from lp.services.features.model import FeatureFlag, getFeatureStore
-    >>> ignore = getFeatureStore().add(FeatureFlag(
-    ...     scope=u'default', flag=u'gmap2', value=u'on', priority=1))
-    >>> transaction.commit()
-
-    >>> login_person(sample_person)
-    >>> sample_person.setLocationVisibility(True)
-
-    >>> person_view = create_initialized_view(sample_person, '+index')
-    >>> person_view.request.needs_gmap2
-    True
-
-    >>> print person_view.map_portlet_html
-    <script type="text/javascript">
-      YUI().use('node', 'lp.app.mapping', function(Y) { ...
-
-The small_maps key in the launchpad_views cookie can be set of the
-viewing user to 'false' to indicate that small maps are not wanted.
-While needs_gmap2 is False, the map_portlet_html property's markup is
-still needed to render the 'Show maps' checkbox.
-
-    >>> cookie = 'launchpad_views=small_maps=false'
-    >>> person_view = create_initialized_view(
-    ...     sample_person, '+index', cookie=cookie)
-    >>> person_view.request.needs_gmap2
-    False
-
-    >>> print person_view.map_portlet_html
-    <script type="text/javascript">
-      YUI().use('node', 'lp.app.mapping', function(Y) { ...
-
-The map portlet is shown if the user has not set his location and is
-viewing his own page.
-
-    >>> user = factory.makePerson()
-    >>> user.latitude is None
-    True
-
-    >>> login_person(user)
-    >>> person_view = create_initialized_view(
-    ...     user, '+index')
-    >>> person_view.should_show_map_portlet
-    True
-
-However another user will not be shown the portlet.
-
-    >>> login('foo.bar@xxxxxxxxxxxxx')
-    >>> person_view = create_initialized_view(
-    ...     user, '+index')
-    >>> person_view.should_show_map_portlet
-    False
-
-If a user has a location set and it is visibible then the portlet is
-shown.
-
-    >>> person_view = create_initialized_view(
-    ...     sample_person, '+index')
-    >>> person_view.should_show_map_portlet
-    True
-
-
 Things a person is working on
 -----------------------------
 

=== modified file 'lib/lp/registry/browser/tests/team-views.txt'
--- lib/lp/registry/browser/tests/team-views.txt	2010-08-28 23:01:18 +0000
+++ lib/lp/registry/browser/tests/team-views.txt	2010-09-21 16:51:00 +0000
@@ -67,21 +67,11 @@
 
 == +map-portlet ==
 
-The team profile page contain the location portlet that shows a map. The
-map requires the google GMap JavaScript to display, so the views set the
-state of the request's needs_gmap2 attribute to true if there are
-members who have set their location.
-
-    >>> from lp.services.features.model import FeatureFlag, getFeatureStore
-    >>> ignore = getFeatureStore().add(FeatureFlag(
-    ...     scope=u'default', flag=u'gmap2', value=u'on', priority=1))
-    >>> transaction.commit()
+The team profile page contain the location portlet that shows a map.
 
     >>> team_view = create_initialized_view(ubuntu_team, '+index')
     >>> team_view.has_visible_location
     False
-    >>> team_view.request.needs_gmap2
-    False
 
 After a member has set his location, the map will be rendered.
 
@@ -92,8 +82,6 @@
     >>> team_view = create_initialized_view(ubuntu_team, '+index')
     >>> team_view.has_visible_location
     True
-    >>> team_view.request.needs_gmap2
-    True
 
 The small_maps key in the launchpad_views cookie can be set by the viewing
 user to 'false' to indicate that small maps are not wanted.
@@ -101,9 +89,6 @@
     >>> cookie = 'launchpad_views=small_maps=false'
     >>> team_view = create_initialized_view(
     ...     ubuntu_team, '+index', cookie=cookie)
-    >>> team_view.request.needs_gmap2
-    False
-
 
 == +map ==
 
@@ -118,15 +103,10 @@
     >>> view.times
     []
 
-There are no mapped member yet, so needs_gmap2 is False, so the map will
-not be rendered.
-
-    >>> view.request.needs_gmap2
-    False
-
-Once a member is mapped, needs_gmap2 is True and the map will be rendered.
-The view provides a cached property to access the mapped participants. The
-views number of times is incremented for each timezone the members reside in.
+
+Once a member is mapped, the map will be rendered. The view provides a cached
+property to access the mapped participants. The views number of times is
+incremented for each timezone the members reside in.
 
     >>> london_member = factory.makePerson(
     ...     latitude=51.49, longitude=-0.13, time_zone='Europe/London')
@@ -139,9 +119,6 @@
     >>> len(view.times)
     1
 
-    >>> view.request.needs_gmap2
-    True
-
     >>> brazil_member = factory.makePerson(
     ...     latitude=-23.60, longitude=-46.64, time_zone='America/Sao_Paulo')
     >>> ignored = context.addMember(brazil_member, mark)

=== modified file 'lib/lp/registry/doc/personlocation.txt'
--- lib/lp/registry/doc/personlocation.txt	2010-08-20 12:25:28 +0000
+++ lib/lp/registry/doc/personlocation.txt	2010-09-21 16:51:00 +0000
@@ -1,4 +1,5 @@
-= Locations for People and Teams =
+Locations for People and Teams
+==============================
 
 The PersonLocation object stores information about the location and time
 zone of a person.  It also remembers who provided that information, and
@@ -164,7 +165,8 @@
                     mapped_participants_count == 0.
 
 
-== Location visibility ==
+Location visibility
+-------------------
 
 Some people may not want their location to be disclosed to others, so
 we provide a way for them to hide their location from other users. By

=== modified file 'lib/lp/registry/stories/location/personlocation-edit.txt'
--- lib/lp/registry/stories/location/personlocation-edit.txt	2009-11-15 01:05:49 +0000
+++ lib/lp/registry/stories/location/personlocation-edit.txt	2010-09-21 16:51:00 +0000
@@ -1,4 +1,5 @@
-== Edit person location information ==
+Edit person location information
+================================
 
 A person's location is only editable by people who have launchpad.Edit on
 the person, which is that person and admins.
@@ -49,35 +50,3 @@
     >>> admin_browser.open('http://launchpad.dev/~zzz/+editlocation')
     >>> admin_browser.getControl(name='field.location.latitude').value
     '39.48'
-
-The +editlocation page also allows a person to change his location
-visibility, that is, whether or not others can see it. 
-
-    >>> nopriv_browser.open('http://launchpad.dev/~no-priv/+editlocation')
-    >>> nopriv_browser.getControl(
-    ...     'Hide my location details from others.').selected = True
-    >>> nopriv_browser.getControl('Update').click()
-    >>> nopriv_browser.url
-    'http://launchpad.dev/~no-priv'
-
-Once hidden, other users can't see it.
-
-    >>> name12_browser = setupBrowser(auth="Basic test@xxxxxxxxxxxxx:test")
-    >>> name12_browser.open('http://launchpad.dev/~no-priv')
-    >>> print str(find_tag_by_id(name12_browser.contents, 'person_map_div'))
-    None
-
-The person himself can still see and change it, though.
-
-    >>> nopriv_browser.open('http://launchpad.dev/~no-priv')
-    >>> print str(find_tag_by_id(nopriv_browser.contents, 'portlet-map'))
-    <div...
-    <h2>Location</h2>
-    ...
-
-    >>> nopriv_browser.open('http://launchpad.dev/~no-priv/+editlocation')
-    >>> nopriv_browser.getControl(
-    ...     'Hide my location details from others.').selected = False
-    >>> nopriv_browser.getControl('Update').click()
-    >>> nopriv_browser.url
-    'http://launchpad.dev/~no-priv'

=== modified file 'lib/lp/registry/stories/location/personlocation.txt'
--- lib/lp/registry/stories/location/personlocation.txt	2010-08-27 22:42:17 +0000
+++ lib/lp/registry/stories/location/personlocation.txt	2010-09-21 16:51:00 +0000
@@ -16,43 +16,3 @@
     >>> anon_browser.open('http://launchpad.dev/~zzz')
     >>> print extract_text(
     ...     find_tag_by_id(anon_browser.contents, 'portlet-map'))
-
-If a person has a location, but the gmap2 feature is not enabled, the user
-sees the timezone, but no map.
-
-    >>> login('test@xxxxxxxxxxxxx')
-    >>> yyy = factory.makePerson(name='yyy', time_zone='Europe/London',
-    ...                          latitude=52.2, longitude=0.3)
-    >>> logout()
-
-    >>> anon_browser.open('http://launchpad.dev/~yyy')
-    >>> markup = str(anon_browser.contents)
-    >>> print extract_text(
-    ...     find_tag_by_id(markup, 'portlet-map'), skip_tags=[])
-    Location
-    Time zone: Europe/London...
-
-    >>> 'src="http://maps.google.com/maps' in markup
-    False
-
-If a person has a location, there is a little map portlet in their
-profile page. We can't test all the google javascript, but we can make sure
-there's a map, and the scripts are loaded  when the gmap2 feature is enabled
-for users.
-
-    >>> from lp.services.features.model import FeatureFlag, getFeatureStore
-    >>> ignore = getFeatureStore().add(FeatureFlag(
-    ...     scope=u'default', flag=u'gmap2', value=u'on', priority=1))
-    >>> transaction.commit()
-
-    >>> anon_browser.open('http://launchpad.dev/~yyy')
-    >>> markup = str(anon_browser.contents)
-    >>> print extract_text(
-    ...     find_tag_by_id(markup, 'portlet-map'), skip_tags=[])
-    Location
-    Time zone: Europe/London...
-    Y.lp.app.mapping.renderPersonMapSmall(...
-    >>> 'src="http://maps.google.com/maps' in markup
-    True
-    >>> 'build/app/mapping.js' in markup
-    True

=== modified file 'lib/lp/registry/stories/location/team-map.txt'
--- lib/lp/registry/stories/location/team-map.txt	2010-08-27 22:33:36 +0000
+++ lib/lp/registry/stories/location/team-map.txt	2010-09-21 16:51:00 +0000
@@ -1,50 +1,6 @@
 The map of a team's members
 ===========================
 
-Maps are disabled
------------------
-
-Users cannot see maps when the gmap2 feature is disbaled for them
-
-    >>> user_browser.open('http://launchpad.dev/~guadamen')
-    >>> body = find_main_content(user_browser.contents)
-    >>> mapdiv = find_tag_by_id(str(body), 'team_map_div')
-    >>> 'lp.app.mapping.renderTeamMapSmall(' in str(body)
-    False
-
-
-Maps are enabled
-----------------
-
-Users can see maps when the gmap2 feature is enabled for them.
-
-    >>> from lp.services.features.model import FeatureFlag, getFeatureStore
-    >>> ignore = getFeatureStore().add(FeatureFlag(
-    ...     scope=u'default', flag=u'gmap2', value=u'on', priority=1))
-    >>> transaction.commit()
-
-If a team has members that have locations, then you should see a portlet
-with their locations displayed.
-
-    >>> nopriv_browser = setupBrowser(auth='Basic no-priv@xxxxxxxxxxxxx:test')
-    >>> nopriv_browser.open('http://launchpad.dev/~guadamen')
-    >>> body = find_main_content(nopriv_browser.contents)
-    >>> mapdiv = find_tag_by_id(str(body), 'team_map_div')
-    >>> 'lp.app.mapping.renderTeamMapSmall(' in str(body)
-    True
-    >>> markup = str(nopriv_browser.contents)
-    >>> 'src="http://maps.google.com/maps' in markup
-    True
-    >>> 'build/app/mapping.js' in markup
-    True
-
-You should also be able to see a map of the team.
-
-    >>> maplink = nopriv_browser.getLink('View map and time zones')
-    >>> maplink.click()
-    >>> nopriv_browser.url
-    'http://launchpad.dev/~guadamen/+map'
-
 The map depends on a stream of XML-formatted data, giving the locations of
 all members of the team. We show that this stream works for teams with, and
 without, mapped members.
@@ -108,15 +64,6 @@
     <BLANKLINE>
 
 
-It doesn't make sense to edit the location of the team itself, not even
-if we are an admin, so a team's +editlocation page will simply redirect
-to +map.
-
-    >>> admin_browser.open('http://launchpad.dev/~guadamen/+editlocation')
-    >>> print admin_browser.url
-    http://launchpad.dev/~guadamen/+map
-
-
 +mapdata
 --------
 

=== removed file 'lib/lp/registry/templates/person-editlocation.pt'
--- lib/lp/registry/templates/person-editlocation.pt	2009-09-01 19:34:46 +0000
+++ lib/lp/registry/templates/person-editlocation.pt	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-<html
-  xmlns="http://www.w3.org/1999/xhtml";
-  xmlns:tal="http://xml.zope.org/namespaces/tal";
-  xmlns:metal="http://xml.zope.org/namespaces/metal";
-  xmlns:i18n="http://xml.zope.org/namespaces/i18n";
-  metal:use-macro="view/macro:page/main_only"
-  i18n:domain="launchpad">
-
-<body>
-
-  <div metal:fill-slot="main">
-
-    <div metal:use-macro="context/@@launchpad_form/form">
-      <div metal:fill-slot="extra_info">
-         <input type="hidden" name="for_team" value=""
-                tal:attributes="value view/for_team_name" />
-      </div>
-    </div>
-
-  </div>
-
-</body>
-</html>

=== modified file 'lib/lp/registry/templates/person-portlet-map.pt'
--- lib/lp/registry/templates/person-portlet-map.pt	2010-08-27 22:33:36 +0000
+++ lib/lp/registry/templates/person-portlet-map.pt	2010-09-21 16:51:00 +0000
@@ -8,7 +8,6 @@
      tal:define="overview_menu context/menu:overview">
 
   <tal:show-map condition="view/should_show_map_portlet">
-
     <h2>Location</h2>
 
     <div tal:condition="context/time_zone">
@@ -16,30 +15,6 @@
       <span tal:replace="context/time_zone">UTC</span>
       <a tal:replace="structure overview_menu/editlocation/fmt:icon" />
     </div>
-
-
-    <tal:gmap2 condition="view/gmap2_enabled">
-    <div style="width: 400px;" tal:condition="context/latitude">
-      <div id="person_map_actions"
-        style="position:relative; z-index: 9999;
-               float:right; width: 8.5em; margin: 2px;
-               background-color: white; padding-bottom:1px;"></div>
-      <div id="person_map_div" class="small-map"
-        style="height: 200px; border: 1px; margin-top: 4px;"></div>
-      <tal:mapscript replace="structure view/map_portlet_html" />
-      <div style="margin-top: 0px;">
-        <a tal:replace="structure overview_menu/editlocation/fmt:link-icon" />
-      </div>
-    </div>
-    </tal:gmap2>
-
-    <tal:comment condition="nothing">
-      Only the user can see the editlocation image and link.
-    </tal:comment>
-    <a tal:condition="not: context/latitude"
-       tal:attributes="href overview_menu/editlocation/target"
-       ><img src="/+icing/portlet-map-unknown.png" />
-    </a>
   </tal:show-map>
 
 </div>

=== modified file 'lib/lp/registry/templates/team-index.pt'
--- lib/lp/registry/templates/team-index.pt	2010-06-28 21:56:49 +0000
+++ lib/lp/registry/templates/team-index.pt	2010-09-21 16:51:00 +0000
@@ -88,9 +88,6 @@
       <metal:subteam-of use-macro="context/@@+person-macros/subteam-of" />
     </div>
   </div>
-
-  <div tal:content="structure context/@@+portlet-map" />
-
 </div>
 </body>
 </html>

=== modified file 'lib/lp/registry/templates/team-portlet-map.pt'
--- lib/lp/registry/templates/team-portlet-map.pt	2010-08-27 22:33:36 +0000
+++ lib/lp/registry/templates/team-portlet-map.pt	2010-09-21 16:51:00 +0000
@@ -5,8 +5,7 @@
   omit-tag="">
 
 <div class="portlet" id="portlet-map" style="margin-bottom: 0px;"
-     tal:define="link context/menu:overview/map"
-     tal:condition="view/gmap2_enabled">
+     tal:define="link context/menu:overview/map">
 <table>
 <tr><td>
   <h2>