Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact

NAVIGATION - SEARCH

Step By Step: Bing Maps Silverlight and an Out Of Browser (OOB) Application

I’ve received a couple questions regarding the display of the Bing Maps Silverlight control within a Silverlight Out Of Browser (OOB) application, so I decided to write up a simple step by step example of creating a basic Silverlight OOB application that displays a map. Step By Step Example Follow the below steps to create a basic Silverlight OOB application that displays a map using the Bing Maps Silverlight control within Visual Studio 2010: Step 1: Create New Project In this case, I’m ... [More]

Silverlight: Modify MEF to load plugins from DLL and XAP files

I’m using MEF in a new project, and the limitation that I’ve found in using MEF with Silverlight is that it only supports downloading and loading plugins/assemblies from XAP files. What I would really like to do is support plugins that are compiled into either individual DLL’s or more complex plugins within a XAP. Update: I have also posted this to the Issue Tracker on the MEF CodePlex site. Why individual DLL’s? The really answer to this is flexibility. I don’t think they creators of MEF mad... [More]

Silverlight: Embed IronRuby within XAML Part 2

In the previous post I explored the possibility of embedding IronRuby / DLR Script within XAML using both an IValueConverter and Custom UserControl. I spent a little more time experimenting with the DLRScriptUserControl I posted, and came up with some small modifications to it that allow UI event handlers to be wired up using a DLR language (such as IronRuby. Loading Assemblies Into the ScriptEngine.Runtime Context Something nice with how the ScriptEngine class allows you to execute a script o... [More]

Silverlight: Embed IronRuby/DLR Scripting within XAML using IValueConverter and Custom UserControl

After I wrote the “Intro to IronRuby/DLR Scripting in C# Silverlight 4 Application” post, I came across an interesting series on embedding DLR scripts in XAML with WPF. This is an interesting series, although the code doesn’t run in Silverlight, due to the fact that Silverlight is only a subset of WPF and doesn’t support the System.Windows.Markup.MarkupExtension class. I test out a couple things in Silverlight, and I was able to get similar DLR scripting functionality working under Silverlight u... [More]

Intro to IronRuby/DLR Scripting in C# Silverlight 4 Application

I’ve been working lately on figuring out how to add DLR scripting support to a Silverlight 4 application I’ve been working on. The idea is to give it a plugin style architecture, with the plugins being written in a DLR language; currently focusing on IronRuby. I originally searched how to do this, but couldn’t find any recent articles that discuss Silverlight 4. Also, most articles out don’t target Silverlight and more of them discuss IronPython and not IronRuby, even though the DLR stuff is the... [More]

Use New Bing Maps Road Imagery In Silverlight Map Control (Unofficially and Unsupported)

Recently the consumer facing Bing Maps site changed the map imagery that is displayed for the Road map mode. This map imagery has not been officially made available for Bing Maps for Enterprise developers to use within their applications. The imagery is only officially available to the Bing Maps consumer website. Unofficially, you can still access the imagery if you know the URL format to get it. Below is an example of using the URL format for the new imagery to display it within the Bing Maps S... [More]

Loading Microsoft CDN Hosted OpenStreetMap Imagery in Silverlight Bing Maps Control

Recently a new Bing Maps App for OpenStreetMap (OSM) was released. This new feature of the Bing Maps consumer facing website is hosting the OpenStreetMap imagery using the Azure CDN, rather than relying on OpenStreetMap’s server. There has been some question as to whether developers can use the Microsoft hosted OpenStreetMap imagery within their own applications. I have not seen anything official from Microsoft on this, so I assume that doing this is against their terms of use. You assume... [More]

Silverlight Bing Maps: Draw Circle Around a Latitude/Longitude Location

Over 2 years ago I posted an example of how to draw circles on the Bing Maps JavaScript control. I thought it was about time to update that post to demonstrate how to do this using the Bing Maps Silverlight control. This is basically a C# port of the original JavaScript code. Sometimes this can be really useful, but it isn’t built into the Sivleright Bing Maps Control. So you need to implement it yourself in order to do it. However, instead of writing from scratch, feel free to copy the c... [More]

Display Google Maps Imagery using Bing Maps Silverlight Control

I’ve gotten a couple emails asking how to show Google Maps imagery using the Bing Maps Silverlight Control. I previously post how to display OpenStreetMaps and Yahoo maps imagery using the control, but is it possible to show Google Maps imagery too?? Yes, absolutely; well technically, but the Google Maps Terms of Use does prohibit it. Actually, the Google Maps Terms of Use prohibits the direct access of the map tile images, and does not specifically prohibit using them with the Bing Maps S... [More]

Resizing and Auto-Scaling Pushpin in Bing Maps Silverlight

Plotting pushpins on the Bing Maps Silverlight control is really simple when using the Pushpin control that comes with the control. But, what if you want to change the size of the Pushpin? It doesn't work to just change the Pushpin.Height and Pushpin.Width properties. This is actually because those properties pertain to the controls Content property. So, how exactly do you go about changing the size of the Pushpin if the Height and Width properties don't work? Use ScaleTransform to Resize Pushp... [More]

Draggable Pushpins using Bing Maps Silverlight Control

Using a map to visualize data within an application is great, but you must first get the location of the data to be displayed. If you have the address you can geocode it using the Bing Maps Web Services, but "What if you can't geocode it?" Or, "What if the geocoding can't find the address?" Well, if your user knows where the location is, then you can have them point it out by clicking on the map. Creating Pushpins in response to a users click is nice, but wouldn't it be even ... [More]

Silverlight with WCF RIA Services Throws "Project File ... Not Found" Error When Compiling in Visual Studio 2010 RC

While working with the Silverlight Business Application template in Visual Studio 2010 RC I discovered a peculiar issue that if the project specified as the "WCF RIA Services Link" for the Silverlight Project can not be found a compile time error of "Project File ... Not Found" will be generated. This is a very cryptic error message since it's the same message that gets thrown if you delete a Project File (.csproj or .vbproj) from the hard drive but it's still references within the Solution File... [More]

Prototype of OpenStreetMap Silverlight Control using DeepEarth and Bing Maps SDK

I’ve decided to expand a little on using OpenStreetMap imagery with the new Bing Maps Silverlight Control in response to the following comment posted by John O’Brien on my previous “Display OpenStreetMap Imagery using Bing Maps Silverlight Control v1” post: “Very close Chris but you will still need to enter a Bing Maps AppID. If however you create your own map from MapCore and don't use the Bing Maps services then you don't need creditials” Yes, it is t... [More]

Display OpenStreetMap Imagery using Bing Maps Silverlight Control v1

The Bing Maps Silverlight SDK documentation on MSDN contains an article on Adding Tile Overlays to the Map, that demonstrates how to overlay your own map imagery over top of the Bing Maps Imagery. However, what if you want to completely replace the Bing Maps Imagery with some other Imagery like the OpenStreeMap Imagery? In the “Adding Tile Overlays to the Map” article it shows using a “LocationRectTileSource” to add the custom map imagery overlay. To implement the OpenSt... [More]

Getting Started with Bing Maps Silverlight Control v1.0

It’s been 8 months since the CTP release of the Bing Maps Silverlight Control at MIX’08, and finally this week Microsoft released the Final v1.0 release of the control to the web.  Now, we can all finally start using the Bing Maps Silverlight Control in Production! If you’ve worked with the CTP, then you’ll want to take a look at Ricky’s “Migrating from Bing Maps Silverlight CTP to Production Version” article. It explains all the stuff you’ll... [More]

Bing Maps Silverlight CTP: Plot/Edit Pushpin data via a ChildWindow

Recently I posted an example of using the Web.Maps.VE Bing Maps ASP.NET AJAX Server Control with the AjaxControlToolkit ModalPopup Extender over at the Simplovation Blog. Writing that example was rather simple since those two components/libraries are both written on top of ASP.NET AJAX and work extremely well together. This did however get me thinking about how to implement this same type of functionality using the Bing Maps Silveright Control CTP, and now that Silverlight 3 is out and it has a ... [More]

OpenStreetMap: Get FREE Web Mapping with Road Maps for your Applications

OpenStreetMap has been around for awhile and provides free geographic data that can be used by anyone. The data is all community created/contributed and that’s why it’s free to use. Other mapping services such as Bing Maps for Enterprise and Google Maps license their geographic data from some other third party and that’s why they cost thousands of dollars per year to use within commercial applications. Using OpenStreetMap with JavaScript The screenshot on the left is showing ... [More]

Bing Maps Silverlight CTP: Using MouseClick Event To Add "Pushpins"

In previous tutorials I covered the “Basics of Adding Polygons and Polylines” and “Adding Media (Images, Video, etc.)”, but what about handling user input via Map Events? Well, in this tutorial I’ll cover the basics of working with the Map.MouseClick Event (equivalent of the old “onclick” event in the Virtual Earth JavaScript Control). This was written for the Bing Maps Silverlight CTP Release. Adding a MouseClick Event Handler In order to wire things up to manipulate the Map using the MouseC... [More]

Bing Maps Silverlight CTP: Overlay OpenStreetMap, OpenAerialMap and Yahoo Map Imagery using Custom Tile Layers!

UPDATE: I have written a newer version of this article to specifically target the latest Bing Maps Silverlight Control Version 1.0 Release. You can find the new article here: Display OpenStreetMap Imagery using Bing Maps Silverlight Control v1 In the “Using Tile Layers to Overlay Custom Map Imagery” article I showed you how to overlay your own Custom Map Imagery that you generated using the MapCruncher tool on top of the Map. Now, in this article I’ll show you what you need... [More]

Bing Maps Silverlight CTP: Using Tile Layers to Overlay Custom Map Imagery

One of the features that the Virtual Earth JavaScript Control has is the ability to add custom Tile Layers to overlay your own custom imagery over the map. The Virtual Earth Silverlight control also supports this feature. This was written for the Bing Maps Silverlight CTP Release. Before I begin to explain how to add custom Tile Layers to the Map it’s important to note that you can still use the MapCruncher tool to generate Map Imagery Tiles to be used with the custom Tile Layers. The specific... [More]

Bing Maps Silverlight CTP: Adding Media (Images, Video, etc.) to the Map

This was written for the Bing Maps Silverlight CTP Release. In the previous tutorial (“Basics of Adding Polygons and Polylines using XAML and Code”) I mentioned that there is no Pushpin Shape Type in the new Virtual Earth Silverlight Map Control SDK CTP. Instead, the Silverlight control has the flexibility of plotting/displaying anything (as long as it inherits from UIElement) you want at a specific Latitude/Longitude Coordinate. This opens up a ton of UI options that can be built to allow the ... [More]

CTP: Bing Maps Silverlight CTP: Basics of Adding Polygons and Polylines using XAML and Code

This was written for the Bing Maps Silverlight CTP Release. Now that we’re familiar with the basics of the Virtual Earth Silverlight Map Control SDK CTP (from my Getting Started with Virtual Earth Silverlight CTP tutorial), we’re ready to move on to adding Shapes (Polygons and Polylines). After all what use is a Virtual Earth Map Control without plotting some data on it. If you’re not familiar with how to get a Map displayed within a Silverlight Application, I really encourage... [More]

CTP: Getting Started with Bing Maps Silverlight CTP Map Control SDK

UPDATE: I have written a newer version of this article to specifically target the latest Bing Maps Silverlight Control Version 1.0 Release. You can find the new article here: Getting Started with Bing Maps Silverlight Control v1.0 It seems like forever since MIX’08 when a demo was shown of a new Silverlight-based Virtual Earth Map Control. Well, now FINALLY we actually have a version of the control to “play” around with. The reason I say “play” is because it&rsq... [More]

Virtual Earth Silverlight Control CTP Teaser and Some Initial Thoughts

Yesterday, the Virtual Earth Silverlight Control CTP (Community Technology Preview) was announced at MIX’09. I was also fortunate to get early access to the CTP, so I’ve been playing with it for a few days. I can’t show you any code yet (until it’s released publicly), but I can tell you a little about it for now. Once it’s released I’ll be posting some articles that range from Basic How-To to Implementing Some Cool Stuff; but you’ll have to wait a little bit for those. For now, here’s a little ... [More]