blob: 32420a0ec6a4ebf65bd6e2a48298abda3c530f4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/usr/bin/perl
#
# FixMyStreet:Map::Bing
# Bing maps on FixMyStreet.
#
# Copyright (c) 2010 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
package FixMyStreet::Map::Bing;
use strict;
use mySociety::Web qw(ent);
sub header_js {
return '
<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-GB"></script>
<script type="text/javascript" src="/js/map-bing.js"></script>
';
}
# display_map C PARAMS
# PARAMS include:
# latitude, longitude for the centre point of the map
# CLICKABLE is set if the map is clickable
# PINS is array of pins to show, location and colour
sub display_map {
my ($self, $c, %params) = @_;
$c->stash->{map} = {
%params,
type => 'bing',
key => mySociety::Config::get('BING_MAPS_API_KEY'),
};
}
1;
|