Use const in more places

This commit is contained in:
Maximilian Krög
2022-08-09 00:04:31 +02:00
parent bebf2db5ae
commit 5b8d810f80
18 changed files with 108 additions and 110 deletions
+4 -4
View File
@@ -53,20 +53,20 @@ import {listen, unlistenByKey} from './events.js';
* import Polygon from 'ol/geom/Polygon';
* import Point from 'ol/geom/Point';
*
* var feature = new Feature({
* const feature = new Feature({
* geometry: new Polygon(polyCoords),
* labelPoint: new Point(labelCoords),
* name: 'My Polygon'
* name: 'My Polygon',
* });
*
* // get the polygon geometry
* var poly = feature.getGeometry();
* const poly = feature.getGeometry();
*
* // Render the feature as a point using the coordinates from labelPoint
* feature.setGeometryName('labelPoint');
*
* // get the point geometry
* var point = feature.getGeometry();
* const point = feature.getGeometry();
* ```
*
* @api