$(function () {
var request = new XMLHttpRequest();
var shpArrayBuffer;
var dbfArrayBuffer;
request.open('GET', 'map.shp');
request.responseType = 'arraybuffer';
request.addEventListener('load', function () {
if (this.readyState == 4) {
shpArrayBuffer = this.response;
}
});
request.send(null);
var parseSources = { shp: shpArrayBuffer, dbf: dbfArrayBuffer },
parseOptions = { precision: 2 }
var data = DevExpress.viz.vectormaputils.parse(parseSources, parseOptions);
$('#mapContainer').dxVectorMap({
layers: [{
type: 'area',
dataSource: data
}]
});
})
没有效果出来,请大佬赐教!刚接触这个东西,请各位海纳百川!!!