Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add filter with webpack #2

Open
ayacoub1 opened this issue Jul 24, 2018 · 9 comments
Open

add filter with webpack #2

ayacoub1 opened this issue Jul 24, 2018 · 9 comments

Comments

@ayacoub1
Copy link

please can you show us example how to use filter like crop on webpack version , i tried but with no luck i have error osm.addFilter is not a function

@Viglino
Copy link
Collaborator

Viglino commented Jul 25, 2018

I'll try to add an example with a filter ASAP.

@SamuelIrungu
Copy link
Owner

updated the webpack project to use [email protected] and [email protected], webpack 4

@ayacoub1
Copy link
Author

ayacoub1 commented Jul 25, 2018 via email

@Viglino
Copy link
Collaborator

Viglino commented Jul 29, 2018

Hello,
Here is an example using the Crop filter as ES2015 module within parcelJS.
https://viglino.github.io/ol-ext-parcel-bundler/build/?lon=2.2&lat=50.48&z=9
Code is here: https://github.com/Viglino/ol-ext-parcel-bundler/blob/master/js/filter/crop.js
@+

@ayacoub1
Copy link
Author

ayacoub1 commented Aug 1, 2018 via email

@Viglino
Copy link
Collaborator

Viglino commented Aug 1, 2018

OpenLayers-ext use OpenLayers 2 and is now deprecated.
Ol-ext provide similar funtionalities: http://viglino.github.io/ol-ext/examples/animation/map.featureanimation.html
I've found an error in the ol.filter.Colorize I'll try to fix it ASAP.

@vipcxj
Copy link

vipcxj commented Aug 22, 2019

There is no addFilter method in the api doc of openlayers, is it a hidden api?

@pavel-muset
Copy link

How to import addFilter method?

@Viglino
Copy link
Collaborator

Viglino commented Mar 26, 2021

Just import the filters. The addFilter method will be added to the layer class by ol-ext extension (see doc).
https://github.com/Viglino/ol-ext/blob/master/src/filter/Base.js#L134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants