Implement Map OpenLayers Using TypeScript 2021

preview_player
Показать описание
Hola amigos aquí les traigo nuevamente un video relacionado a open layers para la implementación vía typescript, usando los imports, te invito a que veas el video para que veas como hacemos la configuración paso a paso.

Este ejemplo te ayuda a tener una idea porque te falla y muestra el error
Uncaught TypeError: Failed to resolve module specifier "ol". Relative references must start with either "/", "./", or "../".

import Map from 'ol/Map';
import OSM from 'ol/source/OSM';
import TileLayer from 'ol/layer/Tile';
import View from 'ol/View';
Uncaught TypeError: Failed to resolve module specifier "ol". Relative references must start with either "/", "./", or "../".

Error importing OpenLayers modules when run from HTML
rbush
Uncaught TypeError: Failed to resolve module specifier "rbush". Relative references must start with either "/", "./", or "../".. is occures

Please provide more context. Are you cloning OpenLayers from git, or are you using npm install ol to use OpenLayers in an application? If the former, make sure you run npm install to download all dependencies.
Рекомендации по теме
Комментарии
Автор

Genial trabajo amigo! Estoy aprendiendo Openlayers y me está viniendo increíble el tutorial.
Mil gracias, eres un genio!

J_
Автор

The only reason I wanted to watch this video was because Typescript, where is it?

guardianofblindcau