Chris Pietschmann

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

NAVIGATION - SEARCH

CanvasMap Prototype = HTML5 Canvas + Mapping

When Microsoft released the Windows 8 Developer Preview (Sept. 2011) I was a bit annoyed that they failed to include a “native” Bing Maps control for us to build with. Instead they require you embed the Bing Maps v7 Ajax map within an IFrame to use it. There are a few issues with this that I wont get into now. So, consequentially, I decided to prototype my own map control with the intended purpose to use it with JavaScript based WinRT apps if it turned out well. Disclaimer: The code for CanvasM... [More]

2012 Bing Maps Feature Wish List

The Bing Maps Silverlight control is really sweet (although it hasn’t been updated in forever) and the Ajax v7 control was a huge improvement performance wise over v6. However, the Bing Maps platform has a long way to go before I would consider it to be the mapping development platform I would hope it could someday become. Bing Maps Wish List Here’s a list of some features that I hope make their way into the Bing Maps platform for us developers to be able to utilize: 1) Bring 3D Mapping Back!... [More]

Bing Maps v7 Ajax Hacks: InfoBox Description containing Html tags

For some odd reason the Bing Maps team decided to not allow HTML tags within the Description property of the InfoBox class they baked into the Bing Maps v7 Ajax control. I don’t know why they would limit it in such a way, but thankfully I have figured out a hack to override it and allow HTML tags as desired. Here’s a full sample page that adds a map with pushpin and infobox, and sets up overriding support to allow HTML tags within the infobox’s description:   <!DOCTYPE html> ... [More]

Bing Maps v7 Ajax Hacks: Pushpin Tooltips via Html Title Attribute

The Bing Maps v7 Ajax control is still a bit lacking in functionality, and good for us it’s written in JavaScript so it’s easy to extent and hack. The following hack is an “unsupported” method of adding Tooltips to Pushpins by making use of the HTML Title attribute. The Google Maps API already has a “setTitle” method on Markers to add a Tooltip to the pins plotted. Now, thanks to this hack, the same can be done using the Bing Maps v7 Ajax control. Here’s a full sample page that adds a map wi... [More]

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]

Geomap Project - HTML Extensions for Rendering Map Displays

One thing missing from HTML5 is the ability to render maps on a page. The Bing Maps and Google Maps JavaScript API’s are generally fairly simple to implement, but they could both be easier. I wrote up a small example API that allows you to add Maps, and plot data on those Maps, to an HTML page by using mostly HTML markup using a new <geomap/> tag. While this project uses JavaScript to perform the map rendering once the page loads, all you need to do to implement it is write some simple ma... [More]

Bing Maps Ajax 7: Add a Simple Mini Map

The Bing Maps Ajax v7 control doesn’t include support for adding a Mini Map. So, I decided to quickly work up a simple example of adding one. Below is the source code for it and a zip download of the code at the bottom of the post. Source Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv=&quo... [More]

Bing Maps Ajax 7: Add Custom Navigation Bar Buttons using jQuery

The Bing Maps Ajax v7 control does not include support for adding custom buttons to the navigation bar (where the zoom, pan and map style buttons are). There may be times when you will want to add a custom button or two, and this post contains some simple code that will help you do so. Here’s a screenshot of this in action. The ‘Click Me’ link in the navigation bar is a custom button that the below code adds. Code First, here’s the code that I came up with to add custom navigation bar butto... [More]

Bing Maps Ajax 7: Simple Pushpin Animation via Extension to Microsoft.Maps

When updating the location a pushpin using the Bing Maps Ajax Control, the pushpin instantly moves to its new location. Sometimes this may work, but other times it may be nice to animate the movement. Updating the location a vehicle in an asset tracking application is one example where it would be nice to animate the movement. I wrote a simple extension to the Bing Maps Ajax v7 control that adds the “Pushpin.moveLocation” method to perform such an animation. Usage Let’s start with some sample... [More]

Bing Maps Ajax 7: Adding InfoBox Support via Extension to Microsoft.Maps

The new Bing Maps Ajax v7 control may be faster and smaller, but it is pretty light on features at the moment compared to its older brother; the v6.3 control. One of the features missing is support for showing InfoBox’s. Its simple to handle mouse events and display a <div> next to the pushpin, but I thought I’d take a little time to write a simple InfoBox extension to the new Microsoft.Maps namespace. Here’s a screenshot of it in action: Usage Let’s start with some sample usage of th... [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]

Bing Maps JS: Calculate Area of Circle and Draw Circle on Map

Something that can be usefull at times in being able to calculate the total Area of a circle, especially when plotting it on a map. So, I decided to slightly modify my "Draw a Circle Radius Around Lat/Lng Point" to make it also calculate the Area of the circles and display that value within the TItle of the Circle Shapes Pushpin. Remember, back in Trig class, it's fairly simple to calculate the area of a circle. You just Multiply Pi by the Radius Squared. Area = Pi * (radius * radius) Anyway,... [More]

Community Coding Contest 2010 - Looking for Input and Prizes

Now that it's 2010, and over a year since the first Community Coding Contest came to an end, I'm thinking about running the contest again in 2010. Last time it ran for 3 months and we had 6 really great entries. This time around I'm thinking that it may be better to accept entries for 6 months, and have the voting run for a full month. This will give much more time for entries to be submitted, and for people to work on their entries before submitting and/or voting begins. These are just some i... [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]

MvcMaps Preview 1 – A Unified Bing/Google Maps API for ASP.NET MVC

I spent some time lately working on bringing some of the concepts of Web.Maps.VE to ASP.NET MVC. The concepts I’m referring to are Simplicity and Ease of Development in making the implementation of mapping within ASP.NET MVC applications as simple as possible along with the Flexibility and Customizability of the Base Mapping API itself. Then I thought, Since I’m building an abstraction layer to simplify Bing Maps development, why not implement it in a flexible manor as to be able to ... [More]

Easily Convert Between HTML and RGB Colors using JavaScript

To make things easier for converting between HTML Colors and RGB Colors using JavaScript I wrote the below “ColorConverter” object. This object has 2 methods that easily allow you to convert between HTML Colors (ex: #FF33C2) and RGB Colors (ex: 255, 0, 233). There isn’t anything built into JavaScript for doing this, and it can come in very handing when working with the Bing Maps VEColor object. Usage Examples: var rgb = ColorConverter.toRGB("#FF000A"); // returns {r:255, g:0, b... [More]

Simplovation Web.Maps.VE v3.0 Now With FREE Edition!

Today, I just posted the latest Web.Maps.VE v3.0 release. The coolest thing about this new version is that is has a FREE Edition for non-commercial use! Download Web.Maps.VE v3.0 FREE Edition! There are a few new things in this latest release, but the most significant are the following performance updates: Microsoft CDN (Content Delivery Network) Support Added. This helps improve the Bing Maps content delivery speed by up to 82% JavaScript Performance Optimizations. All the JavaScript cod... [More]

Microsoft Killed the Virtual Earth ASP.NET Control

Yesterday, Chris Pendleton officially announced that the Microsoft Virtual Earth ASP.NET Control is now Dead. Frankly, I’ve considered it “dead” for a long time now since it didn’t get updated much, didn’t have a completely full feature support, has a few bugs AND you couldn’t use it within your applications because it was just a Preview (CTP) anyway. There are however a few good things to point out in the light of Microsoft killing its Virtual Earth ASP.NET ... [More]