bajo-spatial 1.0.2 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/plugin/factory.js +16 -0
- package/{bajo/method/boundsToTiles.js → plugin/method/bounds-to-tiles.js} +2 -2
- package/{bajo/method/enlargeBounds.js → plugin/method/enlarge-bounds.js} +3 -3
- package/{bajo/method/getTileBounds.js → plugin/method/get-tile-bounds.js} +2 -2
- package/{bajo/method/latToDms.js → plugin/method/lat-to-dms.js} +1 -1
- package/{bajo/method/lngToDms.js → plugin/method/lng-to-dms.js} +1 -1
- package/{bajo/method/tilesToBounds.js → plugin/method/tiles-to-bounds.js} +2 -2
- package/waibuStatic/virtual.json +4 -1
- package/bajo/.alias +0 -1
- package/bajo/config.json +0 -1
- /package/{bajo/method/angleIn90Deg.js → plugin/method/angle-in-90-deg.js} +0 -0
- /package/{bajo → plugin}/method/build-bbox-query.js +0 -0
- /package/{bajo/method/ddToDms.js → plugin/method/dd-to-dms.js} +0 -0
- /package/{bajo/method/divideBounds.js → plugin/method/divide-bounds.js} +0 -0
- /package/{bajo/method/dmsToDd.js → plugin/method/dms-to-dd.js} +0 -0
- /package/{bajo/method/isCoordInBounds.js → plugin/method/is-coord-in-bounds.js} +0 -0
- /package/{bajo/method/isValidCoord.js → plugin/method/is-valid-coord.js} +0 -0
- /package/{bajo/method/latSizeOf.js → plugin/method/lat-size-of.js} +0 -0
- /package/{bajo/method/latToTile.js → plugin/method/lat-to-tile.js} +0 -0
- /package/{bajo/method/lngSizeOf.js → plugin/method/lng-size-of.js} +0 -0
- /package/{bajo/method/lngToTile.js → plugin/method/lng-to-tile.js} +0 -0
- /package/{bajo → plugin}/method/parse-bbox.js +0 -0
- /package/{bajo/method/sanitizeBounds.js → plugin/method/sanitize-bounds.js} +0 -0
- /package/{bajo/method/tileToLat.js → plugin/method/tile-to-lat.js} +0 -0
- /package/{bajo/method/tileToLng.js → plugin/method/tile-to-lng.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bajo-spatial",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Spatial functions for Bajo Framework",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/ardhi/bajo-spatial#readme",
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@turf/turf": "^7.2.0",
|
|
27
28
|
"geolib": "^3.3.4"
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import turf from '@turf/turf'
|
|
2
|
+
|
|
3
|
+
async function factory (pkgName) {
|
|
4
|
+
const me = this
|
|
5
|
+
|
|
6
|
+
return class BajoSpatial extends this.lib.BajoPlugin {
|
|
7
|
+
constructor () {
|
|
8
|
+
super(pkgName, me.app)
|
|
9
|
+
this.alias = 'spatial'
|
|
10
|
+
this.config = {}
|
|
11
|
+
this.lib.turf = turf
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default factory
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import tileToLng from './
|
|
2
|
-
import tileToLat from './
|
|
3
|
-
import boundsToTiles from './
|
|
1
|
+
import tileToLng from './tile-to-lng.js'
|
|
2
|
+
import tileToLat from './tile-to-lat.js'
|
|
3
|
+
import boundsToTiles from './bounds-to-tiles.js'
|
|
4
4
|
|
|
5
5
|
export default function (bounds, zoom) {
|
|
6
6
|
const tiles = boundsToTiles(bounds, zoom)
|
package/waibuStatic/virtual.json
CHANGED
package/bajo/.alias
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
spatial
|
package/bajo/config.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|