I was trying to create an app using Bing Map. in which i need to add two reference libraries
Microsoft.Maps.MapControl.Common.dll
Microsoft.Maps.MapControl.dll
I followed the tutorial from : http://www.codeguru.com/csharp/csharp/cs_misc/article.php/c18305__1/Working-with-Bing-Maps-in-Silverlight-and-Windows-Phone-7-Applications.htm
But when i installed BingMapAppSDK from Bing Maps it didn't have these api.
It does have libraries
Microsoft.Maps.Core;
Microsoft.Maps.MapControl;
Microsoft.Maps.MapControl.Types;
Microsoft.Maps.Plugins;
But not the above ones.. Due to this i am not able to use Bing Maps.
I am using Visual Studio 2010 and creating Silverlight app and Silverlight 5 is installed.
Please suggest.
You have To add a Service Reference.
1 . Right click on "reference" and then Add Service Reference.
then copy one of the four links from here which you want to use.
http://msdn.microsoft.com/en-us/library/cc966738.aspx
Click on go .
Name it according to you .
Now try to add namespaces
like
using ProjectName.GeocodeService;
using ProjectName.ImageryService;
Hope This helps.
There are different Bing Maps SDKs for different platforms although, confusingly, they do share rather similar namespaces. It's really unclear from your post which platform you're trying to target...
To develop a Silverlight Bing Maps application, you need the Bing Maps Silverlight control SDK, available from http://www.microsoft.com/download/en/details.aspx?id=2949
To develop a Windows Phone 7 Bing Maps application, you need the Windows Phone 7 SDK, http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27570
To develop a "Bing Maps App" (note the quotation marks), which is a special kind of Bing Maps application that is hosted by Microsoft on the bing.com/maps site, you need the Bing Maps App SDK: http://connect.microsoft.com/bingmapapps
Note that there are also dedicated Bing Maps SDKs for iOS, Android, and WPF development, as well as the traditional AJAX control.
The name of the dll's can be different from the namespaces they provide. If I understand your question correctly, you already have access to everything you need. The four libraries are what you need to make your apps, while the dll files are what you are already using to get access to those namespaces.
In the example link you listed, he shows how make a reference to the map control namespace by doing the following:
xmlns:m="clr-namespace:Microsoft.Maps.MapControl; assembly=Microsoft.Maps.MapControl"
In this case, the assembly (dll file) and the namespace are the same, but they don't have to be and thats why they are specified separately.
From here, just add the map control.
<m:Map CredentialsProvider="Your_Credentials" />
Related
i m new to Xamarin Forms, While Creating an Android Application using Xamarin Forms, I encountered a problem, I like to use Google Direction API , I can create Map using Xamarin Forms on Android but to use HTTPURLConnection and json Parsing, do i have to create Custom Renderer Class and then access in Android Dir and Code there, Or i can create a Class for HTTPURLConnection, Json Parsing and then pass to Xamarin Forms map as class object. Please Help !!
The Google direction APIs are not exposed in Xamarin.Forms because they are not available cross-platform. Baked into Forms is only the basic mapping support which abstracts away the differences between Google Maps, Apple Maps and Bing Maps.
For anything more specialised/more platform specific you will have to create a custom renderer and/or use some architectural design to connect your shared code and the platform code (you could use the DependencyService - https://developer.xamarin.com/guides/xamarin-forms/dependency-service/).
Is it possible to have Google Earth integrated into a Silverlight app? I've tried searching on Google but the best results I could find were forum posts from 2008 which were uncertain at best.
I don't believe there is any straightforward way to utilize Google Earth from a Silverlight application. And even if you could get it to work, you would have practically no control over the Google Earth portion of the program since, to my knowledge, it is not designed to be hosted in other applications.
However, if what you want is a 2D/3D GIS (Geographic Information System) inside your Silverlight application, an alternative to Google Earth is the Bing Maps Silverlight Control. This is already Silverlight compatible, has a full 2D/3D API and provides some of the same features as Google Earth.
Here are two links about the Bing Maps Silverlight Control:
Bing Maps Silverlight Control 1.0 Released
Changes to Bird’s eye and 3D Maps
As I recall, you have to apply for a free license to use this and there are some restrictions. Please read the license carefully.
Please refer to the following links:
Using Google Maps with ArcGIS Silverlight
Display Google Maps Imagery using Bing Maps Silverlight Control
However, there do exists some legal issues as Google has prohibit the use of Google Map outside of their supplied API. As pointed in the first link:
Now for the legal answer. In short, no. You cannot access Google Maps imagery outside of an interface (read: APIs) provided by Google.
I have created a Silverlight Application project using the Bing Maps Silverlight Control and it works well.
Now I want to use a frame control in other WPF Application project to show the map. So I want to put the main page of the Silverlight project into the frame. I tried to add reference to the WPF project, but there appeared an error. And using Bing Maps SOAP Services in WPF project doesn't meet requirements, so I must use the Bing Maps Silverlight Control.
I really don't know how to solve the problem. I'll be glad to know any ways to use Bing Maps Silverlight Control in a WPF project.
Thanks!
Microsoft has recently published (23.08.2011) a beta version of a WPF control for Bing Maps. The API is quite the same as Bing Maps Control for Silverlight API so a significant piece of code written for Silverlight version should also work with the WPF control. Here's a blog entry with details: http://www.bing.com/community/site_blogs/b/maps/archive/2011/08/23/announcing-the-bing-maps-wpf-control.aspx
If you cannot use a Bing Map control for WPF (e.g. see: http://www.codeproject.com/KB/IP/BingMapsWebServiceExample.aspx), you could try to load the webpage that hosts the silverlight control inside your WPF app. You could achieve this by using the WebBrowser control or some similar method, and setting the URL to your silverlight page.
Cheers,
G.
The built-in emulator from the WP7 Tools doesn't have the Bing App installed, and I don't have any phone hardware to test with. So I'm simply wondering, how can I open the Bing Maps Application to a specific Lat/Long?
Related Questions:
iPhone -- How can I launch the Google Maps iPhone application from within my own native application?
Android -- https://developer.android.com/guide/appendix/g-app-intents.html
It seems that starting from the OS version 7.1 there's a specific task available for this, see BingMapsTask and for directions the BingMapsDirectionsTask.
Unfortunately there is no way to launch the Bing Maps App from within your own application.
In an early CTP there was a way but this has been removed. Hopefully it will return in the future but it is not on any current, public, roadmaps.
This leaves two alternatives.
Option 1
You could perform a search for the lat/long you want to show. The search app does directly integrate with the bing maps app so, assuming that bing can take the lat/long you provide and return something useful, the user would still be able to do whatever they wished within the bing maps app.
This has 2 downsides though. Firstly, you have no control over the search results. And, secondly, you cannot test this on the emulator.
Option 2
You could use the BingMaps control within your own silverlight application.
(Prior to the RTM, it was posible to use the full Silverlight version of the control within your app. But, this had a few quirks and was only ever intended as a stop gap solution.)
While not as fully featured as the app, the control does offer a lot of functionality.
Without a real device, but you could simulate location data, for testing, with the Reactive Extensions.
Even with a real device you will probably want to look at doing this as it's a lot easier than trying to debug while walking or driving around.
Edit:
As per this post by Kevin Marshall, if you're going to use the WebBrowserTask() (option 1 above) prefix your query with "maps:" and URL encode your query string. eg:
var task = new WebBrowserTask();
task.URL = "maps:1%20N%20Franklin%2060606";
or
task.URL = "maps:37.788153%2C-122.440162";
Bing maps silverlight control is now supported out of the box and is part of the tools... learn more about it here: http://channel9.msdn.com/Learn/Courses/WP7TrainingKit/WP7Silverlight/UsingBingMapsLab/Exercise-1-Introduction-to-the-Bing-Map-Control
Yes you can do this. I've got it running in the emulator (however, as many people have said there's no guarantee the Bing Maps for Silverlight control will run on the actual device)
Here is the xaml:
<m:Map Grid.Row="0" x:Name="mapMain" ZoomLevel="5" Mode="AerialWithLabels" CredentialsProvider="YOURBINGMAPSLICENSE" />
and here's some code to set the location in the .cs class
var ppLoc = new Location(-37.821285, 144.97785);
mapMain.SetView(ppLoc, 17);
Is it possible using VS2008 and C# to create a class library which can be treated as an ActiveX control on a Windows Mobile 6/6.1 device?
I am looking to retrieve the positioning details from a device so I can post the current location on a google map. I have this all working nicely as a application but I need to expose the same functionality from just from a web page so I think I am going to have to use an ActiveX control?
If there are any alternative approaches I could take that would be great.
Thanks
No. Since the CF lacks EE Hosting support, there's no way to create a COM/ActiveX control in managed code. You'll have to write in in C++ - there's just no other option.