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

kosmtik-geojson-overlay

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kosmtik-geojson-overlay - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

39

front.js

@@ -13,3 +13,3 @@ L.K.Map.addInitHook(function () {

color: '#F89406',
weight: 3,
weight: 3
},

@@ -20,2 +20,14 @@ params = {

},
builder = new L.K.FormBuilder(params, [
['active', {handler: L.K.Switch, label: 'Active (ctrl+alt+G)'}],
['data', {handler: 'Textarea', placeholder: 'Paste your geojson here.'}]
], {id: 'geojson-overlay-form'}),
syncState = function () {
if (params.active) {
this.geojsonOverlay.addTo(this);
} else {
this.removeLayer(this.geojsonOverlay);
}
builder.fetchAll();
},
addGeojson = function () {

@@ -34,10 +46,2 @@ var geojson;

},
syncState = function () {
if (params.active) {
this.geojsonOverlay.addTo(this);
} else {
this.removeLayer(this.geojsonOverlay);
}
builder.fetchAll();
},
toggle = function () {

@@ -47,6 +51,5 @@ params.active = !params.active;

},
builder = new L.K.FormBuilder(params, [
['active', {handler: L.K.Switch, label: 'Active (ctrl+alt+G)'}],
['data', {handler: 'Textarea', placeholder: 'Paste your geojson here.'}]
], {id: 'geojson-overlay-form'});
fitBounds = function (e) {
this.fitBounds(this.geojsonOverlay.getBounds());
};
title.innerHTML = 'GeoJSON overlay';

@@ -59,2 +62,5 @@ this.geojsonOverlay = L.geoJson(null, {pointToLayer: pointToLayer, onEachFeature: onEachFeature, style: style});

container.appendChild(builder.build());
var zoomTo = L.DomUtil.create('a', 'button', container);
zoomTo.innerHTML = "Zoom to";
L.DomEvent.on(zoomTo, 'click', L.DomEvent.stop).on(zoomTo, 'click', fitBounds, this);
this.sidebar.addTab({

@@ -64,3 +70,3 @@ label: 'GeoJSON',

content: container,
callback: function () {builder.helpers.data.input.focus();},
callback: function () {builder.helpers.data.input.focus();}
});

@@ -80,3 +86,8 @@ this.commands.add({

});
this.commands.add({
callback: fitBounds,
context: this,
name: 'GeoJSON overlay: zoom to'
});
});
});
{
"name": "kosmtik-geojson-overlay",
"version": "0.0.1",
"version": "0.0.2",
"description": "Show a geojson overlay on top of your Kosmtik map",

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