allow for markers on Ox.MapImage
This commit is contained in:
parent
e6633a2953
commit
ecb72f28ea
1 changed files with 8 additions and 1 deletions
|
@ -23,7 +23,8 @@ Ox.MapImage = function(options, self) {
|
||||||
backgroundColor: [0, 0, 0, 0],
|
backgroundColor: [0, 0, 0, 0],
|
||||||
borderColor: [0, 0, 0, 0],
|
borderColor: [0, 0, 0, 0],
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
height: 360,
|
height: 640,
|
||||||
|
markers: [],
|
||||||
place: null,
|
place: null,
|
||||||
type: 'satellite',
|
type: 'satellite',
|
||||||
width: 640
|
width: 640
|
||||||
|
@ -54,6 +55,12 @@ Ox.MapImage = function(options, self) {
|
||||||
} else {
|
} else {
|
||||||
self.src += '¢er=0,0&zoom=2'
|
self.src += '¢er=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({
|
that.attr({
|
||||||
src: self.src
|
src: self.src
|
||||||
|
|
Loading…
Reference in a new issue