jquery ajax获取geojson格式文件内容,通过openlayers叠加显示在地图
代码如下:
//---------------------------------------------------------------------------根据行政区编码进行定位---------------------------------------------------------。
var Mmylayer;
function OverLayTargetLocalLyr(dir)
{
var featureSelectStyle = new ol.style.Style({
stroke: new ol.style.Stroke({
color: [255, 215, 0, 1],
width: 3
}),
fill: new ol.style.Fill({ color: [255, 215, 0, 0.2] })
});
$.getJSON(