Bing Maps WPF control in OFFLINE mode (MercatorMode) - c#

We are investigating the potential use of Bing Maps WPF control in OFFLINE mode (which will be called MercatorMode in the control). OFFLINE mode implies that we download on a desktop machine the tiles for different zoom levels and then the WPF control accesses these pre-saved tiles instead of connecting to the Internet. Technically this scheme works perfectly.
What is unclear right now is how to obtain (download) the tiles without violating any Bing Maps license rules. So it raises two questions:
Whether there exists a way to officially download Bing Maps tiles
Whether it is officially allowed to use the control in the OFFLINE
mode (assuming that we’ve got some tiles from some source of tiles)
The legal documentation for Bing Maps is rather confusing than clarifying. So we’d like to ask about the particular experience of other developers.
Our ultimate goal is to have:
a good WPF control for maps (which is a natural WPF control, not just a
wrapper over a WinForms control) supporting OFFLINE mode
a legal source of tiles to be used in the OFFLINE mode (costs are
not an issue – we are ready to pay for tiles)
Maybe the community would suggest another pair WPF Control + data source for tiles. We do not need any deep level of zooming since we plan to use the control and tiles only for drawing the borders of countries (excluding extremely small countries).
Right now we see that Bing Maps as a data source also supports Bing Maps WPF control, but the licensing terms are a real mess.
PS
We are developing an “in-house” desktop application which will be used internally in our organization while the Bing Maps license never explicitly references desktop applications while mentioning web-applications and Windows Store. Does anybody know whether Microsoft intentionally doesn’t mention the desktop applications?

None of the Bing Maps controls can be used offline. This is against the terms of use. MercatorMode is not an offline mode, this is just a mode which all the standard map views inherit from and which you can use to have a blank background to a custom tile layer. The Map control will always need to have access to the internet otherwise it will not be able to authenticate the map. When it can't authenticate the map an error is thrown. You can handle this error such that it disables the map instead of crashing the app by using the following code sample: http://rbrundritt.wordpress.com/2012/04/05/bing-maps-wpf-internet-connection-issue/
For an offline map control solution take a look at GMap.NET: http://greatmaps.codeplex.com/

Telerik has a nice Map control which supports:
Rich geographical context for large volumes of data
Heat maps
Multiple tile layers
Multiple Map Providers
Support for Bing Maps, OpenStreetMaps, custom map providers, as well
as visualization of geospatial data.

You can try https://greatmaps.codeplex.com/ which works fine in WPF/Offline mode. First you may have to use their application to download the desired maps at all zoom levels. The maplets are stored in SQLLite database which you may consume in your WPF application. The entire source code along with the map control in WPF is also available there.

Related

Does arcgis Map api supports for cluster locations in UWP windows application?

I have gone through that arcgis map documentation i have an requirement cluster wise displaying my location on map. Does this possible in C# UWP mobile application Please share me code related to this.
The ArcGIS Runtime doesn't support clustering out of the box at this time. You could probably build something yourself using GraphicsOverlays, by grouping features near by each other based on the current MapView.UnitsPerPixel value (ie split the view into 100x100px blocks, calculate how many would fall into each group, then render a graphic in each block that has one or more. Once a zoom is complete (NavigationCompleted event), if the UnitsPerPixel value changed enough beyond some threshold recalculate your clusters.

Is Nutiteq the tool that I need

I have a VS 2008 C# program that I would like to port to a mobile app. It used Microsoft.sqlserver.types, geography, polygon, etc. It does not need maps, connection to the internet, etc. It calculated acreage, drew the polygon, never accessed or wrote to a DB file. I am learning and playing with Xamarin (now that it is free).
I do realize that not all the C# code is applicable to Android and IOS, and some would have to be other code. Can I do this same kind of coding\calculating, without accessing the internet, without using maps, without accessing a DB (although that might be useful later on), etc...using Nutiteq (the free version), across Windows, Android, and IOS?
Nutiteq SDK is specifically for display of maps. It has own geography objects and methods, not related to Microsoft.sqlserver. It is meant to replace e.g. Google/Apple maps, to have offline map view and routing features, and also some GIS: vector data editing, reading various GIS data formats like ShapeFile, GeoTIFF etc, and it works with native development on iOS and Android, and also Xamarin.
If you do not have any Map View, then probably Nutiteq SDK is not the best tool for your app.

