Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Mocking fake map for testing
- */
- function MapboxGLMockMap() {
- this.style = {
- getLayer: function() { },
- removeLayer: function() { }
- };
- this.transform = {
- bearing: 0,
- center: { lat: 0, lng: 0 },
- zoom: 0
- };
- }
- MapboxGLMockMap.prototype.on = function() { return this; };
- MapboxGLMockMap.prototype.off = function() { return this; };
- MapboxGLMockMap.prototype.remove = function() { return this; };
- MapboxGLMockMap.prototype.resize = function() { return this; };
- MapboxGLMockMap.prototype.setLayoutProperty = function() { };
- MapboxGLMockMap.prototype.setPaintProperty = function() { };
- MapboxGLMockMap.prototype.setStyle = function() { };
- MapboxGLMockMap.prototype.setView = function() { };
- MapboxGLMockMap.prototype.getBearing = function() { return 0; };
- MapboxGLMockMap.prototype.getCenter = function() { return { lat: 0, lng: 0 }; };
- MapboxGLMockMap.prototype.featuresAt = function(point, opts, cb) {
- cb([]);
- };
- module.exports.Map = MapboxGLMockMap;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement