Skip to content

Commit 9015c58

Browse files
committed
Upgrade ol, Don't import from barrel files openlayers/openlayers#16461
1 parent 4c52753 commit 9015c58

File tree

7 files changed

+17
-22
lines changed

7 files changed

+17
-22
lines changed

docs/options.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ If the option `useTileLayerAsFallback` is set to `true`, the tile server is only
340340
`buildTileUrlTemplate` is disabled by default (i.e. set to `null`) since v3.4.0.
341341

342342
You can enable this option by providing a function with a single parameter that returns a tile server template url.
343+
The given function can optionally be async (i.e. return a Promise).
343344
The parameter passed into the function is an [Asset object](https://m-mohr.github.io/stac-js/latest/#asset) as defined in stac-js.
344345

345346
**Example**:

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
"core-js": "^3.6.5",
5252
"node-polyfill-webpack-plugin": "^2.0.0",
5353
"oidc-client-ts": "^3.0.1",
54-
"ol": "^10.3.1",
55-
"ol-stac": "^1.0.0-rc.6",
54+
"ol": "~10.4.0",
55+
"ol-stac": "^1.0.0-rc.7",
5656
"proj4": "^2.15.0",
5757
"remove-markdown": "^0.5.0",
5858
"stac-js": "~0.1.4",

src/components/Map.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,14 @@ import TextControl from './maps/TextControl.vue';
2828
import { mapGetters } from 'vuex';
2929
import { BPopover } from 'bootstrap-vue';
3030
import proj4 from 'proj4';
31-
import {register} from 'ol/proj/proj4.js';
3231
import Select from 'ol/interaction/Select';
32+
import {register} from 'ol/proj/proj4.js';
3333
import StacLayer from 'ol-stac';
34-
import { getStacObjectsForEvent } from 'ol-stac/util.js';
35-
import { Stroke, Style } from 'ol/style.js';
34+
import { getStacObjectsForEvent, getStyle } from 'ol-stac/util.js';
3635
3736
register(proj4); // required to support source reprojection
3837
39-
const selectStyle = new Style({
40-
stroke: new Stroke({
41-
color: '#ff0000',
42-
width: 2,
43-
}),
44-
});
38+
const selectStyle = getStyle('#ff0000', 2, null);
4539
4640
export default {
4741
name: 'Map',

src/components/maps/ControlMixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Control } from 'ol/control.js';
1+
import Control from 'ol/control/Control.js';
22

33
export default {
44
props: {

src/components/maps/MapSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Style, { createDefaultStyle } from 'ol/style/Style';
2222
import proj4 from 'proj4';
2323
import VectorSource from 'ol/source/Vector';
2424
import GeoJSON from 'ol/format/GeoJSON';
25-
import { Fill } from 'ol/style';
25+
import Fill from 'ol/style/Fill';
2626
import VectorLayer from 'ol/layer/Vector';
2727
import create from 'stac-js';
2828
import { toGeoJSON } from 'stac-js/src/geo.js';

src/components/maps/UserLocationControl.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</template>
88

99
<script>
10-
import { Point } from 'ol/geom';
10+
import Point from 'ol/geom/Point';
1111
import ControlMixin from './ControlMixin';
1212
import { fromLonLat } from 'ol/proj';
1313
import { BIconPinMapFill } from 'bootstrap-vue';

0 commit comments

Comments
 (0)