Skip to content

Commit

Permalink
Update dependencies and fix some issues (#137)
Browse files Browse the repository at this point in the history
Fix some issues after updating+
ol-ext 4.0.11
  • Loading branch information
Siedlerchr committed Aug 19, 2023
1 parent 57a04b4 commit 59a9e1d
Show file tree
Hide file tree
Showing 6 changed files with 1,115 additions and 436 deletions.
1 change: 1 addition & 0 deletions @types/ol-ext/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// index.d.ts
1 change: 0 additions & 1 deletion @types/ol-ext/legend/Item.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type BaseObject from 'ol/Object';
import type Feature from 'ol/Feature'
import type { StyleLike } from 'ol/style/Style'
import type { Size } from 'ol/size'
Expand Down
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
cd /path/to/types-ol-ext
git clone git@github.com:Viglino/ol-ext.git
cd ol-ext
npm install
yarn install
```

3. Check whether original JavaScript ol-ext examples can be launched locally.

```bash
cd /path/to/types-ol-ext
cd ol-ext
npm run start
yarn start
```

Then access [http://localhost:8181](http://localhost:8181) and check some examples.
Expand Down
3 changes: 2 additions & 1 deletion examples/routing/map.source.dijkstra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ dijkstra.direction = function (feature) {
// Get the real length of the geom
dijkstra.getLength = function (geom) {
let castedGeom: Geometry
if (geom instanceof Feature<Geometry>) {
const f = Feature<Geometry>
if (geom instanceof f) {
castedGeom = geom.getGeometry()!
return getLength(castedGeom)
}
Expand Down
Loading

0 comments on commit 59a9e1d

Please sign in to comment.