Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
AI-Enhanced UI Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
Hi All,
I'm new to RadMap. Can you please let me know how can I find the upper left (or lower right) latitude and longitude of the current map? Is that possible to do so with RadMap? I can do that with MapQuest UI by using getBounds method.
Thanks for your help.
Huy
Hi Huy,
You can use the extent() method of the underlying Kendo Map widget. For example:
<telerik:RadMap RenderMode=
"Lightweight"
runat=
"server"
ID=
"RadMap1"
Zoom=
"4"
Width=
"500"
Height=
>
<CenterSettings Latitude=
"39.639537564366705"
Longitude=
"-92.548828125"
/>
<LayersCollection>
<telerik:MapLayer Subdomains=
"a,b,c"
UrlTemplate=
"http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png"
Attribution=
"© OpenStreetMap"
></telerik:MapLayer>
</LayersCollection>
</telerik:RadMap>
<asp:Button ID=
"Button1"
Text=
"get map extent"
OnClientClick=
"getMapExtent(); return false;"
<script>
function
getMapExtent() {
var
map = $find(
"<%=RadMap1.ClientID%>"
).get_kendoWidget();
coords = map.extent();
alert(
"North West corner: "
+ coords.nw.toString());
}
</script>
Regards,