2016-02-28 20:32:10 +00:00
|
|
|
import GeoJSONLayer from './GeoJSONLayer';
|
|
|
|
import extend from 'lodash.assign';
|
|
|
|
|
2016-03-01 20:34:53 +00:00
|
|
|
class TopoJSONLayer extends GeoJSONLayer {
|
|
|
|
constructor(topojson, options) {
|
|
|
|
var defaults = {
|
|
|
|
topojson: true
|
|
|
|
};
|
|
|
|
|
|
|
|
options = extend({}, defaults, options);
|
|
|
|
|
|
|
|
super(topojson, options);
|
|
|
|
}
|
|
|
|
}
|
2016-02-28 20:32:10 +00:00
|
|
|
|
2016-03-01 20:34:53 +00:00
|
|
|
export default TopoJSONLayer;
|
2016-02-28 20:32:10 +00:00
|
|
|
|
2016-03-01 20:34:53 +00:00
|
|
|
var noNew = function(topojson, options) {
|
|
|
|
return new TopoJSONLayer(topojson, options);
|
2016-02-28 20:32:10 +00:00
|
|
|
};
|
2016-03-01 20:34:53 +00:00
|
|
|
|
|
|
|
// Initialise without requiring new keyword
|
|
|
|
export {noNew as topoJSONLayer};
|