Interactive Google maps on a C# winform

I have an application with Google maps in it. Currently the maps are rendered in a WebBrowser via the Maps Javascript API.
I have a requirement to make the map interact with the application. Specifically, I have placed markers on the map. The winform needs to register when one of them is clicked, double clicked, etc. and know which one it was. If the user right-clicks on a blank area on the map, I need some way of registering both where to draw the context menu and the lat/long that pixel represents geospatially.
I don't care whether the map remains in a webbrowser control or is replaced with something else. If needed, I can tear the whole thing out and put a new map in there - but it should be Google (because we have the expensive enterprise API) and it absolutely has to remain inside the winform.
How can I accomplish this interactivity?
Almost missed the part where you said you're willing to replace the web version with something else.
Have a look at Great Maps - for Windows Forms and WPF. It is a custom WinForms control you can drop on a form.
It supports a lot of map providers, Google Maps included. They have a demo with which you can play and see how it works and how it can be integrated.
From experience, I can say that it is possible (quite easily) to bind to map events (marker clicked, double clicked as well).
Something worth noting is that using Google Maps with it might violate Google's terms of use (you also get a warning in the demo app). You can always explore some of the free providers, like OpenStreetMap.
I would not use Great Maps for windows forms and wpf (GMap.Net) because it violates Google Map Usage Terms by accessing Google Map Tiles directly.
You can host one by yourself if you follow this link:
https://github.com/mchall/GoogleMapsApi.
Or you can use one free WPF control at:
https://archive.codeplex.com/?p=wpfgooglemap.
We use GDS Google Map. It is not free, but affordable. It does what we need.

Surface offline maps

I'm developing Surface application, but I came across a problem. I need to develop a control with next abilities:
World map on background (should display only continents).
I need a way to find out on which continent user touched(interactive background map).
Any controls can be added on the top of the map control (for an example video-player control for different regions of the map).
Map control should works in offline mode only (without any
connection to internet).
I can't find any frameworks that would meet my goals.
So, anyone know something projects/code samples that can help me to achieve my goals
Offline mapping could be done in many ways, one of them would be download / get shapefile for continents. (You can search for that). Later you can use SharpMap to display that shapefile in WPF application. SharpMap is a .Net framework based open source application which enables reading multiple geospatial formats.
Another option to read geo-spatial data is DotSpatial.

Google Maps in C# Visual Studio application

For my university I have to create an application that for the User Interfaces paper that I'm doing. I want to create an application that focuses on Africa and allows the user to plot on the map some points of interest.
First thing first though, i need to be able to get the Google maps API working in a form. Does anyone have any idea how I would do this?
Google maps is based on JavaScript. You will need to embed the maps objects into the page and use it that way.
A good starting point would be http://code.google.com/apis/maps/index.html and the most basic of tutorials is available at http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorld.
I would definatley recommend then links above and then move onto something like http://googlemap.codeplex.com/. It's better to know what's going on underneath before abstracting it away.
Alternatively, you may wish to check out GMap.net (the website is not GMap.net: http://greatmaps.codeplex.com/)
GMap.NET is great and Powerful, Free, cross platform, open source .NET
control. Enable use routing, geocoding and maps from Coogle, Yahoo!,
Bing, OpenStreetMap, ArcGIS, Pergo, SigPac, Yandex, Mapy.cz, Maps.lt,
iKarte.lv, NearMap, OviMap, CloudMade in Windows Forms & Presentation,
supports caching and runs on windows mobile!
I've used this before with WinForms and found it pretty handy. I suggest this because parts of Africa may be better served by different map vendors.

Categories