aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default')
-rw-r--r--templates/web/default/maps/bing.html12
-rw-r--r--templates/web/default/maps/google.html11
-rw-r--r--templates/web/default/maps/osm.html9
-rw-r--r--templates/web/default/maps/pins_js.html4
-rw-r--r--templates/web/default/maps/tilma/openlayers.html17
5 files changed, 48 insertions, 5 deletions
diff --git a/templates/web/default/maps/bing.html b/templates/web/default/maps/bing.html
new file mode 100644
index 000000000..fccd3311e
--- /dev/null
+++ b/templates/web/default/maps/bing.html
@@ -0,0 +1,12 @@
+<script type="text/javascript">
+var fixmystreet = {
+ 'key': '[% map.key %]',
+ 'latitude': [% map.latitude %],
+ 'longitude': [% map.longitude %],
+ 'pins': [% INCLUDE maps/pins_js.html %]
+}
+</script>
+<div id="map_box">
+ [% pre_map %]
+ <div id="map"></div>
+
diff --git a/templates/web/default/maps/google.html b/templates/web/default/maps/google.html
new file mode 100644
index 000000000..51e6cb587
--- /dev/null
+++ b/templates/web/default/maps/google.html
@@ -0,0 +1,11 @@
+<script type="text/javascript">
+var fixmystreet = {
+ 'latitude': [% map.latitude %],
+ 'longitude': [% map.longitude %],
+ 'pins': [% INCLUDE maps/pins_js.html %]
+}
+</script>
+<div id="map_box">
+ [% pre_map %]
+ <div id="map"></div>
+
diff --git a/templates/web/default/maps/osm.html b/templates/web/default/maps/osm.html
index 5f8336c52..a3e6ea27d 100644
--- a/templates/web/default/maps/osm.html
+++ b/templates/web/default/maps/osm.html
@@ -9,11 +9,10 @@
var fixmystreet = {
'latitude': [% map.latitude %],
'longitude': [% map.longitude %],
- 'pins': [
-[% FOR pin IN map.pins -%]
- [ [% pin.latitude %], [% pin.longitude %], '[% pin.colour %]', '[% pin.id %]', '[% pin.title %]' ]
- [%- IF !loop.last %],[% END %]
-[% END %] ],
+[% IF map.zoom -%]
+ 'zoom': [% map.zoom %],
+[%- END %]
+ 'pins': [% INCLUDE maps/pins_js.html %],
'map_type': [% map.map_type %]
}
</script>
diff --git a/templates/web/default/maps/pins_js.html b/templates/web/default/maps/pins_js.html
new file mode 100644
index 000000000..4a5814b15
--- /dev/null
+++ b/templates/web/default/maps/pins_js.html
@@ -0,0 +1,4 @@
+[ [% FOR pin IN map.pins -%]
+ [ [% pin.latitude %], [% pin.longitude %], '[% pin.colour %]', '[% pin.id %]', '[% pin.title %]' ]
+ [%- IF !loop.last %],[% END %]
+[% END %] ]
diff --git a/templates/web/default/maps/tilma/openlayers.html b/templates/web/default/maps/tilma/openlayers.html
new file mode 100644
index 000000000..5ee7b207e
--- /dev/null
+++ b/templates/web/default/maps/tilma/openlayers.html
@@ -0,0 +1,17 @@
+<script type="text/javascript">
+var fixmystreet = {
+ 'tilewidth': [% map.tilewidth %],
+ 'tileheight': [% map.tilewidth %],
+ 'latitude': [% map.latitude %],
+ 'longitude': [% map.longitude %],
+ 'pins': [% INCLUDE maps/pins_js.html %],
+ 'tile_type': '[% map.tile_type %]',
+ 'maxResolution': [% map.maxResolution %]
+};
+</script>
+<div id="map_box">
+ [% pre_map %]
+ <div id="map">
+ [% '<div id="watermark"></div>' IF map.watermark %]
+ </div>
+ <p id="copyright">[% map.copyright %]</p>