Discover the World of Features of RadMap for WinUI

<p><span class="featured">RadMap is a component packed with features that will help your application deliver rich … Read more Discover the World of Features of RadMap for WinUI

<p><span class="featured">RadMap is a component packed with features that will help your application deliver rich data and map visualizations with ease while keeping development time to a minimum.</span></p>
<p>A mapping component is essential to any technology in this day and age. We felt it was about time a powerful, feature-rich, native map component entered the WinUI stage, and the result of this intent is RadMap&mdash;a component packed with features that will help your application deliver rich data and map visualizations with ease while keeping development time to a minimum.</p>
<p>RadMap for WinUI comes as a part of our <a href="https://www.telerik.com/blogs/whats-new-telerik-ui-winui-0-5-0" target="_blank">Telerik for WinUI 0.5.0 release</a>&mdash;you can see what else comes with it in this blog post. Now, I am glad I get the chance to show you an overview of RadMap&rsquo;s capabilities.</p>
<p>Let us dive in!</p>
<h2 id="every-trip-starts-with-a-plan-and-some-preparation">Every Trip Starts With a Plan and Some Preparation</h2>
<p>The saying goes that if &ldquo;you fail to plan, you plan to fail.&rdquo; To get our trip off on the right foot, here is what parts of RadMap we will visit.</p>
<p>First, we will have a look at providers and their specifics. Second, we will look at single- and multi-layer setups. Third, we will declutter our visualizations by clustering items. Fourth, we will take the reins and familiarize ourselves with the built-in controls. Fifth, we will venture into unknown routes. Finally, we will look at how the map can still help us navigate a foreign location without showing an actual geographical map.</p>
<h2 id="first-stop-on-our-trip-is-“providers”">First Stop on Our Trip Is &ldquo;Providers&rdquo;</h2>
<p>To keep this blog post at a manageable length, I will show you the Bing Maps and Open Street Maps providers. You can find the full list in our <a href="https://docs.telerik.com/devtools/winui/controls/radmap/features/providers/providers" target="_blank">documentation</a>.</p>
<p>Now let us look at Bing Maps. The setup on RadMap&rsquo;s side is a few lines. What you may notice there is the &ldquo;Bing Map Key&rdquo; value. To get this provider running, you must get your own key from the <a href="https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key" target="_blank">Bing Maps developer portal</a>. Once you are past that step, replace it in your windows&rsquo; XAML and you will be up and running.</p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">dataVisualization:</span>RadMap</span> <span class="token attr-name"><span class="token namespace">x:</span>Name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>radMap<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">dataVisualization:</span>RadMap.Provider</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">telerikMap:</span>BingRestMapProvider</span> <span class="token attr-name">ApplicationId</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Bing_Map_Key<span class="token punctuation">"</span></span> <span class="token attr-name">Mode</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Aerial<span class="token punctuation">"</span></span> <span class="token attr-name">IsLabelVisible</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>True<span class="token punctuation">"</span></span><span class="token punctuation">/&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token namespace">dataVisualization:</span>RadMap.Provider</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token namespace">dataVisualization:</span>RadMap</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p><img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2021/2021-10/BingMapsProvider.png" alt="A map showing the southern US, Mexico and Central America using Bing Maps" title="Bing Maps Provider"></p>
<p>Open Street Maps is even easier to set up. If you want to use the Transport and Cycle maps you can find information on <a href="https://www.thunderforest.com/docs/apikeys/" target="_blank">getting a key here</a>. Otherwise, you can jump right in.</p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">dataVisualization:</span>RadMap</span> <span class="token attr-name"><span class="token namespace">x:</span>Name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>radMap<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">dataVisualization:</span>RadMap.Provider</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">telerikMap:</span>OpenStreetMapProvider</span> <span class="token attr-name">APIKey</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>your-api-key<span class="token punctuation">"</span></span> <span class="token punctuation">/&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token namespace">dataVisualization:</span>RadMap.Provider</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token namespace">dataVisualization:</span>RadMap</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p>If your needs are not fully met by any of the built-in providers, we got you covered. You can create custom providers based on existing ones or brand-new ones, that precisely cater to your customers&rsquo; needs.</p>
<h2 id="second-stop-is-the-layering-mechanism">Second Stop Is the Layering Mechanism</h2>
<p>A single layer is what we did in the previous two examples. We have one layer of data and that is the image tiles coming from the service provider. With the layering system of RadMap, we can overlay information layers on top of each other and add more geographical data and/or elements that augment this geographical data like pins, routes, callouts, planes, boats and any form of geometry your application needs.</p>
<p>Here is a screenshot of a map of Washington D.C. showing a street view from Open Street Maps over aerial view from Bing Maps.</p>
<p><img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2021/2021-10/multi-layer.png" alt="Multi-layer map of Washington D.C. showing a street view from Open Street Maps over aerial view from Bing Maps." title="multi-layer map of Washington D.C."></p>
<h2 id="third-stop-getting-a-clearer-view">Third Stop: Getting a Clearer View</h2>
<p>Did you know there are close to 20,000 public and private airports in the USA? That is a lot of pins to place on a map. Thankfully, we have not one, but two solutions that can work in synergy.</p>
<p>Number one is to group items in proximity to each other into clusters. Number two is UI <a href="https://docs.telerik.com/devtools/winui/controls/radmap/features/visualization-layer/virtualization" target="_blank">virtualization</a>, which allows the map to only show elements that are currently inside the viewport.</p>
<p>I couldn&rsquo;t find a file with all the airports in the USA, so we will have to make do with &ldquo;only&rdquo; the international ones. Here is RadMap showing said airports on two zoom levels with no pins overlapping thanks to <a href="https://docs.telerik.com/devtools/winui/controls/radmap/features/visualization-layer/clustering" target="_blank">clusterization</a>.</p>
<p><img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2021/2021-10/airports-1.png" alt="Wide view map of airports in the US—numbered pins spread across the nation" title="airports wide view"></p>
<p><img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2021/2021-10/airports-2.png" alt="A zoomed-in map of airports in the New York and Philadelphia region" title="airports zoomed"></p>
<h2 id="fourth-stop-is-the-built-in-controls-of-radmap">Fourth Stop Is the Built-in Controls of RadMap</h2>
<p>They might appear tiny, but they pack a punch. They are there when you need them without getting in the way of the important items the map is visualizing. And when I say they pack a lot, here is what you can do with them: track the geolocation of the mouse pointer, get the scale at which the map is displayed, change the zoom level, pan in four directions, change the type of tiles the provider displays (if it offers more than one).</p>
<h2 id="fifth-stop-is-finding-the-route-between-two-places">Fifth Stop Is Finding the Route Between Two Places</h2>
<p>Maps have been used for navigation since ancient times. This is still the case today and it is easier than ever. Here is a screenshot showing how to get from New York to Boston. In red is the quickest route to take by car and in blue is the route to take if you are driving a semi-trailer truck, pulling explosive goods, and avoiding tolls. Oh, you get turn-by-turn instructions as well.<br>
<img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2021/2021-10/Routing.png" alt="Routing map from New York to Boston" title="Routing map"></p>
<p>Routing and truck routing are part of the services available in the Bing Maps Provider of RadMap. And they are not alone there, keeping them company are search, geocoding and elevation. All these great services are consumable through a <a href="https://docs.telerik.com/devtools/winui/controls/radmap/features/providers/bing-rest-map-provider/bing-map-rest" target="_blank">convenient API</a> right from your C# code.</p>
<p>On their own, these services are useful and great, albeit only in text/JSON/xml form. To make them truly powerful and unlock their full potential, you need to &ldquo;translate&rdquo; them in the language of RadMap&mdash;graphical.</p>
<p>Enter the built-in <a href="https://docs.telerik.com/devtools/winui/controls/radmap/features/visualization-layer/map-shape-data" target="_blank">shapes</a>. Thanks to this set of shapes, you can visualize something, as complex as the routes in the screen shot above, in a language that is easily understood by the customer.</p>
<h2 id="final-stop-is-reading-and-displaying-shapefiles">Final Stop Is Reading and Displaying Shapefiles</h2>
<p>Geographical maps are helpful to get you to a certain destination, and when you get there RadMap can continue being useful. As an example, here is a hotel floor plan which can be of great use not only to find your way around but also when you choose your room. Sea view, mountain view, pool view, whatever your preference is, you can quickly satiate it.</p>
<p><img src="https://d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2021/2021-10/HotelFloorPlan.png" alt="Map of a Hotel Floor Plan, including room numbers and availability" title="Hotel Floor Plan"></p>
<p>These are some of the scenarios that utilize RadMap and its rich feature set. I am sure there are countless other use cases that I do not even realize exist. You can read the full documentation to get an idea of where RadMap can help you and start building. Go try RadMap, share your feedback, and show us how RadMap empowers your applications. Here are some channels to get in touch:</p>
<ul>
<li>Get in touch by email&mdash;drop us a line, for anything related to product or just to say hi at <a href="https://www.telerik.commailto:[email protected]" target="_blank">[email protected]</a>.</li>
<li><a href="https://feedback.telerik.com/winui?_ga=2.156597118.497059725.1634563662-1226047811.1616427309" target="_blank">Feedback Portal</a>&mdash;share any feature request (or bug reports) that you might have.</li>
<li><a href="https://www.telerik.com/forums/winui" target="_blank">Telerik Forums</a>&mdash;if you need any technical assistance with our products, let us know and we will help.</li>
</ul>
<h2 id="get-the-bits">Get the Bits</h2>
<p>Don&rsquo;t wait&mdash;try out the latest:</p>
<p><a href="https://www.telerik.com/winui" class="Btn" target="_blank">UI for WinUI</a></p>
Source: Telerik


Categories: News


Leave a Reply

Your email address will not be published. Required fields are marked *