summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/tests.py10
-rw-r--r--chimere/widgets.py6
2 files changed, 14 insertions, 2 deletions
diff --git a/chimere/tests.py b/chimere/tests.py
index ea97b39..7de79d8 100644
--- a/chimere/tests.py
+++ b/chimere/tests.py
@@ -163,8 +163,14 @@ class OSMImporterTest(TestCase, ImporterTest):
importer2 = Importer.objects.create(importer_type='OSM',
source=test_dir_path+'tests/sample_ways.osm')
importer2.categories.add(subcategory_2)
-
- self.marker_importers = [(importer1, 19), (importer2, 8)]
+ importer3 = Importer.objects.create(importer_type='OSM',
+ source='http://open.mapquestapi.com/xapi/api/0.6/way'\
+ '[highway=motorway]'\
+ '[bbox=2.0393839939136975,48.68908639634696,'\
+ '2.3140421970277316,48.790972349390415]')
+
+ self.marker_importers = [(importer1, 19), (importer2, 8),
+ (importer3, None)]
class GeoRSSImporterTest(TestCase, ImporterTest):
def setUp(self):
diff --git a/chimere/widgets.py b/chimere/widgets.py
index 013cef4..185d134 100644
--- a/chimere/widgets.py
+++ b/chimere/widgets.py
@@ -266,6 +266,9 @@ class PointChooserWidget(forms.TextInput):
map_layers, default_area = get_map_layers(area_name)
map_layers = [js for n, js, default in map_layers]
js = """
+ var resolutions;
+ var zoomOffset;
+
OpenLayers.ImgPath = '%schimere/img/';
var EPSG_DISPLAY_PROJECTION = epsg_display_projection = new OpenLayers.Projection('EPSG:%s');
var EPSG_PROJECTION = epsg_projection = new OpenLayers.Projection('EPSG:%s');
@@ -346,6 +349,9 @@ class RouteChooserWidget(forms.TextInput):
map_layers, default_area = get_map_layers(area_name)
map_layers = [js for nm, js, default in map_layers]
js = """
+ var resolutions;
+ var zoomOffset;
+
var extra_url = "%s";
OpenLayers.ImgPath = '%schimere/img/';
var EPSG_DISPLAY_PROJECTION = epsg_display_projection = new OpenLayers.Projection('EPSG:%s');