Silverlight Bing map question - silverlight

I am planning to use Silverlight control for bing map. It will be used in a ASP.Net website.
Note: I am new to Silverlight and Bing map.
How the Silverlight bing map control will behave? Will the bing map service be called from the client browser or the web server?
Is there any architecture diagram related to this?
Please help.
Thanks
Lijo Cheeran Joseph

A good place to start is on the following link:
http://www.microsoft.com/maps/product/faq.aspx

I do not know about any architecture diagrams. With the Silverlight control (the preferred control at this point, over the old AJAX control), the map service is called from the client browser...it is called from within the Silverlight application that hosts the map control, which like all Silverlight applications, runs exclusively on the client.
You could make calls to the Bing web services server-side, then use that data in some way, but if you're going after an interactive map, you will want the Silverlight control.

Related

How to load Google Maps in wpf window?

Is it possible to load Google Maps in wpf window? If yes how can i do this?
I'm using visual studio-2010 and DevExpress tool.
This code i found from DevExpress official site for openstreetmaps.
const string roadUrlTemplate = #"http://{subdomain}.tile.openstreetmap.org/{tileLevel}/{tileX}/{tileY}.png";
An easy way is to use the WebBrowser control.
In XAML add:
<WebBrowser x:Name="wbMaps" Source="https://www.google.com/maps"/>
If you are not limited to using Google Maps then take a look at the Bing Maps WPF control for a truly native WPF map solution:
http://msdn.microsoft.com/en-us/library/hh750210.aspx
If you need to use Google Maps you can of course use a web browser control and create an interlop to communicate between C# and JavaScript however if you want a native WPF solution then take a look at some open source solutions like the following:
http://greatmaps.codeplex.com/
https://github.com/ericnewton76/gmaps-api-net

Simple integration of Bing Maps into WPF application page

How would I go about integrating Bing Maps into a page or frame in my WPF application? I have found a lot of resources for Bing Maps development, but I don't need to develop with Bing Maps, just add the actual thing into my application without hyper-linking out to the website.
Windows 8 applications do this with "contracts" with other metro apps but I do not see a similar functionality with WPF applications.
Thank you!
Just go here and download the control :)
http://msdn.microsoft.com/en-us/library/hh750210.aspx
The control is in the "Bing Maps WPF Control SDK"
If i remember correctly you will need to register for an api key.
UPDATE:
to get the api key you have to register here https://www.bingmapsportal.com/
This was a lot easier than I expected, #Tjofras had a correct answer but here is some more elaboration:
1) Get a Bing Maps developer key for free here - https://www.bingmapsportal.com/
There is a trial version that gives you all the features, but for a limited time and there is a basic version that is free but has limited features.
2) Create a project in Visual Studio for Desktop
3) Check out this article for step-by-step instructions and the exact lines of code to integrate it into your project.
This line goes at the top of your MainWindow.xaml page :
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
Add the map into your existing grid with your developer key, initial latitude and longitude values, and an initial zoom level with the tags:
m:Map object
CredentialsProvider tag (your developer license code)
Center tag (initial latitude and longtitude)
ZoomLevel tag (how zoomed in you are)
Browse the API's and make your application awesome!

How to cast from Windows.UI.Xaml.UIElement to System.Windows.Controls.UIElement

I'm trying to create a new UI for an app I developed for the Windows Store using the Windows Runtime API. This new client is going to be a WPF Desktop App. I'm trying to reuse as much code as I can but I'm facing several issues.
Fortunately there's a way to use WinRT in a WPF Desktop app (see this and this)
Now I'm blocked by the following issue:
The MediaCapture class has a method to start the preview of a device, after I've started the preview I can create a CaptureElement to display the preview.
CaptureElement is part of Windows.UI.Xaml.Controls and cannot be used in containers from System.Windows.Controls in which the WPF UI is built.
Am I going anywhere with this approach? what would you recommend? How can I display the preview of a device in the WPF app?
Thanks in advance
CaptureElement can't be used in desktop applications - the documentation says "[Windows Store apps only]". In general - the UI controls from WPF and WinRT/XAML can't be used outside of their respective domains (desktop/immersive UI). In a WPF app you need to use WPF controls - e.g. DirectShow for camera capture,

Arcgis: How can I load an image as the map?

I am using Arcgis WPF, I am wondering if I could load an image as the map in my application? If it is possible, could you please tell me how to achieve it?
Thanks.
You can use ImageServer for the imagery files, and if the image is an .jpeg or .png and is non georeferenced, then you can use ArcMap to make it a map service (tiled map service or dynamic map service) and then use that map service in your code. You can go to ArcGIS online forums for WPF for more information
Is it satellite imagery or just an image? What API are you using?
If it is just an image, you can use a Graphics Layer and add the image as a graphic. With this approach, you can give it whatever lat/lon makes sense for your spatial reference.
If you have satellite imagery, you want to add it as a Raster layer (ArcGIS for Desktop/Engine) or a Tiled Map Service (WPF/Silverlight APIs). If you are using the WPF API's (and not ArcGIS Engine) then this requires access to ArcGIS Server to publish a map service.
I recommend reading through the API documentation as it is well documented.

Screen scraping silverlight browser application info

I'm registered to a site which uses a silverlight application that shows some personal information.
My goal is to be able to read some data from the silverlight application.
Is it possible?
I know that this could be done to a regular web page using curl.
but, what about silverlight application?
Does it store the information to a file or something like that?
Thanks
You can use White, a tool for automating windows applications, to get information out of a running Silverlight application. White is mainly used to perform functional testing of applications, but it should allow you to extract information from the application as well.
Look here for an example of White and Silverlight: http://www.codeplex.com/wikipage?ProjectName=white

Resources