Is there a way to turn off the zoom and pane controls? Ideally I just want the map to sit over a country and not be moved.
Additionally is there an easy way to display hover text in a bubble when hovering over geo polygon location?
Thanks!
3 Answers, 1 is accepted
0
T. Tsonev
Telerik team
answered on 09 Dec 2013, 01:55 PM
Hi,
Constraining the zoom is easy enough, just set minZoom, maxZoom and zoom to the same value.
Disabling the panning is a different matter, as there's no built-in option to control it.
This as an omission that we'll address in the next internal build by adding a "pannable" option. We'll also add a complimentary "zoomable" option. Both will apply only to user interaction, not to the API.
A rather nasty workaround would be to destroy the map scroller: $("#map").data("kendoMap").scroller.destroy();
The shapeMouseEnter and shapeMouseLeave events are suitable for your second requirement. You can show a Window at the mouse coordinates with data for the particular shape.
I hope this helps.
Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Thanks, much better than my nastier work around for pannable. I was having it redraw the map if it detected a pane action! While it worked just fine, it added a sort of 1/2 sec lag if you looked closely.
As far as my second requirement, I was more hoping that the API actually had a built in tool tip like in bar charts, etc.. I could certainly get a second library to do this as well, but it would be easier to have it wrapped in the map API.
Thanks for the help :)
0
T. Tsonev
Telerik team
answered on 11 Dec 2013, 01:36 PM
Hello,
The zoomable and pannable options are now live in the latest internal build. No hacks required, just an update.
We're considering a built-in tooltip for the shapes. There are a few technical difficulties regarding this feature, most notably performance related.
I hope we'll have a solution ready for the next major release.
Thank you for your feedback.
Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!