Comparing version 0.1.54 to 0.1.56
@@ -1,1 +0,1 @@ | ||
'use strict';function b(c){c=this.options=a.deepMerge(b.options,c),this.markers={}}var a=require('./../../core/utils'),e=a.mercator,f=a.sphere,c=require('./marker'),g=require('lodash'),h=a.isNone,i=require('three'),a=require('bcore/utils'),d=require('bcore/event');b.options={isAble:!0,markerN:100,isDynamic:!0,texture:function(a){return a.text},fog:!0,ratio:1.1,marker:{depthTest:!0,scaleSize:15e5,quality:3,style:{offsetLeft:30,fontSize:55,color:'#0ff',background:'rgba(0,0,0,0)'}},lat:function(a){return a.latlngs.lat},lng:function(a){return a.latlngs.lng},width:function(a){return a.content.width||900},height:function(a){return a.content.height||300},id:function(a,b){return a.id||b}},b=d.extend(b,{addTo:function(a){if(!a)return;this._map=a,this.three3D=a.three3D,this.projection=a.projection},onUpdate:function(a){if(typeof a!=='function')return console.log('必须是函数');this._updateCtx=this._opt.updateCtx=a},remove:function(){var b,a=this.markers;for(var c in a)b=a[c],b.remove();this._data=null,b=null,a=null},data:function(a){this._data=a},draw:function(){var h=this._data;if(!h)return;var m=this.projection,p=this._map,j=this.markers,f=this.getChildOptions(),a=this.options,g=a.ratio,u=a.texture,v=a.id,l=a.lat,q=a.lng,n=a.width,o=a.height,b,k,r,s,t,d,e;for(var i in h)b=h[i],k=v(b,i),r=u(b),s=l(b),t=q(b),e=m.project({lng:t,lat:s}),e.x=e.x*g,e.y=e.y*g,e.z=e.z*g,f.isVisible=a.isAble,f.type=b.type||'text',f.width=n(b)||900,f.height=o(b)||300,d=j[k],d||(d=new c(f),d.addTo(p),j[k]=d),d.updateOptions(f),d.updateTexture(r),d.updatePos(e,b)},each:function(b){var c,a=this.markers;for(var d in a)c=a[d],b&&b(c)},update:function(){this.each(function(a){a&&a.update()})},getChildOptions:function(){var a=this.options;return a.marker},updateOptions:function(b){b&&(this.options=a.deepMerge(this.options,b)),this.draw();var c=this.getChildOptions();c.isVisible=b.isAble,this.each(function(a){a.updateOptions(c)}.bind(this))},render:function(a){a&&this.data(a),this.draw()}}),module.exports=b | ||
'use strict';function b(c){c=this.options=a.deepMerge(b.options,c),this.markers={}}var a=require('./../../core/utils'),e=a.mercator,f=a.sphere,c=require('./marker'),g=require('lodash'),h=a.isNone,i=require('three'),a=require('bcore/utils'),d=require('bcore/event');b.options={isAble:!0,markerN:100,isDynamic:!0,texture:function(a){return a.text},fog:!0,ratio:1.1,marker:{depthTest:!0,scaleSize:15e5,quality:3,style:{offsetLeft:30,fontSize:55,color:'#0ff',background:'rgba(0,0,0,0)'}},lat:function(a){return a.latlngs.lat},lng:function(a){return a.latlngs.lng},width:function(a){return a.content.width||900},height:function(a){return a.content.height||300},id:function(a,b){return a.id||b}},b=d.extend(b,{addTo:function(a){if(!a)return;this._map=a,this.three3D=a.three3D,this.projection=a.projection},onUpdate:function(a){if(typeof a!=='function')return console.log('必须是函数');this._updateCtx=this._opt.updateCtx=a},remove:function(){var b,a=this.markers;for(var c in a)b=a[c],b.remove();this._data=null,b=null,a=null},clean:function(){var a=this.markers;if(a)for(var b in a){var c=a[b];c.remove(),delete a[b]}},data:function(a){this._data=a},draw:function(){var h=this._data;if(!h)return;var m=this.projection,p=this._map,j=this.markers,f=this.getChildOptions(),a=this.options,g=a.ratio,u=a.texture,v=a.id,l=a.lat,q=a.lng,n=a.width,o=a.height,b,k,r,s,t,d,e;for(var i in h)b=h[i],k=v(b,i),r=u(b),s=l(b),t=q(b),e=m.project({lng:t,lat:s}),e.x=e.x*g,e.y=e.y*g,e.z=e.z*g,f.isVisible=a.isAble,f.type=b.type||'text',f.width=n(b)||900,f.height=o(b)||300,d=j[k],d||(d=new c(f),d.addTo(p),j[k]=d),d.updateOptions(f),d.updateTexture(r),d.updatePos(e,b)},each:function(b){var c,a=this.markers;for(var d in a)c=a[d],b&&b(c)},update:function(){this.each(function(a){a&&a.update()})},getChildOptions:function(){var a=this.options;return a.marker},updateOptions:function(b){b&&(this.options=a.deepMerge(this.options,b)),this.draw();var c=this.getChildOptions();c.isVisible=b.isAble,this.each(function(a){a.updateOptions(c)}.bind(this))},render:function(a){a&&this.data(a),this.clean(),this.draw()}}),module.exports=b |
@@ -5,3 +5,3 @@ { | ||
"description": "3d map visualization lib", | ||
"version": "0.1.54", | ||
"version": "0.1.56", | ||
"scripts": { | ||
@@ -8,0 +8,0 @@ "test": "mocha -r jscoverage test" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230686