allow for markers on Ox.MapImage

This commit is contained in:
rolux 2012-04-04 00:36:45 +02:00
parent e6633a2953
commit ecb72f28ea

View file

@ -23,7 +23,8 @@ Ox.MapImage = function(options, self) {
backgroundColor: [0, 0, 0, 0],
borderColor: [0, 0, 0, 0],
borderWidth: 0,
height: 360,
height: 640,
markers: [],
place: null,
type: 'satellite',
width: 640
@ -54,6 +55,12 @@ Ox.MapImage = function(options, self) {
} else {
self.src += '&center=0,0&zoom=2'
}
if (self.options.markers.length) {
self.src += '&markers='
+ self.options.markers.map(function(marker) {
return [marker.lat, marker.lng].join(',')
}).join('|');
}
that.attr({
src: self.src