Egge-Jan Pollé
Egge-Jan Pollé

Reputation: 28

ol​/interaction​/Link: how to read a custom parameter?

Question about OpenLayers ol/interaction/Link: I would like to set and later use a custom parameter.

The first part went OK: link.update('ext', map.getView().calculateExtent(map.getSize()));

This update the map link to http://localhost:5173/onze-percelen/?x=155000&y=463000&z=3&r=0&l=0111111&ext=-169710.40000000002%2C274840%2C479710.4%2C651160

Perfect!

Now I want to use this custom parameter ext, so I need to get it first.

I thought someting like:

    let myExtent = link.get('ext');
    console.log(myExtent);

But all I get is an undefined.

What am I doing wrong/How should I go about?

Upvotes: 0

Views: 40

Answers (0)

Related Questions