ofs-object 0.1.3 → 0.1.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/docs/API.md CHANGED
@@ -17,8 +17,12 @@ const layer = ofs.dataSource.addLayer({
17
17
  name: 'คลองส่งน้ำ',
18
18
  type: 'line',
19
19
  zIndex: 2,
20
+ color: '#0ea5e9', // ไม่ใส่ก็ได้ — จะได้สีที่ต่างจากเลเยอร์ที่อยู่บนแผนที่อย่างชัดเจน (สุ่ม)
20
21
  });
21
22
 
23
+ // สีที่อ่านไม่ออก เช่น 'greenish' → throw OFSError ก่อนเพิ่มเลเยอร์
24
+ // อยากได้สีเดิมทุกครั้ง (เทสต์ / screenshot): new OFSThematicEngine({ random: seededFn })
25
+
22
26
  // เพิ่ม Feature พร้อม Undo Record อัตโนมัติ
23
27
  ofs.dataSource.addFeature('canals', lineGeoJsonFeature);
24
28
 
@@ -414,6 +418,8 @@ await mapAdapter.init('map-div', { maplibregl, center: [100.5, 13.7], zoom: 14 }
414
418
 
415
419
  // หรือสำหรับ Mapbox GL JS
416
420
  const mapAdapter = new MapboxAdapter();
421
+ // เลเยอร์ที่ ≤ 5,000 feature ส่งเฉพาะส่วนที่เปลี่ยน (Mapbox ≥ 3.4) เลเยอร์ใหญ่กว่าส่งทั้งชุด
422
+ // ปรับได้: mapAdapter.dynamicSourceMaxFeatures = 2000 (0 = ส่งทั้งชุดเสมอ)
417
423
  await mapAdapter.init('map-div', {
418
424
  mapboxgl,
419
425
  accessToken: 'YOUR_MAPBOX_TOKEN',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofs-object",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Framework-agnostic TypeScript Library for GIS Map Tools (Data Adapter, Draw Tools, Legend & Thematic Symbology, Map Adapters, Web CLI & AI Bridge)",
5
5
  "license": "MIT",
6
6
  "author": "On-Farm Solution Co.,Ltd.",