| layout | title | description | author | authorsite |
|---|---|---|---|---|
post |
Announcing Leaflet 1.0-rc1 |
Leaflet 1.0 Release Candidate 1 ready |
Iván Sánchez |
The road to Leaflet 1.0 continues - we're proud to get the first release candidate for 1.0 into the wild.
| // To run this, visit https://ivansanchez.gitlab.io/gleo/repl.html and copy-paste into there. | |
| import MercatorMap from "gleo/MercatorMap.mjs"; | |
| import Geometry from "gleo/geometry/Geometry.mjs"; | |
| import epsg4326 from "gleo/crs/epsg4326.mjs"; | |
| // Load and enable proj4js: | |
| import proj4 from "proj4js"; | |
| import { enableProj } from "gleo/crs/projector.mjs"; |
| const jprog = require('pc-nrfjprog-js'); | |
| const rtt = jprog.RTT; | |
| const debug = require('debug'); | |
| function rttReadLoop(sn, ch, size, log){ | |
| rtt.read(ch, size, (err, str)=>{ | |
| if (err) { | |
| log(err); |
| var noble = require('noble'); | |
| noble.on('stateChange', (state)=>{ | |
| console.log(state); | |
| if (state === 'poweredOn') { | |
| noble.startScanning(); | |
| } else { | |
| noble.stopScanning(); | |
| } |
| /* eslint indent:[2, "tab", {"VariableDeclarator": 0}], no-mixed-spaces-and-tabs:[2, "smart-tabs"] */ | |
| // Code snipped from https://github.com/Leaflet/Leaflet/blob/master/src/layer/Layer.js | |
| L.Layer = L.Evented.extend({ | |
| _updateZoomLevels: function () { | |
| var minZoom = Infinity, | |
| maxZoom = -Infinity, | |
| oldZoomSpan = this._getZoomSpan(); |
| cameras: | |
| camera1: | |
| type: perspective | |
| lights: | |
| light1: | |
| type: directional | |
| direction: [0, 1, -.5] | |
| diffuse: .3 | |
| ambient: 1 |
| describe("Map.Drag", function () { | |
| describe("#addHook", function () { | |
| it("calls the map with dragging enabled", function () { | |
| var container = document.createElement('div'); | |
| var map = new L.Map(container, { | |
| dragging: true | |
| }); | |
| expect(map.dragging.enabled()).to.be(true); | |
| map.setView([0, 0], 0); |
| layout | title | description | author | authorsite |
|---|---|---|---|---|
post |
Announcing Leaflet 1.0-rc1 |
Leaflet 1.0 Release Candidate 1 ready |
Iván Sánchez |
The road to Leaflet 1.0 continues - we're proud to get the first release candidate for 1.0 into the wild.
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" /> | |
| <script> | |
| // Trick Leaflet into believing we have a touchscreen (for Chrome) | |
| if (window.Touch) { window.ontouchstart = function(){} }; | |
| </script> |