@@ -167,51 +167,51 @@ export default class PlotLayer2D {
167167 return plotObj ;
168168 }
169169 /**
170- * @function : Module:PlotLayer2D.prototype.add
170+ * @function : Module:PlotLayer2D.prototype.addPlot
171171 * @description : 添加标绘对象
172172 * @param {Object } plotObj
173173 * @return {* }
174174 */
175- add ( plotObj ) {
175+ addPlot ( plotObj ) {
176176 this . m_plotObjects . push ( plotObj ) ;
177177 addExtendLayersPlot ( this . _linkTool , plotObj ) ;
178178 if ( this . _fabricCanvas ) {
179179 this . _fabricCanvas . add ( plotObj ) ;
180180 }
181181 }
182182 /**
183- * @function : Module:PlotLayer2D.prototype.remove
183+ * @function : Module:PlotLayer2D.prototype.removePlot
184184 * @description : 删除标绘对象
185- * @param {Object } plotObj
185+ * @param {Object } plot
186186 * @return {* }
187187 */
188- remove ( plotObj ) {
189- const i = this . m_plotObjects . indexOf ( plotObj ) ;
188+ removePlot ( plot ) {
189+ const i = this . m_plotObjects . indexOf ( plot ) ;
190190 if ( i > - 1 ) {
191191 this . m_plotObjects . splice ( i , 1 ) ;
192192 }
193193 if ( this . _fabricCanvas ) {
194- this . _fabricCanvas . remove ( plotObj ) ;
195- removeExtendLayersPlot ( this . _linkTool , plotObj ) ;
194+ this . _fabricCanvas . remove ( plot ) ;
195+ removeExtendLayersPlot ( this . _linkTool , plot ) ;
196196 }
197197 }
198198 /**
199- * @function : Module:PlotLayer2D.prototype.removeById
199+ * @function : Module:PlotLayer2D.prototype.removePlotByID
200200 * @description : 通过要素id移除
201201 * @param {String } id
202202 * @return {* }
203203 */
204- removeById ( id ) {
204+ removePlotByID ( id ) {
205205 const plotObject = this . getPlotObjectById ( id ) ;
206206 this . remove ( plotObject ) ;
207207 }
208208 /**
209- * @function : Module:PlotLayer2D.prototype.getPlotObjectById
209+ * @function : Module:PlotLayer2D.prototype.getPlotByID
210210 * @description : 根据要素id获取要素对象
211211 * @param {* } uid
212212 * @return {* }
213213 */
214- getPlotObjectById ( uid ) {
214+ getPlotByID ( uid ) {
215215 let t ;
216216 this . m_plotObjects . forEach ( ( s ) => {
217217 const elem = s . getElement ( ) ;
@@ -223,10 +223,10 @@ export default class PlotLayer2D {
223223 }
224224
225225 /**
226- * @function : Module:PlotLayer2D.prototype.toGeoJSON
226+ * @function : Module:PlotLayer2D.prototype.toJSON
227227 * @description : 导出geosjon对象
228228 */
229- toGeoJSON ( ) {
229+ toJSON ( ) {
230230 const base = {
231231 type : 'FeatureCollection' ,
232232 features : [ ]
@@ -240,12 +240,12 @@ export default class PlotLayer2D {
240240 }
241241
242242 /**
243- * @function : Module:PlotLayer2D.prototype.fromGeoJSON
243+ * @function : Module:PlotLayer2D.prototype.fromJSON
244244 * @description : 加载geojson对象
245245 * @param {Object } geoJson geojson对象
246246 * @return {* }
247247 */
248- fromGeoJSON ( geoJson ) {
248+ fromJSON ( geoJson ) {
249249 if ( geoJson . type === 'FeatureCollection' ) {
250250 const { features } = geoJson ;
251251 features . forEach ( ( /** @type {any } */ s ) => {
0 commit comments