Adrian Baran
Adrian Baran

Reputation: 895

HERE maps ZoomRectangle control usage

I looked for some examples of H.ui.ZoomRectangle usage but couldn't find one.

I tried to use it like this:

const zoomrectangle =  H.ui.ZoomRectangle();
ui.addControl('zoomrectangle', zoomrectangle);

but got: Uncaught TypeError: this.qa is not a function

How should this control be used properly?

EDIT: Oh, my bad. I forgot to use new.

Upvotes: 0

Views: 78

Answers (1)

user3505695
user3505695

Reputation:

Here is snipped code.

// Enable the default UI
var ui = H.ui.UI.createDefault(map, maptypes);
ui.addControl('zoomRectangle', new H.ui.ZoomToRectangle());

Please refer the below example page.

https://tcs.ext.here.com/examples/v3/zoom_rectangle

Happy Coding!

Upvotes: 1

Related Questions