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

lightning-maps

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightning-maps - npm Package Compare versions

Comparing version 0.0.4 to 0.0.6

docs/polygons.html

13

package.json
{
"name": "lightning-maps",
"version": "0.0.4",
"description": "Lightweight, dependency-free slippy map renderer",

@@ -8,3 +7,3 @@ "main": "lib/LightningMaps.js",

"build": "webpack --env dev && webpack --env build && cp lib/LightningMaps.min.js docs/LightningMaps.js && npm run test",
"dev": "rm docs/LightningMaps.js && webpack-dev-server --progress --colors --watch --env dev",
"dev": "rm -f docs/LightningMaps.js && webpack-dev-server --progress --colors --watch --env dev",
"test": "mocha --require babel-register --colors ./test/*.spec.js",

@@ -45,8 +44,12 @@ "test:watch": "mocha --require babel-register --colors -w ./test/*.spec.js"

"mocha": "^4.0.1",
"uglifyjs-webpack-plugin": "^1.2.7",
"webpack": "^4.12.2",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.10",
"webpack-dev-server": "^3.1.11",
"yargs": "^10.0.3"
}
},
"dependencies": {
"d3-geo": "^1.11.3",
"topojson-client": "^3.0.0"
},
"version": "0.0.6"
}
# Lightning Maps (*Alpha release*)
A lightweight, dependency-free slippy map renderer.
A lightweight, minimal-dependecy slippy map renderer.

@@ -10,3 +10,3 @@ Heavily inspired by [Pigeon Maps](https://github.com/mariusandra/pigeon-maps) and [Leaflet](https://leafletjs.com), but with slightly different goals in mind:

* Modern, built using ES6+ syntax
* Lightweight, [absolutely zero dependencies](https://github.com/Geocodio/lightning-maps/blob/master/package.json#L28) with a [minified bundle](https://raw.githubusercontent.com/Geocodio/lightning-maps/master/lib/LightningMaps.min.js) of less than 20kb
* Lightweight, [minimal dependencies](https://github.com/Geocodio/lightning-maps/blob/master/package.json#L28) with a [minified bundle](https://raw.githubusercontent.com/Geocodio/lightning-maps/master/lib/LightningMaps.min.js) of less than 20kb
* Ability to render thousands of markers, by using `<canvas>` rendering instead of depending on the DOM

@@ -13,0 +13,0 @@ * Wrappers for React and VueJS (Coming soon)

@@ -76,1 +76,9 @@ export const defaultMapOptions = {

};
export const defaultPolygonOptions = {
/**
* What color should the polygon be?
* Supports hex, rgb and rgba values
*/
color: 'rgba(0, 0, 200, 0.7)'
};
import Map from './Map';
import Marker from './Marker';
import Polygon from './Polygon';
export default {
Map,
Marker
Marker,
Polygon
};
import TileConversion from './TileConversion';
import TileLayer from './TileLayer';
import MapState from './MapState';
import { defaultMapOptions } from './defaultOptions';

@@ -44,2 +45,3 @@

markers: [],
polygons: [],
tileLayers: [

@@ -370,2 +372,3 @@ new TileLayer(this)

this.drawMarkers();
this.drawPolygons();
this.drawAttribution();

@@ -426,2 +429,16 @@ }

drawPolygons() {
const mapState = new MapState(
this.options.center,
this.options.zoom,
this.options.tileSize,
this.state.canvasDimensions,
this.state.moveOffset
);
this.state.polygons.map(polygon => {
polygon.render(this.context, mapState);
});
}
drawAttribution() {

@@ -470,2 +487,6 @@ const margin = 4;

addPolygon(polygon) {
this.state.polygons.push(polygon);
}
}

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

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

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