openlayers / ol-skypack

Using OpenLayers with Skypack
11 stars 2 forks source link

import issue with source.js #1

Open mForcella opened 1 year ago

mForcella commented 1 year ago

While attempting to replicate the shape drawing example here:

https://openlayers.org/en/latest/examples/draw-shapes.html

This import statement:

import {OSM, Vector as VectorSource} from 'https://cdn.skypack.dev/ol/source.js';

throws the following error:

GeoTIFF.js:4 Uncaught SyntaxError: The requested module '/-/geotiff@v2.0.7-2Dn4SdH9a8Eh7qVVKMyV/dist=es2019,mode=imports/optimized/geotiff.js' does not provide an export named 'Pool' (at GeoTIFF.js:4:3)

hornyjailfish commented 5 months ago

have same error using deno and skypack

geographika commented 5 months ago

Possibly related comment: https://github.com/openlayers/openlayers/issues/14152#issuecomment-1262939210

hornyjailfish commented 5 months ago

yeah if i import ol/source from esh.sh its works fine

XiaoYang943 commented 1 month ago

true: import OSM from 'https://cdn.skypack.dev/ol/source/OSM.js';

false: import {OSM} from 'https://cdn.skypack.dev/ol/source.js';

error: Uncaught SyntaxError: The requested module '/-/geotiff@v2.1.3-XiUuyJgTAAAacz3e80uR/dist=es2019,mode=imports/optimized/geotiff.js' does not provide an export named 'Pool'

why? thanks.good luck

XiaoYang943 commented 1 month ago

true: import XYZ from 'ol/source/XYZ.js';

false: import {XYZ} from 'ol/source.js';