@sswroom/sswr 1.6.5 → 1.6.6

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/Changelog CHANGED
@@ -1,3 +1,9 @@
1
+ 1.6.6
2
+ -Enhance Email Address checking
3
+ -Added Macau 2009 Grid
4
+ -Added map.LayerInfo minX, minY, maxX, maxY
5
+ -Leaflet support createLayer with bounds
6
+
1
7
  1.6.5
2
8
  -Fixed some bugs
3
9
  -Support cert.keyTypeGetOID
package/leaflet.js CHANGED
@@ -41,6 +41,8 @@ export function createLayer(layer, options)
41
41
  lyrOpts.minZoom = layer.minZoom;
42
42
  if (layer.maxZoom)
43
43
  lyrOpts.maxZoom = layer.maxZoom;
44
+ if (layer.minX != null && layer.minY != null && layer.maxX != null && layer.maxY != null)
45
+ lyrOpts.bounds = L.latLngBounds(L.latLng(layer.minY, layer.minX), L.latLng(layer.maxY, layer.maxX));
44
46
  lyrOpts.maxNativeZoom = lyrOpts.maxZoom;
45
47
  lyrOpts.maxZoom = 25;
46
48
  return L.tileLayer(layer.url, lyrOpts);
package/map.d.ts CHANGED
@@ -45,6 +45,10 @@ declare class LayerInfo
45
45
  format?: string;
46
46
  minZoom?: number;
47
47
  maxZoom?: number;
48
+ minX?: number;
49
+ minY?: number;
50
+ maxX?: number;
51
+ maxY?: number;
48
52
  }
49
53
 
50
54
  declare class GeoJSON
@@ -56,7 +60,7 @@ declare class GeoJSON
56
60
  declare class Geometry
57
61
  {
58
62
  type: GeometryType;
59
- coordinates?: any[];
63
+ coordinates?: number[]|number[][]|number[][][]|number[][][][];
60
64
  geometries?: Geometry[];
61
65
  }
62
66
 
package/math.js CHANGED
@@ -1316,6 +1316,8 @@ export class CoordinateSystemManager
1316
1316
  return this.srCreateGeogCSysData(srid, 6326, "WGS 84");
1317
1317
  case 4611:
1318
1318
  return this.srCreateGeogCSysData(srid, 6611, "Hong Kong 1980");
1319
+ case 8428:
1320
+ return this.srCreateGeogCSysData(srid, 1207, "Macau_2009");
1319
1321
  default:
1320
1322
  console.log("Unsupported Geog SRID: "+srid);
1321
1323
  return null;
@@ -1335,6 +1337,8 @@ export class CoordinateSystemManager
1335
1337
  case 3857:
1336
1338
  case 900913:
1337
1339
  return this.srCreateProjCSysData(srid, 4326, CoordinateSystemType.Mercator1SPProjected, "WGS 84 / Pseudo-Mercator", 0, 0, 0, 0, 1);
1340
+ case 8432:
1341
+ return this.srCreateProjCSysData(srid, 8428, CoordinateSystemType.MercatorProjected, "Macau Grid", 20000.00, 20000.00, 113.53646944444444444444444444444, 22.21239722222222222222222222222222, 1);
1338
1342
  default:
1339
1343
  console.log("Unsupported Proj SRID: "+srid);
1340
1344
  return null;
@@ -1349,11 +1353,13 @@ export class CoordinateSystemManager
1349
1353
  {
1350
1354
  case 2326:
1351
1355
  case 3857:
1356
+ case 8432:
1352
1357
  case 102140:
1353
1358
  case 900913:
1354
1359
  return this.srCreateProjCSys(srid);
1355
1360
  case 4326:
1356
1361
  case 4611:
1362
+ case 8428:
1357
1363
  return this.srCreateGeogCSys(srid);
1358
1364
  default:
1359
1365
  console.log("Unsupported SRID: "+srid);
@@ -1368,6 +1374,8 @@ export class CoordinateSystemManager
1368
1374
  {
1369
1375
  switch (srid)
1370
1376
  {
1377
+ case 1207:
1378
+ return new DatumData(1207, CoordinateSystemManager.srGetSpheroid(7022), "Macao_1920", -2361554.788, 5417536.177, 2391608.926, -202.865, -303.990, -155.873, -34.079, 76.126, 32.660, 6.096, unit.Angle.Unit.ARCSECOND);
1371
1379
  case 6326:
1372
1380
  return new DatumData(6326, CoordinateSystemManager.srGetSpheroid(7030), "WGS_1984", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, unit.Angle.Unit.RADIAN);
1373
1381
  case 6600:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sswroom/sswr",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "Libraries made by sswroom",
5
5
  "main": "sswr.js",
6
6
  "scripts": {
package/text.js CHANGED
@@ -320,6 +320,13 @@ export function isEmailAddress(s)
320
320
  if (charIsAlphaNumeric(s, i) || c == '-')
321
321
  {
322
322
 
323
+ }
324
+ if (c == '_')
325
+ {
326
+ if (atPos != -1)
327
+ {
328
+ return false;
329
+ }
323
330
  }
324
331
  else if (c == '.')
325
332
  {