GEOJSON的渲染实例 createGeojson:function(arr)
{
let geoArr=[];
for(let i=0;i<arr.length;i++)
{
let obj={
"type": "Feature",
"properties": {"value": -999},
"geometry": {
"type": "Polygon",
"coordinates": null}
实习医生格蕾第9季
}
if(arr[i].value==0)
{
arr[i].value=-999;
}
obj.properties={"value": arr[i].value};
geoArr.push(obj);
}
console.log(geoArr)
if (this.flexpartlayer)
led display
{
if (this.map.hasLayer(this.flexpartlayer))
{
beryl
veLayer(this.flexpartlayer);
}
}
ed是什么this.flexpartlayer = L.geoJson(geoArr, {style: this.style});
this.map.addLayer(this.flexpartlayer);
// this.timer = tTimeout(function(){
// _lf.clearFlexLayer();
// },10000)
},
clearFlexLayer:function()
{
if (this.flexpartlayer)
{
if (this.map.hasLayer(this.flexpartlayer))
{
veLayer(this.flexpartlayer);
}
}compulsory
_lf.flexTxt="";
},
//⽣成格点polygon
getGeometry:function(lon,lat){
so翻译//数据精度是0.003,300⽶
let minx=lon-0.0015;
let miny=lat-0.0015;
let maxx=lon+0.0015;
let maxy=lat+0.0015;
return [[
[minx, miny],
[maxx, miny],
[maxx, maxy],
[minx, maxy],
[minx, miny]
]];
老友记第四季},最好的在线翻译网站
//polygon的样式
style:function(feature)
失败者英文{
let alpha=feature.properties.value===-999?0:0.8;
return {
weight: 1,
opacity: 0,
color: '#fff',
fillOpacity: alpha,
fillColor: Color(feature.properties.value)}
},
//polygon填充的颜⾊
getColor:function(d) {
return d > Math.pow(10,-9) ? '#C5004A' : d > Math.pow(10,-10) ? '#DC4A1C' : d > Math.pow(10,-11) ? '#FEBA00' : d > Math.pow(10,-12) ? '#FFFF00' : d > Math.pow(10,-13) ? '#00EA00' : d > Math.pow(10,-14) ? '#0CEFA6' : d > Math.pow(10,-15) ? '#25C7CD' : '#259ECD';
},改造英文