HERE 映射 ZoomRectangle 控件的用法
HERE maps ZoomRectangle control usage
我查找了一些 H.ui.ZoomRectangle
用法的示例,但找不到。
我试过这样使用它:
const zoomrectangle = H.ui.ZoomRectangle();
ui.addControl('zoomrectangle', zoomrectangle);
但得到了:Uncaught TypeError: this.qa is not a function
这个控件应该如何正确使用?
编辑:哦,我的错。我忘了使用 new
.
这里是代码片段。
// Enable the default UI
var ui = H.ui.UI.createDefault(map, maptypes);
ui.addControl('zoomRectangle', new H.ui.ZoomToRectangle());
请参考下面的示例页面。
https://tcs.ext.here.com/examples/v3/zoom_rectangle
编码愉快!
我查找了一些 H.ui.ZoomRectangle
用法的示例,但找不到。
我试过这样使用它:
const zoomrectangle = H.ui.ZoomRectangle();
ui.addControl('zoomrectangle', zoomrectangle);
但得到了:Uncaught TypeError: this.qa is not a function
这个控件应该如何正确使用?
编辑:哦,我的错。我忘了使用 new
.
这里是代码片段。
// Enable the default UI
var ui = H.ui.UI.createDefault(map, maptypes);
ui.addControl('zoomRectangle', new H.ui.ZoomToRectangle());
请参考下面的示例页面。
https://tcs.ext.here.com/examples/v3/zoom_rectangle
编码愉快!