realmap 1.0.13 → 1.1.0

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/band.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Band v1.0.13
3
+ * RealMap Band v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/band.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Band v1.0.13
3
+ * RealMap Band v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/chart.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Chart v1.0.13
3
+ * RealMap Chart v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/chart.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Chart v1.0.13
3
+ * RealMap Chart v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/editing.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Editing v1.0.13
3
+ * RealMap Editing v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/editing.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Editing v1.0.13
3
+ * RealMap Editing v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/export.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Export v1.0.13
3
+ * RealMap Export v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/export.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Export v1.0.13
3
+ * RealMap Export v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/feature.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as RealMap from 'realmap';
2
- import { ValueSeries, FeatureSeriesOptions, Color, IChart, DataPointLabel, ILegendSource, ValuePoint, MapCoord } from 'realmap';
2
+ import { CoordBaseSeries, FeatureSeriesOptions, Color, IChart, DataPointLabel, ILegendSource, ValuePoint, MapCoord } from 'realmap';
3
3
 
4
4
  declare class FeatureSeriesPoint extends ValuePoint {
5
5
  type?: any;
@@ -11,7 +11,7 @@ declare class FeatureSeriesPoint extends ValuePoint {
11
11
  * {@page op.SeriesOptions#type}은 {@page config.series.map 'map'}이고,
12
12
  * {@page options 설정} 모델은 {@page op.FeatureSeriesOptions}이다.
13
13
  */
14
- declare class FeatureSeries extends ValueSeries<FeatureSeriesOptions> {
14
+ declare class FeatureSeries extends CoordBaseSeries<FeatureSeriesOptions> {
15
15
  static type: string;
16
16
  static defaults: FeatureSeriesOptions;
17
17
  private _detail;
package/feature.js CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
- * RealMap Feature v1.0.13
3
+ * RealMap Feature v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("realmap")):"function"==typeof define&&define.amd?define(["exports","realmap"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RealMapfeature={},e.RealMap)}(this,(function(e,t){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var r=o(t);class i extends t.ValuePoint{_readObject(e,t){super._readObject(e,t),this.center=t.center,this.value=t.value}}class s extends t.DataPointLabel{}s.defaults=t.extend(t.DataPointLabel.defaults,{hoverColor:"white"});class a extends t.ValueSeries{get areaCount(){return this._map.areaCount}get detail(){return this._detail}get color(){return this._colorObj}getValueRange(){return{min:this._minValue,max:this._maxValue}}_createLabel(e){return new s(e)}_doApply(e){t.isObject(e.detail)?this._detail||(this._detail=new a(this.chart)):e.hasOwnProperty("detail")&&(this._detail=null),super._doApply(e)}needMapScale(){return!0}getRangedColor(e){var t;if(!isNaN(e.value)){const o=this._colorRanger||(null===(t=this.chart.getColorScale(this._op.colorScale))||void 0===t?void 0:t.getRanger());return null==o?void 0:o.getColor(this._minValue,this._maxValue,e.value,this._colorObj)}}followTooltipPointer(){return!0}getLegendSources(e,t){return this._points.count>0&&super.getLegendSources(e,t)}_createPoint(e){return new i(e)}_prepareRender(){super._prepareRender()}_doPrepareRender(e,o){super._doPrepareRender(e,o);const r=this._visPoints,{min:i,max:s}=this._calcMinMax(r);if(this._minValue=i,this._maxValue=s,t.isObject(o.colorRange)){const e=t.copyObj(o.colorRange);isNaN(e.minValue)&&(e.minValue=i),isNaN(e.maxValue)&&(e.maxValue=s),this._colorRanger=new t.ColorRanger(e)}else this._colorRanger=null}_doLoadPoints(e){this._useMapData&&(e=this._map._internalAreas().map((e=>({id:e.id,name:e.name})))),super._doLoadPoints(e),this._map}setCalcedColor(e,o){super.setCalcedColor(e,o),this._colorObj=new t.Color(this._calcedColor),this._color=this._colorObj?this._colorObj.toString():null}getColorScale(){return this._op.colorScale}}a.type=t.FeatureSeriesType,a.defaults=t.extend(t.ValueSeries.defaults,{selectable:!1,detailZoom:250});const l="rm-map-series-id-";class n extends t.PointElement{static idClass(e){return l+e.id}static getId(e){for(const t of Array.from(e.classList))if(t.startsWith(l))return t.substring(17)}constructor(e){super(e)}render(e,t,o){const r=this.model,i=!this.point||this.point.isNull;e!==r&&this.setPath((this.model=e).path),o&&(this.setBoolData("null",i),i&&t&&this.internalSetStyleOrClass(t),this.dom.classList.add(n.idClass(e)))}reset(){this.model=null}}class h extends t.SeriesView{constructor(e){super(e,"rm-feature-series",!0,!1),this._areas={},this._areaPool=new t.PointViewPool(this._pointContainer,n)}get hoverArea(){return this._hoverArea}set hoverArea(e){var o,r;const i=this._hoverArea;if(e!==i){const s=this.model;if(i&&(i.setBoolData(t.SeriesView.DATA_HOVER,!1),i.point&&(null===(o=this._labelContainer.get(i.point,0))||void 0===o||o._text.setBoolData(t.SeriesView.DATA_HOVER,!1))),e&&!e.point&&(e=void 0),this._hoverArea=e,e){const o=this.model.options,i=document.querySelector(".rm-root");let s=o.hoverColor,a=this.model.pointLabel.options.hoverColor;!s&&t.isObject(o.hoverStyle)&&(s=o.hoverStyle.fill),i.style.setProperty("--map-series-hover-fill",s||""),i.style.setProperty("--map-series-hover-label-fill",a||""),e.setBoolData(t.SeriesView.DATA_HOVER,!0),e.point&&(null===(r=this._labelContainer.get(e.point,0))||void 0===r||r._text.setBoolData(t.SeriesView.DATA_HOVER,!0))}e!=i&&s.chart._hoverAreaChanged(s,null==e?void 0:e.model,null==i?void 0:i.model)}}areaOfDom(e){let t=e;for(;t;){if(t.classList.contains("rm-point")){const e=n.getId(t);if(e)return this._areas[e];break}t=t.parentElement}}_getPointPool(){return this._areaPool}_setModelColor(e){this._pointContainer.setFill(e)}_setPointColor(e,t){e.setFill(t)}_doPrepeare(e,t,o){this._second;const r=t.options.bringToFront?[]:null;this._areaPool.prepare(t.areaCount,((e,t)=>{})),r&&r.length!==t.areaCount&&r.forEach((e=>{e.parent.moveToLast(e)}))}_doRender(e,t){this.$_layoutAreas(e,t)}_doReset(){this._areaPool.forEach((e=>{e.visible&&e.reset()}))}_doPointerMoved(e,t,o){const r=this.areaOfDom(o);return this.hoverArea=r,!0}_doPointClicked(e){this.model.chart._areaClicked(this.model,e.model)}_runShowEffect(e){e&&t.SeriesAnimation.grow(this)}_doViewRateChanged(e){this.$_layoutAreas(this.width,this.height)}$_layoutAreas(e,t){const o=this.chart(),r=this._second;o.isDirty,o.body;const i=this.model;i.options,o.getProjection(r),this._areas={},i.pointLabel,this._labelViews(),this._scale,this._areaPool.forEach(((e,t)=>{}))}}function d(e){(function(e){return e.Series&&e.SeriesView})(e)&&(e.Series.register(a),e.SeriesView.register([a,h]))}d(r),e.FeatureSeries=a,e.default=d,Object.defineProperty(e,"__esModule",{value:!0})}));
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("realmap")):"function"==typeof define&&define.amd?define(["exports","realmap"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RealMapfeature={},e.RealMap)}(this,(function(e,t){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var r=o(t);class i extends t.ValuePoint{_readObject(e,t){super._readObject(e,t),this.center=t.center,this.value=t.value}}class s extends t.DataPointLabel{}s.defaults=t.extend(t.DataPointLabel.defaults,{hoverColor:"white"});class a extends t.CoordBaseSeries{get areaCount(){return this._map.areaCount}get detail(){return this._detail}get color(){return this._colorObj}getValueRange(){return{min:this._minValue,max:this._maxValue}}_createLabel(e){return new s(e)}_doApply(e){t.isObject(e.detail)?this._detail||(this._detail=new a(this.chart)):e.hasOwnProperty("detail")&&(this._detail=null),super._doApply(e)}needMapScale(){return!0}getRangedColor(e){var t;if(!isNaN(e.value)){const o=this._colorRanger||(null===(t=this.chart.getColorScale(this._op.colorScale))||void 0===t?void 0:t.getRanger());return null==o?void 0:o.getColor(this._minValue,this._maxValue,e.value,this._colorObj)}}followTooltipPointer(){return!0}getLegendSources(e,t){return this._points.count>0&&super.getLegendSources(e,t)}_createPoint(e){return new i(e)}_prepareRender(){super._prepareRender()}_doPrepareRender(e,o){super._doPrepareRender(e,o);const r=this._visPoints,{min:i,max:s}=this._calcMinMax(r);if(this._minValue=i,this._maxValue=s,t.isObject(o.colorRange)){const e=t.copyObj(o.colorRange);isNaN(e.minValue)&&(e.minValue=i),isNaN(e.maxValue)&&(e.maxValue=s),this._colorRanger=new t.ColorRanger(e)}else this._colorRanger=null}_doLoadPoints(e){this._useMapData&&(e=this._map._internalAreas().map((e=>({id:e.id,name:e.name})))),super._doLoadPoints(e),this._map}setCalcedColor(e,o){super.setCalcedColor(e,o),this._colorObj=new t.Color(this._calcedColor),this._color=this._colorObj?this._colorObj.toString():null}getColorScale(){return this._op.colorScale}}a.type=t.FeatureSeriesType,a.defaults=t.extend(t.CoordBaseSeries.defaults,{selectable:!1,detailZoom:250});const l="rm-map-series-id-";class n extends t.PointElement{static idClass(e){return l+e.id}static getId(e){for(const t of Array.from(e.classList))if(t.startsWith(l))return t.substring(17)}constructor(e){super(e)}render(e,t,o){const r=this.model,i=!this.point||this.point.isNull;e!==r&&this.setPath((this.model=e).path),o&&(this.setBoolData("null",i),i&&t&&this.internalSetStyleOrClass(t),this.dom.classList.add(n.idClass(e)))}reset(){this.model=null}}class h extends t.SeriesView{constructor(e){super(e,"rm-feature-series",!0,!1),this._areas={},this._areaPool=new t.PointViewPool(this._pointContainer,n)}get hoverArea(){return this._hoverArea}set hoverArea(e){var o,r;const i=this._hoverArea;if(e!==i){const s=this.model;if(i&&(i.setBoolData(t.SeriesView.DATA_HOVER,!1),i.point&&(null===(o=this._labelContainer.get(i.point,0))||void 0===o||o._text.setBoolData(t.SeriesView.DATA_HOVER,!1))),e&&!e.point&&(e=void 0),this._hoverArea=e,e){const o=this.model.options,i=document.querySelector(".rm-root");let s=o.hoverColor,a=this.model.pointLabel.options.hoverColor;!s&&t.isObject(o.hoverStyle)&&(s=o.hoverStyle.fill),i.style.setProperty("--map-series-hover-fill",s||""),i.style.setProperty("--map-series-hover-label-fill",a||""),e.setBoolData(t.SeriesView.DATA_HOVER,!0),e.point&&(null===(r=this._labelContainer.get(e.point,0))||void 0===r||r._text.setBoolData(t.SeriesView.DATA_HOVER,!0))}e!=i&&s.chart._hoverAreaChanged(s,null==e?void 0:e.model,null==i?void 0:i.model)}}areaOfDom(e){let t=e;for(;t;){if(t.classList.contains("rm-point")){const e=n.getId(t);if(e)return this._areas[e];break}t=t.parentElement}}_getPointPool(){return this._areaPool}_setModelColor(e){this._pointContainer.setFill(e)}_setPointColor(e,t){e.setFill(t)}_doPrepeare(e,t,o){const r=t.options.bringToFront?[]:null;this._areaPool.prepare(t.areaCount,((e,t)=>{})),r&&r.length!==t.areaCount&&r.forEach((e=>{e.parent.moveToLast(e)}))}_doRender(e,t){this.$_layoutAreas(e,t)}_doReset(){this._areaPool.forEach((e=>{e.visible&&e.reset()}))}_doPointerMoved(e,t,o){const r=this.areaOfDom(o);return this.hoverArea=r,!0}_doPointClicked(e){this.model.chart._areaClicked(this.model,e.model)}_runShowEffect(e){e&&t.SeriesAnimation.grow(this)}_doViewRateChanged(e){this.$_layoutAreas(this.width,this.height)}$_layoutAreas(e,t){const o=this.chart();o.isDirty,o.body;const r=this.model;r.options,o.getProjection(),this._areas={},r.pointLabel,this._labelViews(),this._scale,this._areaPool.forEach(((e,t)=>{}))}}function d(e){(function(e){return e.Series&&e.SeriesView})(e)&&(e.Series.register(a),e.SeriesView.register([a,h]))}d(r),e.FeatureSeries=a,e.default=d,Object.defineProperty(e,"__esModule",{value:!0})}));
package/feature.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
- * RealMap Feature v1.0.13
3
+ * RealMap Feature v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
7
- import{extend as e,DataPointLabel as t,FeatureSeriesType as o,ValueSeries as r,isObject as s,copyObj as i,ColorRanger as a,Color as l,ValuePoint as n,SeriesView as h,PointViewPool as d,SeriesAnimation as c,PointElement as _}from"./index.mjs";class u extends n{_readObject(e,t){super._readObject(e,t),this.center=t.center,this.value=t.value}}class p extends t{}p.defaults=e(t.defaults,{hoverColor:"white"});class m extends r{get areaCount(){return this._map.areaCount}get detail(){return this._detail}get color(){return this._colorObj}getValueRange(){return{min:this._minValue,max:this._maxValue}}_createLabel(e){return new p(e)}_doApply(e){s(e.detail)?this._detail||(this._detail=new m(this.chart)):e.hasOwnProperty("detail")&&(this._detail=null),super._doApply(e)}needMapScale(){return!0}getRangedColor(e){var t;if(!isNaN(e.value)){const o=this._colorRanger||(null===(t=this.chart.getColorScale(this._op.colorScale))||void 0===t?void 0:t.getRanger());return null==o?void 0:o.getColor(this._minValue,this._maxValue,e.value,this._colorObj)}}followTooltipPointer(){return!0}getLegendSources(e,t){return this._points.count>0&&super.getLegendSources(e,t)}_createPoint(e){return new u(e)}_prepareRender(){super._prepareRender()}_doPrepareRender(e,t){super._doPrepareRender(e,t);const o=this._visPoints,{min:r,max:l}=this._calcMinMax(o);if(this._minValue=r,this._maxValue=l,s(t.colorRange)){const e=i(t.colorRange);isNaN(e.minValue)&&(e.minValue=r),isNaN(e.maxValue)&&(e.maxValue=l),this._colorRanger=new a(e)}else this._colorRanger=null}_doLoadPoints(e){this._useMapData&&(e=this._map._internalAreas().map((e=>({id:e.id,name:e.name})))),super._doLoadPoints(e),this._map}setCalcedColor(e,t){super.setCalcedColor(e,t),this._colorObj=new l(this._calcedColor),this._color=this._colorObj?this._colorObj.toString():null}getColorScale(){return this._op.colorScale}}m.type=o,m.defaults=e(r.defaults,{selectable:!1,detailZoom:250});const g="rm-map-series-id-";class v extends _{static idClass(e){return g+e.id}static getId(e){for(const t of Array.from(e.classList))if(t.startsWith(g))return t.substring(17)}constructor(e){super(e)}render(e,t,o){const r=this.model,s=!this.point||this.point.isNull;e!==r&&this.setPath((this.model=e).path),o&&(this.setBoolData("null",s),s&&t&&this.internalSetStyleOrClass(t),this.dom.classList.add(v.idClass(e)))}reset(){this.model=null}}class f extends h{constructor(e){super(e,"rm-feature-series",!0,!1),this._areas={},this._areaPool=new d(this._pointContainer,v)}get hoverArea(){return this._hoverArea}set hoverArea(e){var t,o;const r=this._hoverArea;if(e!==r){const i=this.model;if(r&&(r.setBoolData(h.DATA_HOVER,!1),r.point&&(null===(t=this._labelContainer.get(r.point,0))||void 0===t||t._text.setBoolData(h.DATA_HOVER,!1))),e&&!e.point&&(e=void 0),this._hoverArea=e,e){const t=this.model.options,r=document.querySelector(".rm-root");let i=t.hoverColor,a=this.model.pointLabel.options.hoverColor;!i&&s(t.hoverStyle)&&(i=t.hoverStyle.fill),r.style.setProperty("--map-series-hover-fill",i||""),r.style.setProperty("--map-series-hover-label-fill",a||""),e.setBoolData(h.DATA_HOVER,!0),e.point&&(null===(o=this._labelContainer.get(e.point,0))||void 0===o||o._text.setBoolData(h.DATA_HOVER,!0))}e!=r&&i.chart._hoverAreaChanged(i,null==e?void 0:e.model,null==r?void 0:r.model)}}areaOfDom(e){let t=e;for(;t;){if(t.classList.contains("rm-point")){const e=v.getId(t);if(e)return this._areas[e];break}t=t.parentElement}}_getPointPool(){return this._areaPool}_setModelColor(e){this._pointContainer.setFill(e)}_setPointColor(e,t){e.setFill(t)}_doPrepeare(e,t,o){this._second;const r=t.options.bringToFront?[]:null;this._areaPool.prepare(t.areaCount,((e,t)=>{})),r&&r.length!==t.areaCount&&r.forEach((e=>{e.parent.moveToLast(e)}))}_doRender(e,t){this.$_layoutAreas(e,t)}_doReset(){this._areaPool.forEach((e=>{e.visible&&e.reset()}))}_doPointerMoved(e,t,o){const r=this.areaOfDom(o);return this.hoverArea=r,!0}_doPointClicked(e){this.model.chart._areaClicked(this.model,e.model)}_runShowEffect(e){e&&c.grow(this)}_doViewRateChanged(e){this.$_layoutAreas(this.width,this.height)}$_layoutAreas(e,t){const o=this.chart(),r=this._second;o.isDirty,o.body;const s=this.model;s.options,o.getProjection(r),this._areas={},s.pointLabel,this._labelViews(),this._scale,this._areaPool.forEach(((e,t)=>{}))}}function C(e){(function(e){return e.Series&&e.SeriesView})(e)&&(e.Series.register(m),e.SeriesView.register([m,f]))}export{m as FeatureSeries,C as default};
7
+ import{extend as e,DataPointLabel as t,FeatureSeriesType as o,CoordBaseSeries as r,isObject as s,copyObj as i,ColorRanger as a,Color as l,ValuePoint as n,SeriesView as h,PointViewPool as d,SeriesAnimation as c,PointElement as u}from"./index.mjs";class _ extends n{_readObject(e,t){super._readObject(e,t),this.center=t.center,this.value=t.value}}class p extends t{}p.defaults=e(t.defaults,{hoverColor:"white"});class m extends r{get areaCount(){return this._map.areaCount}get detail(){return this._detail}get color(){return this._colorObj}getValueRange(){return{min:this._minValue,max:this._maxValue}}_createLabel(e){return new p(e)}_doApply(e){s(e.detail)?this._detail||(this._detail=new m(this.chart)):e.hasOwnProperty("detail")&&(this._detail=null),super._doApply(e)}needMapScale(){return!0}getRangedColor(e){var t;if(!isNaN(e.value)){const o=this._colorRanger||(null===(t=this.chart.getColorScale(this._op.colorScale))||void 0===t?void 0:t.getRanger());return null==o?void 0:o.getColor(this._minValue,this._maxValue,e.value,this._colorObj)}}followTooltipPointer(){return!0}getLegendSources(e,t){return this._points.count>0&&super.getLegendSources(e,t)}_createPoint(e){return new _(e)}_prepareRender(){super._prepareRender()}_doPrepareRender(e,t){super._doPrepareRender(e,t);const o=this._visPoints,{min:r,max:l}=this._calcMinMax(o);if(this._minValue=r,this._maxValue=l,s(t.colorRange)){const e=i(t.colorRange);isNaN(e.minValue)&&(e.minValue=r),isNaN(e.maxValue)&&(e.maxValue=l),this._colorRanger=new a(e)}else this._colorRanger=null}_doLoadPoints(e){this._useMapData&&(e=this._map._internalAreas().map((e=>({id:e.id,name:e.name})))),super._doLoadPoints(e),this._map}setCalcedColor(e,t){super.setCalcedColor(e,t),this._colorObj=new l(this._calcedColor),this._color=this._colorObj?this._colorObj.toString():null}getColorScale(){return this._op.colorScale}}m.type=o,m.defaults=e(r.defaults,{selectable:!1,detailZoom:250});const g="rm-map-series-id-";class v extends u{static idClass(e){return g+e.id}static getId(e){for(const t of Array.from(e.classList))if(t.startsWith(g))return t.substring(17)}constructor(e){super(e)}render(e,t,o){const r=this.model,s=!this.point||this.point.isNull;e!==r&&this.setPath((this.model=e).path),o&&(this.setBoolData("null",s),s&&t&&this.internalSetStyleOrClass(t),this.dom.classList.add(v.idClass(e)))}reset(){this.model=null}}class f extends h{constructor(e){super(e,"rm-feature-series",!0,!1),this._areas={},this._areaPool=new d(this._pointContainer,v)}get hoverArea(){return this._hoverArea}set hoverArea(e){var t,o;const r=this._hoverArea;if(e!==r){const i=this.model;if(r&&(r.setBoolData(h.DATA_HOVER,!1),r.point&&(null===(t=this._labelContainer.get(r.point,0))||void 0===t||t._text.setBoolData(h.DATA_HOVER,!1))),e&&!e.point&&(e=void 0),this._hoverArea=e,e){const t=this.model.options,r=document.querySelector(".rm-root");let i=t.hoverColor,a=this.model.pointLabel.options.hoverColor;!i&&s(t.hoverStyle)&&(i=t.hoverStyle.fill),r.style.setProperty("--map-series-hover-fill",i||""),r.style.setProperty("--map-series-hover-label-fill",a||""),e.setBoolData(h.DATA_HOVER,!0),e.point&&(null===(o=this._labelContainer.get(e.point,0))||void 0===o||o._text.setBoolData(h.DATA_HOVER,!0))}e!=r&&i.chart._hoverAreaChanged(i,null==e?void 0:e.model,null==r?void 0:r.model)}}areaOfDom(e){let t=e;for(;t;){if(t.classList.contains("rm-point")){const e=v.getId(t);if(e)return this._areas[e];break}t=t.parentElement}}_getPointPool(){return this._areaPool}_setModelColor(e){this._pointContainer.setFill(e)}_setPointColor(e,t){e.setFill(t)}_doPrepeare(e,t,o){const r=t.options.bringToFront?[]:null;this._areaPool.prepare(t.areaCount,((e,t)=>{})),r&&r.length!==t.areaCount&&r.forEach((e=>{e.parent.moveToLast(e)}))}_doRender(e,t){this.$_layoutAreas(e,t)}_doReset(){this._areaPool.forEach((e=>{e.visible&&e.reset()}))}_doPointerMoved(e,t,o){const r=this.areaOfDom(o);return this.hoverArea=r,!0}_doPointClicked(e){this.model.chart._areaClicked(this.model,e.model)}_runShowEffect(e){e&&c.grow(this)}_doViewRateChanged(e){this.$_layoutAreas(this.width,this.height)}$_layoutAreas(e,t){const o=this.chart();o.isDirty,o.body;const r=this.model;r.options,o.getProjection(),this._areas={},r.pointLabel,this._labelViews(),this._scale,this._areaPool.forEach(((e,t)=>{}))}}function C(e){(function(e){return e.Series&&e.SeriesView})(e)&&(e.Series.register(m),e.SeriesView.register([m,f]))}export{m as FeatureSeries,C as default};
package/gl.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ import * as RealMap from 'realmap';
2
+ import { GLSeriesOptions, ValueSeries, IChart, ValuePoint, MapCoord } from 'realmap';
3
+
4
+ /**
5
+ */
6
+ declare class GLSeriesPoint extends ValuePoint {
7
+ glPoint: MapCoord;
8
+ }
9
+ /**
10
+ * WebGL 시리즈 기반 모델.<br/>
11
+ *
12
+ * @modules gl
13
+ */
14
+ declare abstract class GLSeries<OP extends GLSeriesOptions = GLSeriesOptions> extends ValueSeries<OP> {
15
+ static defaults: GLSeriesOptions;
16
+ private _hitPoints;
17
+ protected _doApply(options: OP): void;
18
+ protected _createPoint(source: any): GLSeriesPoint;
19
+ isPointLabelsVisible(): boolean;
20
+ protected _defLabelOff(): number;
21
+ protected _doPrepareRender(chart: IChart, op: OP): void;
22
+ protected abstract _getHitRadius(): number;
23
+ hitTest(x: number, y: number): GLSeriesPoint[];
24
+ }
25
+
26
+ declare function registerSeries(chart: typeof RealMap): void;
27
+
28
+ export { GLSeries as GlSeries, registerSeries as default };
package/gl.js ADDED
@@ -0,0 +1,7 @@
1
+
2
+ /**
3
+ * RealMap Gl v1.1.0
4
+ * Copyright (C) 2023-2025 WooriTech Inc.
5
+ * All Rights Reserved.
6
+ */
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realmap")):"function"==typeof define&&define.amd?define(["exports","realmap"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealMapgl={},t.RealMap)}(this,(function(t,e){"use strict";function r(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var a=r(e);class i extends e.ValuePoint{}class n extends e.ValueSeries{_doApply(t){super._doApply(t)}_createPoint(t){return new i(t)}isPointLabelsVisible(){return!1}_defLabelOff(){return 2}_doPrepareRender(t,e){super._doPrepareRender(t,e),this._hitPoints=void 0}hitTest(t,e){this._hitPoints||!0===this._op.disabled||(console.time("prepare gl hit tests"),this._hitPoints=this._visPoints.slice().sort(((t,e)=>t.glPoint[0]-e.glPoint[0])),console.timeEnd("prepare gl hit tests"));const r=this._hitPoints;if(!r)return;const a=this._getHitRadius(),i=[];let n=0,s=r.length-1,o=-1;for(;n<=s;){const e=Math.floor((n+s)/2),i=r[e];if(t<i.glPoint[0]-a)s=e-1;else{if(!(t>=i.glPoint[0]+a)){o=e;break}n=e+1}}if(-1===o)return i;let l=o;for(;l>=0&&r[l].glPoint[0]-a<=t;)r[l].glPoint[0]+a>t&&i.unshift(r[l]),l--;for(l=o+1;l<r.length&&r[l].glPoint[0]-a<=t;)r[l].glPoint[1]+a>t&&i.push(r[l]),l++;return i.length>0?i.filter((t=>e>=t.glPoint[1]-a&&e<t.glPoint[1]+a)):void 0}}n.defaults=e.extend(e.ValueSeries.defaults,{});class s extends i{_readObject(t,e){super._readObject(t,e)}}class o extends n{getRadius(){return e.pickNum(this._op.radius,o.defaults.radius)}_doApply(t){super._doApply(t)}_createPoint(t){return new s(t)}_defLabelOff(){return 2}_getHitRadius(){return this.getRadius()}}o.type=e.GLPointSeriesType,o.defaults=e.extend(n.defaults,{radius:5,position:"center"});const l=Array.isArray,c=Math.min,f=Math.max,h=Math.abs,u=function(t,e){return t=parseFloat(t),isNaN(t)?parseFloat(e):t};let d=0;class g{$_hash;$_destroyed=!1;$_destroying=!1;constructor(t){t||(this.$_hash=String(d++))}destroy(){return!this.$_destroyed&&!this.$_destroying&&(this.$_destroying=!0,this._doDestory(),this.$_destroyed=!0),null}_doDestory(){}get destroying(){return this.$_destroying}get orphaned(){return this.$_destroying||this.$_destroyed}get hash(){return this.$_hash}isMe(t){return t===this.$_hash}toString(){return this.constructor.name}toBool(t){return"string"==typeof t?"true"===t:t}toNum(t,e=NaN){return t=parseFloat(t),isNaN(t)?e:t}}class p extends g{_width;_height;_mat;_gl;_program;constructor(t){super(),this._gl=t._gl}_doDestory(){if(this._program){const t=this._gl;t.getAttachedShaders(this._program).forEach((e=>t.deleteShader(e))),t.deleteProgram(this._program),this._program=null}}_run(t,e,r,a){this._program||(this._program=this.$_createProgram(this._gl,this._getVShader(),this._getFShader())),(r!==this._width||a!==this._height)&&(this.$_useProgram(this._gl,this._program),this._width=r,this._height=a,this._mat=this.$_createMatrix(0,0,r,a),t.viewport(0,0,r,a),t.uniformMatrix4fv(t.getUniformLocation(this._program,"u_matrix"),!1,this._mat)),t.bindBuffer(t.ARRAY_BUFFER,e),this._doRun(t,e,r,a)}$_createShader(t,e,r){const a=t.createShader(e);if(!a)throw new Error("Failed to create a shader");if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){const e=t.getShaderInfoLog(a);throw t.deleteShader(a),new Error(`Shader compilation failed:\n${r.split("\n").map(((t,e)=>`${e+1}: ${t}`)).join("\n")}\n\n${e}`)}return a}$_createProgram(t,e,r){const a=this.$_createShader(t,t.VERTEX_SHADER,e),i=this.$_createShader(t,t.FRAGMENT_SHADER,r),n=t.createProgram();if(!n)throw new Error("Failed to create a program");if(t.attachShader(n,a),t.attachShader(n,i),t.linkProgram(n),!t.getProgramParameter(n,t.LINK_STATUS))throw t.getShaderInfoLog(n),t.deleteProgram(n),new Error(t.getProgramInfoLog(n));return n}$_useProgram(t,e){t.useProgram(e)}$_createMatrix(t,e,r,a){return new Float32Array([2/(r-t),0,0,0,0,2/(e-a),0,0,0,0,1,0,-(r+t)/(r-t),-(e+a)/(e-a),0,1])}_drawTrianlges(t,e){t.bufferData(t.ARRAY_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.drawArrays(t.TRIANGLES,0,e.length/2)}_drawPoints(t,e,r){t.bufferData(t.ARRAY_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.drawArrays(t.POINTS,0,e.length/r)}_drawLines(t,e,r,a){t.bufferData(t.ARRAY_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.drawArrays(a?t.LINE_LOOP:t.LINES,0,e.length/r)}}class _ extends g{_gl;_buffer;_programs;constructor(t){super();const e=this._gl=t.getContext("webgl");if(!e)throw new Error("WebGL not supported");this._buffer=e.createBuffer()}_doDestory(){const t=this._gl;t&&(t.deleteBuffer(this._buffer),this._programs.forEach((t=>t.destroy())),this._gl=null)}render(t,e=!0,r,a){const i=this._gl;console.time("gl_render"),e&&this.$_clear(),t.forEach((t=>t._run(i,this._buffer,u(r,i.canvas.width),u(a,i.canvas.height)))),console.timeEnd("gl_render")}$_clear(){const t=this._gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)}}const m=(new Date).getTime();typeof window<"u"&&!Element.prototype.animate&&(Element.prototype.animate=function(t){});const b=typeof navigator<"u"?navigator.userAgent:"",y=b?navigator.appVersion:"";b.match(/Trident.*rv\:11\./),y.indexOf("MSIE 10"),y.indexOf("MSIE 9");class w{static LOGGING=!1;static log(...t){this.LOGGING&&console.log(...t)}static logIf(t,...e){this.LOGGING&&t&&console.log(...e)}static week_days=["일","월","화","수","목","금","토"];static long_week_days=["일요일","월요일","화요일","수요일","목요일","금요일","토요일"];static month_days=[[31,28,31,30,31,30,31,31,30,31,30,31],[31,29,31,30,31,30,31,31,30,31,30,31]];static now(){return+new Date}static parseDate(t,e){const r=new Date(t);return isNaN(r.getTime())?e||new Date:r}static isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}static dateOfYear(t){var e=t.getMonth(),r=t.getDate(),a=[0,31,59,90,120,151,181,212,243,273,304,334][e]+r;return e>1&&w.isLeapYear(t.getFullYear())&&a++,a}static incMonth(t,e){const r=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(c(r,w.month_days[w.isLeapYear(t.getFullYear())?1:0][t.getMonth()])),t}static minDate(t,e){return null!==t?t:null!==e?e:t.getTime()<e.getTime()?t:e}static maxDate(t,e){return null!==t?e:null!==e||t.getTime()>e.getTime()?t:e}static weekOfMonth(t,e,r){const a=t.getMonth(),i=t.getFullYear(),n=new Date(i,a,1).getDay(),s=new Date(i,a+1,0).getDate(),o=t.getDate()+n-1,l=e+Math.ceil((s+n-7)/7),c=e+Math.floor(o/7);return r||c<2+e?c:c===l?e+5:c}static weekOfYear(t,e){const r=t.getFullYear(),a=new Date(r,0,1).getDay(),i=this.dateOfYear(t)+a-1;return e+Math.floor(i/7)}static isObject(t){return t&&"object"==typeof t&&!l(t)}static isValidObject(t){if(this.isObject(t))for(let e in t)if(t.hasOwnProperty(e))return!0}static checkArray(t){return l(t)?t:void 0}static makeArray(t,e=!1){return null!=t?l(t)?t:[t]:e?[]:void 0}static makeNumArray(t){return l(t)?t.map((t=>+t)):null!=t?[+t]:[]}static getIntArray(t,e=0){const r=[];for(let a=e,i=e+t;a<i;a++)r.push(a);return r}static isValueArray(t){if(l(t)){for(let e=t.length-1;e>=0;e--)if(null!=t[e]&&"object"==typeof t[e])return!1;return!0}return!1}static toArray(t){return l(t)?t:null!=t?[t]:null}static copyArray(t){return l(t)?t.slice(0):null!=t?[t]:void 0}static push(t,e){if(e&&e.length>0)for(let r=0,a=e.length;r<a;r++)t.push(e[r])}static isDefined(t){return null!=t}static isNotDefined(t){return null==t}static isNum(t){return"number"==typeof t}static canNumber(t){return!isNaN(t)&&!isNaN(parseFloat(t))}static isValidNum(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}static getNum(t,e=0){const r=parseFloat(t);return isFinite(r)?r:e}static toNum(t,e=0){return isNaN(t)||null===t||""===t?e:+t}static compareText(t,e,r=!1){return t=t||"",e=e||"",r&&(t=t.toLocaleLowerCase(),e=e.toLocaleLowerCase()),t>e?1:t<e?-1:0}static getTimeF(){return(new Date).getTime()/1e3}static getTimer(){return(new Date).getTime()-m}static isWhiteSpace(t){return!t||!t.trim()}static pad(t,e,r){return e=f(e||2,1),r=r||"0",new Array(e-String(t).length+1).join(r)+t}static pad16(t,e,r){return e=f(e||2,1),r=r||"0",new Array(e-t.toString(16).length+1).join(r)+t.toString(16)}static pick(...t){const e=t.length;let r;for(let a=0;a<e;a++)if(r=t[a],null!=r)return r}static toStr(t){return Number.isNaN(t)||null==t?"":String(t)}static extend(t,e){t=t||{};for(let r in e)t[r]=e[r];return t}static equalNumbers(t,e){return isNaN(t)==isNaN(e)&&!isNaN(t)&&t==e}static equalArrays(t,e){if(t===e)return!0;if(null==t||null==e)return!1;const r=t.length;if(r!=e.length)return!1;for(let a=0;a<r;++a)if(t[a]!==e[a])return!1;return!0}static isEmpty(t){if(t)for(let e in t)return!1;return!0}static isNotEmpty(t){if(t)for(let e in t)return!0;return!1}static deepClone(t){if(t instanceof Date)return new Date(t);if(null==t||"object"!=typeof t)return t;{const e=l(t)?[]:{};for(let r of Object.keys(t))e[r]=w.deepClone(t[r]);return e}}static getArray(t,e){const r=[];for(let a=0;a<t;a++)r.push(e);return r}static getNumArray(t,e=0){const r=[];for(let a=0;a<t;a++)r.push(e);return r}static dedupe(t,e){t=t.sort(e||((t,e)=>t>e?1:t<e?-1:0));for(let e=t.length-1;e>0;e--)t[e]===t[e-1]&&t.splice(e,1);return t}static sortNum(t){return t.sort(((t,e)=>t-e))}static logElapsed(t,e){const r=+new Date;e(),w.log(t,+new Date-r+"ms")}static clamp(t,e,r){return f(e,c(r,t))}static clampEx(t,e,r){return isNaN(e)||(t=f(e,t)),isNaN(r)||(t=c(r,t)),t}static makeIntArray(t,e){const r=new Array(f(0,e-t));for(let a=t;a<e;a++)r[a-t]=a;return r}static shuffle(t){for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1));[t[e],t[r]]=[t[r],t[e]]}}static isDate(t){return"[object Date]"===Object.prototype.toString.call(t)}static isValidDate(t){return t.getTime()==t.getTime()}static asFunction(t){return"function"==typeof t?t:void 0}static getFieldProp(t){const e=t.indexOf(".");if(e>=0)return{field:t.substring(0,e),props:t.substring(e+1).split(".")}}static uniqueKey(){return Math.random().toString(36).substring(2,10)}static startsWith(t,e){if(t&&e)return 0===t.indexOf(e)}static endsWith(t,e){if(t&&e)return t.indexOf(e,-t.length)===t.length-e.length}static scaleNumber(t,e,r){const a=h(t);if(a>=1e3){let i=e.length;for(;i>0;){const n=Math.pow(1e3,i--);if(n<=Math.pow(10,Math.log(a)*Math.LOG10E)&&(r||10*a%n==0))return{value:t/n,symbol:e[i]}}}}static jitter(t,e){return t+(2*Math.random()-1)*e}static getLogger(t){if(t>=2)return function(e){return Math.log(e)/Math.log(t)}}static getMinMax(t){let e=t[0],r=t[0];for(let a=1;a<t.length;a++)e=c(e,t[a]),r=f(r,t[a]);return{min:e,max:r}}static valueAt(t,e){if(e&&(this.isObject(t)||l(t))){const r=e.split(".");let a=t;for(let t of r)a=a[t];return a}return t}static normalizeToSteps(t,e){if(t.length<2)return t;const r=Math.min(...t),a=Math.max(...t);if(r===a)return[r];const i=(a-r)/(e-1),n=10**Math.floor(Math.log10(i)),s=i/n;let o;o=s<=1?1:s<=2?2:s<=5?5:10,o*=n;const l=Math.floor(r/o)*o,c=[];o=(Math.ceil(a/o)*o-l)/(e-1);for(let t=0;t<e;t++)c.push(l+t*o);return c}}const A=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],P=["f0f8ff","faebd7","00ffff","7fffd4","f0ffff","f5f5dc","ffe4c4","000000","ffebcd","0000ff","8a2be2","a52a2a","deb887","5f9ea0","7fff00","d2691e","ff7f50","6495ed","fff8dc","dc143c","00ffff","00008b","008b8b","b8860b","a9a9a9","a9a9a9","006400","bdb76b","8b008b","556b2f","ff8c00","9932cc","8b0000","e9967a","8fbc8f","483d8b","2f4f4f","2f4f4f","00ced1","9400d3","ff1493","00bfff","696969","696969","1e90ff","b22222","fffaf0","228b22","ff00ff","dcdcdc","f8f8ff","ffd700","daa520","808080","808080","008000","adff2f","f0fff0","ff69b4","cd5c5c","4b0082","fffff0","f0e68c","e6e6fa","fff0f5","7cfc00","fffacd","add8e6","f08080","e0ffff","fafad2","d3d3d3","d3d3d3","90ee90","ffb6c1","ffa07a","20b2aa","87cefa","778899","778899","b0c4de","ffffe0","00ff00","32cd32","faf0e6","ff00ff","800000","66cdaa","0000cd","ba55d3","9370db","3cb371","7b68ee","00fa9a","48d1cc","c71585","191970","f5fffa","ffe4e1","ffe4b5","ffdead","000080","fdf5e6","808000","6b8e23","ffa500","ff4500","da70d6","eee8aa","98fb98","afeeee","db7093","ffefd5","ffdab9","cd853f","ffc0cb","dda0dd","b0e0e6","800080","663399","ff0000","bc8f8f","4169e1","8b4513","fa8072","f4a460","2e8b57","fff5ee","a0522d","c0c0c0","87ceeb","6a5acd","708090","708090","fffafa","00ff7f","4682b4","d2b48c","008080","d8bfd8","ff6347","40e0d0","ee82ee","f5deb3","ffffff","f5f5f5","ffff00","9acd32"];class v{static COLORS=function(){const t={};for(let e=0;e<A.length;e++)t[A[e]]=P[e];return t}();static create(t){return"string"==typeof t?new v(t):void 0}static isBright(t){return new v(t).isBright()}static getContrast(t,e,r){return new v(t).getContrast(e,r)}static interpolate(t,e,r){const a=new v(null);return a.r=Math.ceil(t.r+(e.r-t.r)*r),a.g=Math.ceil(t.g+(e.g-t.g)*r),a.b=Math.ceil(t.b+(e.b-t.b)*r),a.a=t.a+(e.a-t.a)*r,a}r=0;g=0;b=0;a=1;constructor(t){(t=t&&t.trim())&&(w.startsWith(t,"rgb(")&&w.endsWith(t,")")?this.$_parseRgb(t.substring(4,t.length-1)):w.startsWith(t,"rgba(")&&w.endsWith(t,")")?this.$_parseRgb(t.substring(5,t.length-1)):w.startsWith(t,"#")?this.$_parseNumber(t.substring(1)):v.COLORS[t]&&this.$_parseNumber(v.COLORS[t]))}get rgba(){return"rgba("+[this.r,this.g,this.b,this.a].join(",")+")"}isBright(){return.299*this.r+.587*this.g+.114*this.b>140}getContrast(t,e){return this.isBright()?t||"#000000":e||"#FFFFFF"}brighten(t,e=null){return(e=e||new v(null)).r=Math.ceil(this.r+(255-this.r)*t),e.g=Math.ceil(this.g+(255-this.g)*t),e.b=Math.ceil(this.b+(255-this.b)*t),e.a=this.a,e}toString(){return this.rgba}$_parseRgb(t){const e=t.split(/\,\s*/);e.length>=3&&(this.r=+e[0],this.g=+e[1],this.b=+e[2],e.length>=4?this.a=+e[3]:this.a=1)}$_parseNumber(t){const e=t.length;let r;e>6?(r=parseInt(t.substr(0,6),16),this.a=parseInt(t.substring(6),16)/255):e>0&&(3===e&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),r=parseInt(t,16)),this.r=(16711680&r)>>16,this.g=(65280&r)>>8,this.b=255&r}}class S extends p{_points;_radius;_color;constructor(t){super(t)}setOptions(t){const e=this._points=[];this._radius=Math.max(1,u(+t.radius,3)),this._color=new v(t.color||"black");const r=this._color.r/255,a=this._color.g/255,i=this._color.b/255,n=this._color.a;return t.points.forEach((t=>{t.color?v.create(t.color):this._color,e.push(t.x,t.y,r,a,i,n)})),this}_getVShader(){return"\n uniform mat4 u_matrix;\n uniform float u_radius;\n attribute vec2 a_position;\n attribute vec4 a_color;\n varying vec4 v_color;\n\n void main() {\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n gl_PointSize = u_radius; // 픽셀 단위 점 크기\n v_color = a_color;\n }\n "}_getFShader(){return"\n precision mediump float;\n\n varying vec4 v_color;\n\n void main() {\n gl_FragColor = v_color;\n }\n "}_doRun(t,e,r,a){const i=t.getUniformLocation(this._program,"u_radius"),n=t.getAttribLocation(this._program,"a_position"),s=t.getAttribLocation(this._program,"a_color");t.uniform1f(i,2*this._radius),t.vertexAttribPointer(n,2,t.FLOAT,!1,24,0),t.enableVertexAttribArray(n),t.vertexAttribPointer(s,4,t.FLOAT,!1,24,8),t.enableVertexAttribArray(s),this._drawPoints(t,this._points,6)}}class N extends e.PointElement{setPoint(t){return this.point=t,this}}class M extends e.SeriesView{constructor(t,r,a,i){super(t,r,a,i);const n=e.RmElement.createElement(t,"foreignObject");this._pointContainer.add(this._pointView=this._createPointView(t)),this._pointContainer.appendDom(n),n.appendChild(this._canvas=t.createElement("canvas")),this._gl=new _(this._canvas)}getPointView(t,e,r,a){return this.$_pointViewAt(e,r)}render(t,e,r){const a=this._canvas.parentNode;a.setAttribute("width",t),a.setAttribute("height",e),this._canvas.width=t,this._canvas.height=e,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",super.render(t,e,r),this.trans(0,0)}pointByDom(t,e){return this.$_pointViewAt(e.x,e.y)}_mapToGL(t,e){const{tx:r,ty:a,scale:i,vx:n,vy:s}=this._transInfo;e.forEach((e=>{const n=e.glPoint=t.project([e.lon,e.lat]);n[0]=n[0]*i+r,n[1]=a-n[1]*i}))}$_pointViewAt(t,e){const r=this.model.hitTest(t,e);if(r)return this._pointView.setPoint(r[0])}_drawCircle(t,e,r,a,i){const n=this._ctx;n.beginPath(),n.arc(t,e,r,0,2*Math.PI),n.strokeStyle=a,n.lineWidth=1,n.stroke(),n.beginPath(),n.arc(t,e,r,0,2*Math.PI),n.fillStyle=i,n.fill()}}class k extends N{}class x extends M{constructor(t){super(t,"rm-gl-point-series",!0,!1),this._program=new S(this._gl)}_createPointView(t){return new k(t)}_doPrepeare(t,e,r){}_doRender(t,e){this.$_layoutMarkers(this._getGrowRate())}_doReset(){}$_layoutMarkers(t){const e=this.model,r=e.chart.getProjection(),a=Math.max(0,e.getRadius()),i=e._visPoints,n=new Array(i.length);this._mapToGL(r,i),i.forEach(((t,e)=>{n[e]={x:t.glPoint[0],y:t.glPoint[1]}})),this._program.setOptions({radius:a,points:n,color:String(e.options.color)||"black"}),this._gl.render([this._program])}}function O(t){(function(t){return t.Series&&t.SeriesView})(t)&&(t.Series.register(o),t.SeriesView.register([o,x]))}O(a),t.GlSeries=n,t.default=O,Object.defineProperty(t,"__esModule",{value:!0})}));
package/gl.mjs ADDED
@@ -0,0 +1,7 @@
1
+
2
+ /**
3
+ * RealMap Gl v1.1.0
4
+ * Copyright (C) 2023-2025 WooriTech Inc.
5
+ * All Rights Reserved.
6
+ */
7
+ import{extend as t,ValueSeries as e,ValuePoint as r,GLPointSeriesType as a,pickNum as i,SeriesView as s,RmElement as n,PointElement as o}from"./index.mjs";class l extends r{}class c extends e{_doApply(t){super._doApply(t)}_createPoint(t){return new l(t)}isPointLabelsVisible(){return!1}_defLabelOff(){return 2}_doPrepareRender(t,e){super._doPrepareRender(t,e),this._hitPoints=void 0}hitTest(t,e){this._hitPoints||!0===this._op.disabled||(console.time("prepare gl hit tests"),this._hitPoints=this._visPoints.slice().sort(((t,e)=>t.glPoint[0]-e.glPoint[0])),console.timeEnd("prepare gl hit tests"));const r=this._hitPoints;if(!r)return;const a=this._getHitRadius(),i=[];let s=0,n=r.length-1,o=-1;for(;s<=n;){const e=Math.floor((s+n)/2),i=r[e];if(t<i.glPoint[0]-a)n=e-1;else{if(!(t>=i.glPoint[0]+a)){o=e;break}s=e+1}}if(-1===o)return i;let l=o;for(;l>=0&&r[l].glPoint[0]-a<=t;)r[l].glPoint[0]+a>t&&i.unshift(r[l]),l--;for(l=o+1;l<r.length&&r[l].glPoint[0]-a<=t;)r[l].glPoint[1]+a>t&&i.push(r[l]),l++;return i.length>0?i.filter((t=>e>=t.glPoint[1]-a&&e<t.glPoint[1]+a)):void 0}}c.defaults=t(e.defaults,{});class h extends l{_readObject(t,e){super._readObject(t,e)}}class f extends c{getRadius(){return i(this._op.radius,f.defaults.radius)}_doApply(t){super._doApply(t)}_createPoint(t){return new h(t)}_defLabelOff(){return 2}_getHitRadius(){return this.getRadius()}}f.type=a,f.defaults=t(c.defaults,{radius:5,position:"center"});const u=Array.isArray,d=Math.min,g=Math.max,_=Math.abs,p=function(t,e){return t=parseFloat(t),isNaN(t)?parseFloat(e):t};let m=0;class b{$_hash;$_destroyed=!1;$_destroying=!1;constructor(t){t||(this.$_hash=String(m++))}destroy(){return!this.$_destroyed&&!this.$_destroying&&(this.$_destroying=!0,this._doDestory(),this.$_destroyed=!0),null}_doDestory(){}get destroying(){return this.$_destroying}get orphaned(){return this.$_destroying||this.$_destroyed}get hash(){return this.$_hash}isMe(t){return t===this.$_hash}toString(){return this.constructor.name}toBool(t){return"string"==typeof t?"true"===t:t}toNum(t,e=NaN){return t=parseFloat(t),isNaN(t)?e:t}}class y extends b{_width;_height;_mat;_gl;_program;constructor(t){super(),this._gl=t._gl}_doDestory(){if(this._program){const t=this._gl;t.getAttachedShaders(this._program).forEach((e=>t.deleteShader(e))),t.deleteProgram(this._program),this._program=null}}_run(t,e,r,a){this._program||(this._program=this.$_createProgram(this._gl,this._getVShader(),this._getFShader())),(r!==this._width||a!==this._height)&&(this.$_useProgram(this._gl,this._program),this._width=r,this._height=a,this._mat=this.$_createMatrix(0,0,r,a),t.viewport(0,0,r,a),t.uniformMatrix4fv(t.getUniformLocation(this._program,"u_matrix"),!1,this._mat)),t.bindBuffer(t.ARRAY_BUFFER,e),this._doRun(t,e,r,a)}$_createShader(t,e,r){const a=t.createShader(e);if(!a)throw new Error("Failed to create a shader");if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){const e=t.getShaderInfoLog(a);throw t.deleteShader(a),new Error(`Shader compilation failed:\n${r.split("\n").map(((t,e)=>`${e+1}: ${t}`)).join("\n")}\n\n${e}`)}return a}$_createProgram(t,e,r){const a=this.$_createShader(t,t.VERTEX_SHADER,e),i=this.$_createShader(t,t.FRAGMENT_SHADER,r),s=t.createProgram();if(!s)throw new Error("Failed to create a program");if(t.attachShader(s,a),t.attachShader(s,i),t.linkProgram(s),!t.getProgramParameter(s,t.LINK_STATUS))throw t.getShaderInfoLog(s),t.deleteProgram(s),new Error(t.getProgramInfoLog(s));return s}$_useProgram(t,e){t.useProgram(e)}$_createMatrix(t,e,r,a){return new Float32Array([2/(r-t),0,0,0,0,2/(e-a),0,0,0,0,1,0,-(r+t)/(r-t),-(e+a)/(e-a),0,1])}_drawTrianlges(t,e){t.bufferData(t.ARRAY_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.drawArrays(t.TRIANGLES,0,e.length/2)}_drawPoints(t,e,r){t.bufferData(t.ARRAY_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.drawArrays(t.POINTS,0,e.length/r)}_drawLines(t,e,r,a){t.bufferData(t.ARRAY_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.drawArrays(a?t.LINE_LOOP:t.LINES,0,e.length/r)}}class w extends b{_gl;_buffer;_programs;constructor(t){super();const e=this._gl=t.getContext("webgl");if(!e)throw new Error("WebGL not supported");this._buffer=e.createBuffer()}_doDestory(){const t=this._gl;t&&(t.deleteBuffer(this._buffer),this._programs.forEach((t=>t.destroy())),this._gl=null)}render(t,e=!0,r,a){const i=this._gl;console.time("gl_render"),e&&this.$_clear(),t.forEach((t=>t._run(i,this._buffer,p(r,i.canvas.width),p(a,i.canvas.height)))),console.timeEnd("gl_render")}$_clear(){const t=this._gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)}}const A=(new Date).getTime();typeof window<"u"&&!Element.prototype.animate&&(Element.prototype.animate=function(t){});const v=typeof navigator<"u"?navigator.userAgent:"",P=v?navigator.appVersion:"";v.match(/Trident.*rv\:11\./),P.indexOf("MSIE 10"),P.indexOf("MSIE 9");class S{static LOGGING=!1;static log(...t){this.LOGGING&&console.log(...t)}static logIf(t,...e){this.LOGGING&&t&&console.log(...e)}static week_days=["일","월","화","수","목","금","토"];static long_week_days=["일요일","월요일","화요일","수요일","목요일","금요일","토요일"];static month_days=[[31,28,31,30,31,30,31,31,30,31,30,31],[31,29,31,30,31,30,31,31,30,31,30,31]];static now(){return+new Date}static parseDate(t,e){const r=new Date(t);return isNaN(r.getTime())?e||new Date:r}static isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}static dateOfYear(t){var e=t.getMonth(),r=t.getDate(),a=[0,31,59,90,120,151,181,212,243,273,304,334][e]+r;return e>1&&S.isLeapYear(t.getFullYear())&&a++,a}static incMonth(t,e){const r=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(d(r,S.month_days[S.isLeapYear(t.getFullYear())?1:0][t.getMonth()])),t}static minDate(t,e){return null!==t?t:null!==e?e:t.getTime()<e.getTime()?t:e}static maxDate(t,e){return null!==t?e:null!==e||t.getTime()>e.getTime()?t:e}static weekOfMonth(t,e,r){const a=t.getMonth(),i=t.getFullYear(),s=new Date(i,a,1).getDay(),n=new Date(i,a+1,0).getDate(),o=t.getDate()+s-1,l=e+Math.ceil((n+s-7)/7),c=e+Math.floor(o/7);return r||c<2+e?c:c===l?e+5:c}static weekOfYear(t,e){const r=t.getFullYear(),a=new Date(r,0,1).getDay(),i=this.dateOfYear(t)+a-1;return e+Math.floor(i/7)}static isObject(t){return t&&"object"==typeof t&&!u(t)}static isValidObject(t){if(this.isObject(t))for(let e in t)if(t.hasOwnProperty(e))return!0}static checkArray(t){return u(t)?t:void 0}static makeArray(t,e=!1){return null!=t?u(t)?t:[t]:e?[]:void 0}static makeNumArray(t){return u(t)?t.map((t=>+t)):null!=t?[+t]:[]}static getIntArray(t,e=0){const r=[];for(let a=e,i=e+t;a<i;a++)r.push(a);return r}static isValueArray(t){if(u(t)){for(let e=t.length-1;e>=0;e--)if(null!=t[e]&&"object"==typeof t[e])return!1;return!0}return!1}static toArray(t){return u(t)?t:null!=t?[t]:null}static copyArray(t){return u(t)?t.slice(0):null!=t?[t]:void 0}static push(t,e){if(e&&e.length>0)for(let r=0,a=e.length;r<a;r++)t.push(e[r])}static isDefined(t){return null!=t}static isNotDefined(t){return null==t}static isNum(t){return"number"==typeof t}static canNumber(t){return!isNaN(t)&&!isNaN(parseFloat(t))}static isValidNum(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}static getNum(t,e=0){const r=parseFloat(t);return isFinite(r)?r:e}static toNum(t,e=0){return isNaN(t)||null===t||""===t?e:+t}static compareText(t,e,r=!1){return t=t||"",e=e||"",r&&(t=t.toLocaleLowerCase(),e=e.toLocaleLowerCase()),t>e?1:t<e?-1:0}static getTimeF(){return(new Date).getTime()/1e3}static getTimer(){return(new Date).getTime()-A}static isWhiteSpace(t){return!t||!t.trim()}static pad(t,e,r){return e=g(e||2,1),r=r||"0",new Array(e-String(t).length+1).join(r)+t}static pad16(t,e,r){return e=g(e||2,1),r=r||"0",new Array(e-t.toString(16).length+1).join(r)+t.toString(16)}static pick(...t){const e=t.length;let r;for(let a=0;a<e;a++)if(r=t[a],null!=r)return r}static toStr(t){return Number.isNaN(t)||null==t?"":String(t)}static extend(t,e){t=t||{};for(let r in e)t[r]=e[r];return t}static equalNumbers(t,e){return isNaN(t)==isNaN(e)&&!isNaN(t)&&t==e}static equalArrays(t,e){if(t===e)return!0;if(null==t||null==e)return!1;const r=t.length;if(r!=e.length)return!1;for(let a=0;a<r;++a)if(t[a]!==e[a])return!1;return!0}static isEmpty(t){if(t)for(let e in t)return!1;return!0}static isNotEmpty(t){if(t)for(let e in t)return!0;return!1}static deepClone(t){if(t instanceof Date)return new Date(t);if(null==t||"object"!=typeof t)return t;{const e=u(t)?[]:{};for(let r of Object.keys(t))e[r]=S.deepClone(t[r]);return e}}static getArray(t,e){const r=[];for(let a=0;a<t;a++)r.push(e);return r}static getNumArray(t,e=0){const r=[];for(let a=0;a<t;a++)r.push(e);return r}static dedupe(t,e){t=t.sort(e||((t,e)=>t>e?1:t<e?-1:0));for(let e=t.length-1;e>0;e--)t[e]===t[e-1]&&t.splice(e,1);return t}static sortNum(t){return t.sort(((t,e)=>t-e))}static logElapsed(t,e){const r=+new Date;e(),S.log(t,+new Date-r+"ms")}static clamp(t,e,r){return g(e,d(r,t))}static clampEx(t,e,r){return isNaN(e)||(t=g(e,t)),isNaN(r)||(t=d(r,t)),t}static makeIntArray(t,e){const r=new Array(g(0,e-t));for(let a=t;a<e;a++)r[a-t]=a;return r}static shuffle(t){for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1));[t[e],t[r]]=[t[r],t[e]]}}static isDate(t){return"[object Date]"===Object.prototype.toString.call(t)}static isValidDate(t){return t.getTime()==t.getTime()}static asFunction(t){return"function"==typeof t?t:void 0}static getFieldProp(t){const e=t.indexOf(".");if(e>=0)return{field:t.substring(0,e),props:t.substring(e+1).split(".")}}static uniqueKey(){return Math.random().toString(36).substring(2,10)}static startsWith(t,e){if(t&&e)return 0===t.indexOf(e)}static endsWith(t,e){if(t&&e)return t.indexOf(e,-t.length)===t.length-e.length}static scaleNumber(t,e,r){const a=_(t);if(a>=1e3){let i=e.length;for(;i>0;){const s=Math.pow(1e3,i--);if(s<=Math.pow(10,Math.log(a)*Math.LOG10E)&&(r||10*a%s==0))return{value:t/s,symbol:e[i]}}}}static jitter(t,e){return t+(2*Math.random()-1)*e}static getLogger(t){if(t>=2)return function(e){return Math.log(e)/Math.log(t)}}static getMinMax(t){let e=t[0],r=t[0];for(let a=1;a<t.length;a++)e=d(e,t[a]),r=g(r,t[a]);return{min:e,max:r}}static valueAt(t,e){if(e&&(this.isObject(t)||u(t))){const r=e.split(".");let a=t;for(let t of r)a=a[t];return a}return t}static normalizeToSteps(t,e){if(t.length<2)return t;const r=Math.min(...t),a=Math.max(...t);if(r===a)return[r];const i=(a-r)/(e-1),s=10**Math.floor(Math.log10(i)),n=i/s;let o;o=n<=1?1:n<=2?2:n<=5?5:10,o*=s;const l=Math.floor(r/o)*o,c=[];o=(Math.ceil(a/o)*o-l)/(e-1);for(let t=0;t<e;t++)c.push(l+t*o);return c}}const N=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=["f0f8ff","faebd7","00ffff","7fffd4","f0ffff","f5f5dc","ffe4c4","000000","ffebcd","0000ff","8a2be2","a52a2a","deb887","5f9ea0","7fff00","d2691e","ff7f50","6495ed","fff8dc","dc143c","00ffff","00008b","008b8b","b8860b","a9a9a9","a9a9a9","006400","bdb76b","8b008b","556b2f","ff8c00","9932cc","8b0000","e9967a","8fbc8f","483d8b","2f4f4f","2f4f4f","00ced1","9400d3","ff1493","00bfff","696969","696969","1e90ff","b22222","fffaf0","228b22","ff00ff","dcdcdc","f8f8ff","ffd700","daa520","808080","808080","008000","adff2f","f0fff0","ff69b4","cd5c5c","4b0082","fffff0","f0e68c","e6e6fa","fff0f5","7cfc00","fffacd","add8e6","f08080","e0ffff","fafad2","d3d3d3","d3d3d3","90ee90","ffb6c1","ffa07a","20b2aa","87cefa","778899","778899","b0c4de","ffffe0","00ff00","32cd32","faf0e6","ff00ff","800000","66cdaa","0000cd","ba55d3","9370db","3cb371","7b68ee","00fa9a","48d1cc","c71585","191970","f5fffa","ffe4e1","ffe4b5","ffdead","000080","fdf5e6","808000","6b8e23","ffa500","ff4500","da70d6","eee8aa","98fb98","afeeee","db7093","ffefd5","ffdab9","cd853f","ffc0cb","dda0dd","b0e0e6","800080","663399","ff0000","bc8f8f","4169e1","8b4513","fa8072","f4a460","2e8b57","fff5ee","a0522d","c0c0c0","87ceeb","6a5acd","708090","708090","fffafa","00ff7f","4682b4","d2b48c","008080","d8bfd8","ff6347","40e0d0","ee82ee","f5deb3","ffffff","f5f5f5","ffff00","9acd32"];class M{static COLORS=function(){const t={};for(let e=0;e<N.length;e++)t[N[e]]=k[e];return t}();static create(t){return"string"==typeof t?new M(t):void 0}static isBright(t){return new M(t).isBright()}static getContrast(t,e,r){return new M(t).getContrast(e,r)}static interpolate(t,e,r){const a=new M(null);return a.r=Math.ceil(t.r+(e.r-t.r)*r),a.g=Math.ceil(t.g+(e.g-t.g)*r),a.b=Math.ceil(t.b+(e.b-t.b)*r),a.a=t.a+(e.a-t.a)*r,a}r=0;g=0;b=0;a=1;constructor(t){(t=t&&t.trim())&&(S.startsWith(t,"rgb(")&&S.endsWith(t,")")?this.$_parseRgb(t.substring(4,t.length-1)):S.startsWith(t,"rgba(")&&S.endsWith(t,")")?this.$_parseRgb(t.substring(5,t.length-1)):S.startsWith(t,"#")?this.$_parseNumber(t.substring(1)):M.COLORS[t]&&this.$_parseNumber(M.COLORS[t]))}get rgba(){return"rgba("+[this.r,this.g,this.b,this.a].join(",")+")"}isBright(){return.299*this.r+.587*this.g+.114*this.b>140}getContrast(t,e){return this.isBright()?t||"#000000":e||"#FFFFFF"}brighten(t,e=null){return(e=e||new M(null)).r=Math.ceil(this.r+(255-this.r)*t),e.g=Math.ceil(this.g+(255-this.g)*t),e.b=Math.ceil(this.b+(255-this.b)*t),e.a=this.a,e}toString(){return this.rgba}$_parseRgb(t){const e=t.split(/\,\s*/);e.length>=3&&(this.r=+e[0],this.g=+e[1],this.b=+e[2],e.length>=4?this.a=+e[3]:this.a=1)}$_parseNumber(t){const e=t.length;let r;e>6?(r=parseInt(t.substr(0,6),16),this.a=parseInt(t.substring(6),16)/255):e>0&&(3===e&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),r=parseInt(t,16)),this.r=(16711680&r)>>16,this.g=(65280&r)>>8,this.b=255&r}}class x extends y{_points;_radius;_color;constructor(t){super(t)}setOptions(t){const e=this._points=[];this._radius=Math.max(1,p(+t.radius,3)),this._color=new M(t.color||"black");const r=this._color.r/255,a=this._color.g/255,i=this._color.b/255,s=this._color.a;return t.points.forEach((t=>{t.color?M.create(t.color):this._color,e.push(t.x,t.y,r,a,i,s)})),this}_getVShader(){return"\n uniform mat4 u_matrix;\n uniform float u_radius;\n attribute vec2 a_position;\n attribute vec4 a_color;\n varying vec4 v_color;\n\n void main() {\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n gl_PointSize = u_radius; // 픽셀 단위 점 크기\n v_color = a_color;\n }\n "}_getFShader(){return"\n precision mediump float;\n\n varying vec4 v_color;\n\n void main() {\n gl_FragColor = v_color;\n }\n "}_doRun(t,e,r,a){const i=t.getUniformLocation(this._program,"u_radius"),s=t.getAttribLocation(this._program,"a_position"),n=t.getAttribLocation(this._program,"a_color");t.uniform1f(i,2*this._radius),t.vertexAttribPointer(s,2,t.FLOAT,!1,24,0),t.enableVertexAttribArray(s),t.vertexAttribPointer(n,4,t.FLOAT,!1,24,8),t.enableVertexAttribArray(n),this._drawPoints(t,this._points,6)}}class D extends o{setPoint(t){return this.point=t,this}}class F extends s{constructor(t,e,r,a){super(t,e,r,a);const i=n.createElement(t,"foreignObject");this._pointContainer.add(this._pointView=this._createPointView(t)),this._pointContainer.appendDom(i),i.appendChild(this._canvas=t.createElement("canvas")),this._gl=new w(this._canvas)}getPointView(t,e,r,a){return this.$_pointViewAt(e,r)}render(t,e,r){const a=this._canvas.parentNode;a.setAttribute("width",t),a.setAttribute("height",e),this._canvas.width=t,this._canvas.height=e,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",super.render(t,e,r),this.trans(0,0)}pointByDom(t,e){return this.$_pointViewAt(e.x,e.y)}_mapToGL(t,e){const{tx:r,ty:a,scale:i,vx:s,vy:n}=this._transInfo;e.forEach((e=>{const s=e.glPoint=t.project([e.lon,e.lat]);s[0]=s[0]*i+r,s[1]=a-s[1]*i}))}$_pointViewAt(t,e){const r=this.model.hitTest(t,e);if(r)return this._pointView.setPoint(r[0])}_drawCircle(t,e,r,a,i){const s=this._ctx;s.beginPath(),s.arc(t,e,r,0,2*Math.PI),s.strokeStyle=a,s.lineWidth=1,s.stroke(),s.beginPath(),s.arc(t,e,r,0,2*Math.PI),s.fillStyle=i,s.fill()}}class O extends D{}class R extends F{constructor(t){super(t,"rm-gl-point-series",!0,!1),this._program=new x(this._gl)}_createPointView(t){return new O(t)}_doPrepeare(t,e,r){}_doRender(t,e){this.$_layoutMarkers(this._getGrowRate())}_doReset(){}$_layoutMarkers(t){const e=this.model,r=e.chart.getProjection(),a=Math.max(0,e.getRadius()),i=e._visPoints,s=new Array(i.length);this._mapToGL(r,i),i.forEach(((t,e)=>{s[e]={x:t.glPoint[0],y:t.glPoint[1]}})),this._program.setOptions({radius:a,points:s,color:String(e.options.color)||"black"}),this._gl.render([this._program])}}function $(t){(function(t){return t.Series&&t.SeriesView})(t)&&(t.Series.register(f),t.SeriesView.register([f,R]))}export{c as GlSeries,$ as default};
package/heatmap.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Heatmap v1.0.13
3
+ * RealMap Heatmap v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
package/heatmap.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /**
3
- * RealMap Heatmap v1.0.13
3
+ * RealMap Heatmap v1.1.0
4
4
  * Copyright (C) 2023-2025 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */