ofs-object 0.1.5 → 0.1.7

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
@@ -198,6 +198,8 @@ ofs.legendTools.setThematicSimple('parcels', '#0284c7');
198
198
  // 2. จำแนกข้อมูลแบบกลุ่มข้อความ (Categorical / Unique Values)
199
199
  // เหมาะสำหรับประเภทพืช, พันธุ์ข้าว, ชนิดดิน
200
200
  ofs.legendTools.setThematicCategorical('parcels', 'crop', 'category10');
201
+ // ตารางสีตายตัว: เก็บหมวดที่ยังไม่มีข้อมูลไว้ตอน reclassify (สีเดิม, count 0) แทนการลบทิ้ง
202
+ ofs.legendTools.setThematicCategorical('parcels', 'crop', 'category10', { keepEmptyCategories: true });
201
203
 
202
204
  // 3. จำแนกข้อมูลแบบชั้นปริมาณ (Graduated / Choropleth)
203
205
  // เหมาะสำหรับค่า NDVI, ผลผลิต (kg/ไร่), ความชื้น
@@ -375,6 +377,9 @@ ofs.legendTools.setLabel('plots', null); // เอาป้ายออ
375
377
  // บน OpenFreeMap) · ระบุเองด้วย { font: ['Noto Sans Bold'] } · เปลี่ยน renderer (Single/Categorized/
376
378
  // Graduated) แล้ว label ไม่หาย
377
379
  // เส้นช่วยขณะวาด: ofs.drawTools.setGuides({ font: ['Noto Sans Regular'] }) มีผลทันที · null = ตาม basemap
380
+ // basemap แบบ raster (ดาวเทียม, OSM) ไม่มีป้ายให้อ่านฟอนต์ → กำหนดฟอนต์สำรองที่ glyph server มีจริง:
381
+ // new OFSObject({ fallbackFont: ['Noto Sans Regular'] }) หรือ ofs.mapAdapter.setFallbackFont([...])
382
+ // ลำดับ: ฟอนต์ที่ระบุเอง → ฟอนต์ป้ายของ basemap → fallbackFont → ค่า default ของ engine
378
383
 
379
384
  // วัดระยะ / พื้นที่ / มุม (ระยะบนพื้นจริง)
380
385
  import { measureDistance, measureArea, measureAngle, formatArea } from 'ofs-object';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofs-object",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
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.",