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

slippy-tile

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slippy-tile - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

23

index.js

@@ -65,14 +65,13 @@ const mercator = require('global-mercator')

function wms (tile, url) {
if (url.match(/{height|width|proj|srs|crs|bbox}/gi)) {
url = url.replace(/{height}/gi, '256')
url = url.replace(/{width}/gi, '256')
url = url.replace(/{size}/gi, '256,256')
url = url.replace(/{(proj|srs|crs)}/gi, 'EPSG:3857')
const bbox = googleToBBox(tile)
const bboxMeters = bboxToMeters(bbox)
if (url.match(/EPSG:(3857|900913)/i) && url.match(/{bbox}/i)) url = url.replace(/{bbox}/gi, bboxMeters.join(','))
if (url.match(/{bbox4326}/i)) url = url.replace(/{bbox4326}/gi, bbox.join(','))
if (url.match(/{bbox3857}/i)) url = url.replace(/{bbox3857}/gi, bboxMeters.join(','))
if (url.match(/{bbox}/i)) url = url.replace(/{bbox}/gi, bbox.join(','))
}
url = url.replace(/{height}/gi, '256')
url = url.replace(/{width}/gi, '256')
url = url.replace(/{size}/gi, '256,256')
url = url.replace(/{(proj|srs|crs)}/gi, 'EPSG:3857')
const bbox = googleToBBox(tile)
const bboxMeters = bboxToMeters(bbox)
if (url.match(/EPSG:(3857|900913)/i) && url.match(/{bbox}/i)) url = url.replace(/{bbox}/gi, bboxMeters.join(','))
url = url.replace(/{bbox4326}/gi, bbox.join(','))
url = url.replace(/{bbox3857}/gi, bboxMeters.join(','))
url = url.replace(/{bbox}/gi, bbox.join(','))
return url

@@ -79,0 +78,0 @@ }

{
"name": "slippy-tile",
"version": "2.3.0",
"version": "2.3.1",
"description": "Helps convert Slippy Map url tile schemas",

@@ -5,0 +5,0 @@ "main": "index.js",

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