@fleet-frontend/mower-maps 0.1.0-beta.3 → 0.1.0-beta.4

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/dist/index.esm.js CHANGED
@@ -12335,21 +12335,11 @@ const MowerMapRenderer = forwardRef(({ edger = false, unitType = UnitsType.Imper
12335
12335
  }
12336
12336
  }
12337
12337
  }, [realTimeData, mapJson, pathJson]);
12338
- // useEffect(() => {
12339
- // if (!overlayRef.current || !defaultTransform) return;
12340
- // overlayRef.current?.setTransform(defaultTransform);
12341
- // const validBounds = getValidGpsBounds(mapJson, defaultTransform?.rotation);
12342
- // // 地图数据中的坐标格式是 [longitude, latitude]
12343
- // const swLat = validBounds.sw[1] + defaultTransform.y;
12344
- // const swLng = validBounds.sw[0] + defaultTransform.x;
12345
- // const neLat = validBounds.ne[1] + defaultTransform.y;
12346
- // const neLng = validBounds.ne[0] + defaultTransform.x;
12347
- // const googleBounds = new window.google.maps.LatLngBounds(
12348
- // new window.google.maps.LatLng(swLat, swLng), // 西南角
12349
- // new window.google.maps.LatLng(neLat, neLng) // 东北角
12350
- // );
12351
- // mapRef.fitBounds(googleBounds);
12352
- // }, [defaultTransform]);
12338
+ useEffect(() => {
12339
+ if (!overlayRef.current || !defaultTransform)
12340
+ return;
12341
+ overlayRef.current?.setTransform(defaultTransform);
12342
+ }, [defaultTransform]);
12353
12343
  useEffect(() => {
12354
12344
  if (!overlayRef || !overlayRef.current)
12355
12345
  return;
package/dist/index.js CHANGED
@@ -12337,21 +12337,11 @@ const MowerMapRenderer = React.forwardRef(({ edger = false, unitType = UnitsType
12337
12337
  }
12338
12338
  }
12339
12339
  }, [realTimeData, mapJson, pathJson]);
12340
- // useEffect(() => {
12341
- // if (!overlayRef.current || !defaultTransform) return;
12342
- // overlayRef.current?.setTransform(defaultTransform);
12343
- // const validBounds = getValidGpsBounds(mapJson, defaultTransform?.rotation);
12344
- // // 地图数据中的坐标格式是 [longitude, latitude]
12345
- // const swLat = validBounds.sw[1] + defaultTransform.y;
12346
- // const swLng = validBounds.sw[0] + defaultTransform.x;
12347
- // const neLat = validBounds.ne[1] + defaultTransform.y;
12348
- // const neLng = validBounds.ne[0] + defaultTransform.x;
12349
- // const googleBounds = new window.google.maps.LatLngBounds(
12350
- // new window.google.maps.LatLng(swLat, swLng), // 西南角
12351
- // new window.google.maps.LatLng(neLat, neLng) // 东北角
12352
- // );
12353
- // mapRef.fitBounds(googleBounds);
12354
- // }, [defaultTransform]);
12340
+ React.useEffect(() => {
12341
+ if (!overlayRef.current || !defaultTransform)
12342
+ return;
12343
+ overlayRef.current?.setTransform(defaultTransform);
12344
+ }, [defaultTransform]);
12355
12345
  React.useEffect(() => {
12356
12346
  if (!overlayRef || !overlayRef.current)
12357
12347
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AA6Cf,OAAO,EAAa,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAO1F,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAgGD,eAAO,MAAM,gBAAgB,mGA8tB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AA6Cf,OAAO,EAAa,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAO1F,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAgGD,eAAO,MAAM,gBAAgB,mGAitB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleet-frontend/mower-maps",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.4",
4
4
  "type": "module",
5
5
  "description": "a mower maps in google maps",
6
6
  "main": "dist/index.js",