Going red: Bounding box parameter ignored in static named maps

This commit is contained in:
Raul Ochoa 2017-08-29 13:04:20 +00:00
parent 03dc260104
commit fc0dbaaab1
2 changed files with 25 additions and 1 deletions

View File

@ -192,7 +192,31 @@ describe('named maps static view', function() {
}
getStaticMap({ zoom: 3 }, function(err, img) {
assert.ok(!err);
img.save('/tmp/static.png');
assert.imageIsSimilarToFile(img, previewFixture('override-zoom'), IMAGE_TOLERANCE, done);
});
});
});
it('should return override bbox', function (done) {
var view = {
bounds: {
west: 0,
south: 0,
east: 45,
north: 45
},
zoom: 4,
center: {
lng: 40,
lat: 20
}
};
templateMaps.addTemplate(username, createTemplate(view), function (err) {
if (err) {
return done(err);
}
getStaticMap({ bbox: '0,45,90,45' }, function(err, img) {
assert.ok(!err);
assert.imageIsSimilarToFile(img, previewFixture('override-zoom'), IMAGE_TOLERANCE, done);
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB