Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

ol-mapbox-style

Package Overview
Dependencies
Maintainers
3
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ol-mapbox-style - npm Package Compare versions

Comparing version 6.8.3 to 6.9.0

5

CHANGELOG.md
# Changelog
## 6.9.0
* Add support for the `icon-offset` layout property
* Fix `circle` layers with default radius
## 6.8.3

@@ -4,0 +9,0 @@

17

dist/stylefunction.js

@@ -548,3 +548,3 @@ /*

if (!iconImg) {
var spriteImageData = spriteData[icon];
var spriteImageData_1 = spriteData[icon];
iconImg = new Icon({

@@ -561,6 +561,9 @@ color: iconColor

imgSize: spriteImgSize,
size: [spriteImageData.width, spriteImageData.height],
offset: [spriteImageData.x, spriteImageData.y],
size: [spriteImageData_1.width, spriteImageData_1.height],
offset: [spriteImageData_1.x, spriteImageData_1.y],
rotateWithView: iconRotationAlignment === 'map',
scale: iconSize / spriteImageData.pixelRatio,
scale: iconSize / spriteImageData_1.pixelRatio,
displacement: 'icon-offset' in layout
? getValue(layer, 'layout', 'icon-offset', zoom, f, functionCache).map(function (v) { return -v * spriteImageData_1.pixelRatio; })
: undefined,
});

@@ -599,3 +602,3 @@ iconImageCache[icon_cache_key] = iconImg;

}
if (type == 1 && 'circle-radius' in paint) {
if (type == 1 && layer.type === 'circle') {
++stylesLength;

@@ -610,3 +613,5 @@ style = styles[stylesLength];

}
var circleRadius = getValue(layer, 'paint', 'circle-radius', zoom, f, functionCache);
var circleRadius = 'circle-radius' in paint
? getValue(layer, 'paint', 'circle-radius', zoom, f, functionCache)
: 5;
var circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f, functionCache), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f, functionCache));

@@ -613,0 +618,0 @@ var circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f, functionCache), getValue(layer, 'paint', 'circle-opacity', zoom, f, functionCache));

{
"name": "ol-mapbox-style",
"version": "6.8.3",
"version": "6.9.0",
"description": "Create OpenLayers maps from Mapbox Style objects",

@@ -66,3 +66,3 @@ "main": "dist/index.js",

"should": "^13.2.3",
"sinon": "^12.0.1",
"sinon": "^13.0.0",
"style-loader": "^3.3.1",

@@ -69,0 +69,0 @@ "typescript": "4.5",

@@ -790,2 +790,13 @@ /*

scale: iconSize / spriteImageData.pixelRatio,
displacement:
'icon-offset' in layout
? getValue(
layer,
'layout',
'icon-offset',
zoom,
f,
functionCache
).map((v) => -v * spriteImageData.pixelRatio)
: undefined,
});

@@ -857,3 +868,3 @@ iconImageCache[icon_cache_key] = iconImg;

if (type == 1 && 'circle-radius' in paint) {
if (type == 1 && layer.type === 'circle') {
++stylesLength;

@@ -870,10 +881,13 @@ style = styles[stylesLength];

}
const circleRadius = getValue(
layer,
'paint',
'circle-radius',
zoom,
f,
functionCache
);
const circleRadius =
'circle-radius' in paint
? getValue(
layer,
'paint',
'circle-radius',
zoom,
f,
functionCache
)
: 5;
const circleStrokeColor = colorWithOpacity(

@@ -880,0 +894,0 @@ getValue(

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

Sorry, the diff of this file is not supported yet

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 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc