Comparing version 1.0.15 to 1.0.16
{ | ||
"name": "venus-map", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "tq-fed-map", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
@@ -116,9 +116,7 @@ import Cluster from 'ol/source/Cluster' | ||
getFeatureStyle(icon, text, render) { | ||
const img = new Image() | ||
img.src = icon.src | ||
return (feature) => { | ||
return new Style({ | ||
image: new Icon({ | ||
img, | ||
imgSize: [img.width, img.height], | ||
src: icon.src, | ||
imgSize: icon.size, | ||
anchor: icon.anchor, | ||
@@ -125,0 +123,0 @@ }), |
@@ -111,13 +111,11 @@ import Vector from 'ol/source/Vector' | ||
getFeatureStyle(icon, text, render) { | ||
const img = new Image() | ||
img.src = icon.src | ||
return (feature) => { | ||
return new Style({ | ||
image: new Icon({ | ||
img, | ||
imgSize: [img.width, img.height], | ||
src: icon.src, | ||
imgSize: icon.size, | ||
anchor: icon.anchor, | ||
}), | ||
text: new Text({ | ||
text: render ? render(feature) : '', | ||
text: render ? render(feature) : feature.get('features').length.toString(), | ||
placement: 'point', | ||
@@ -124,0 +122,0 @@ offsetX: text.offset[0], |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
3034998
4093