aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/general-example1
-rw-r--r--perllib/FixMyStreet/Map/Bing.pm2
-rw-r--r--web/js/map-bing.js1
3 files changed, 4 insertions, 0 deletions
diff --git a/conf/general-example b/conf/general-example
index 20872ae28..9da852bb8 100644
--- a/conf/general-example
+++ b/conf/general-example
@@ -44,6 +44,7 @@ define('OPTION_STAGING_SITE', 1);
define('OPTION_UPLOAD_CACHE', '/upload/');
define('OPTION_GEO_CACHE', '/cache/');
define('OPTION_GOOGLE_MAPS_API_KEY', '');
+define('OPTION_BING_MAPS_API_KEY', '');
define('OPTION_MAPIT_URL', 'http://mapit.mysociety.org/');
define('OPTION_MAP_TYPE', 'Tilma::Original::1_10k');
diff --git a/perllib/FixMyStreet/Map/Bing.pm b/perllib/FixMyStreet/Map/Bing.pm
index c29311324..335759b08 100644
--- a/perllib/FixMyStreet/Map/Bing.pm
+++ b/perllib/FixMyStreet/Map/Bing.pm
@@ -39,11 +39,13 @@ sub display_map {
my $out = FixMyStreet::Map::header($q, $params{type});
my $copyright = _('Map contains Ordnance Survey data © Crown copyright and database right 2010.');
+ my $key = mySociety::Config::get('BING_MAPS_API_KEY');
$out .= <<EOF;
<input type="hidden" name="latitude" id="fixmystreet.latitude" value="$params{latitude}">
<input type="hidden" name="longitude" id="fixmystreet.longitude" value="$params{longitude}">
<script type="text/javascript">
var fixmystreet = {
+ 'key': '$key',
'latitude': $params{latitude},
'longitude': $params{longitude},
'pins': [ $pins_js ]
diff --git a/web/js/map-bing.js b/web/js/map-bing.js
index da8f3512b..748a03525 100644
--- a/web/js/map-bing.js
+++ b/web/js/map-bing.js
@@ -1,6 +1,7 @@
YAHOO.util.Event.onContentReady('map', function() {
var centre = new Microsoft.Maps.Location( fixmystreet.latitude, fixmystreet.longitude );
var map = new Microsoft.Maps.Map(document.getElementById("map"), {
+ credentials: fixmystreet.key,
mapTypeId: Microsoft.Maps.MapTypeId.ordnanceSurvey,
center: centre,
zoom: 15,