[1.0.X]: Fixed #9130 -- Fixed typo in comment, thanks scel.

Backport of r10220 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Gary Wilson Jr 2009-03-30 22:11:36 +00:00
parent f7e52d449a
commit f9582c8f52
1 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ class OpenLayersWidget(Textarea):
# Defaulting the WKT value to a blank string -- this # Defaulting the WKT value to a blank string -- this
# will be tested in the JavaScript and the appropriate # will be tested in the JavaScript and the appropriate
# interfaace will be constructed. # interface will be constructed.
self.params['wkt'] = '' self.params['wkt'] = ''
# If a string reaches here (via a validation error on another # If a string reaches here (via a validation error on another
@ -46,7 +46,7 @@ class OpenLayersWidget(Textarea):
# Transforming the geometry to the projection used on the # Transforming the geometry to the projection used on the
# OpenLayers map. # OpenLayers map.
srid = self.params['srid'] srid = self.params['srid']
if value.srid != srid: if value.srid != srid:
try: try:
ogr = value.ogr ogr = value.ogr
ogr.transform(srid) ogr.transform(srid)
@ -55,14 +55,14 @@ class OpenLayersWidget(Textarea):
wkt = '' wkt = ''
else: else:
wkt = value.wkt wkt = value.wkt
# Setting the parameter WKT with that of the transformed # Setting the parameter WKT with that of the transformed
# geometry. # geometry.
self.params['wkt'] = wkt self.params['wkt'] = wkt
return loader.render_to_string(self.template, self.params, return loader.render_to_string(self.template, self.params,
context_instance=geo_context) context_instance=geo_context)
def map_options(self): def map_options(self):
"Builds the map options hash for the OpenLayers template." "Builds the map options hash for the OpenLayers template."
@ -74,8 +74,8 @@ class OpenLayersWidget(Textarea):
# An array of the parameter name, the name of their OpenLayers # An array of the parameter name, the name of their OpenLayers
# counterpart, and the type of variable they are. # counterpart, and the type of variable they are.
map_types = [('srid', 'projection', 'srid'), map_types = [('srid', 'projection', 'srid'),
('display_srid', 'displayProjection', 'srid'), ('display_srid', 'displayProjection', 'srid'),
('units', 'units', str), ('units', 'units', str),
('max_resolution', 'maxResolution', float), ('max_resolution', 'maxResolution', float),
('max_extent', 'maxExtent', 'bounds'), ('max_extent', 'maxExtent', 'bounds'),