Using openlayers 3 in angular 5

0

Hello, I have developed some .js libraries that facilitate the use of openlayers 3 in my business. I need to use those libraries in Angular 5 , I have loaded them in the .angular-cli.json and using the typeScript "requires (¨address"), apparently works in part, makes the correct call to the methods of those libraries but at the time of using openlayers as such in some example call:

zoomSlider = **new ol.control.ZoomSlider()**,
        layerSwitcher = new ol.control.LayerSwitcher({
            tipLabel: 'Leyenda' // Optional label for button
        });

I get the error:

  

ReferenceError: ol is not defined

I tried to load this library ol.js as I did with the others but it gives me the same error.

I installed directly in the project using npm install ol

    
asked by Sandy 24.04.2018 в 18:22
source

0 answers