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

venus-map

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

venus-map - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "venus-map",
"version": "1.0.2",
"version": "1.0.3",
"description": "tq-fed-map",

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

@@ -20,4 +20,6 @@ import OlMap from 'ol/Map'

import Point from 'ol/geom/Point'
class Map {
import EventBus from './components/EventBus'
class Map extends EventBus {
constructor(appKey, id, opt = {}) {
super()
const { center = [116.405994, 39.913607], zoom = 10, minZoom = 4, maxZoom = 19 } = opt

@@ -36,2 +38,15 @@ this.appKey = appKey // 天地图 app key

})
if (window && window.MutationObserver) {
const wrapper = document.getElementById(id)
const observer = new MutationObserver(() => {
const { width, height } = wrapper.getBoundingClientRect()
this.instance.updateSize(width, height)
this.emit('update-size')
})
observer.observe(wrapper, {
attributes: true,
attributeFilter: ['style'],
attributeOldValue: true,
})
}
this.instance.getControls().forEach(c => this.instance.removeControl(c))

@@ -38,0 +53,0 @@ this.instance.appKey = appKey

Sorry, the diff of this file is too big to display

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