Two New Data Modules for Bing Maps V7

 

By Ricky Brundritt, EMEA Bing Maps Technology Solution Professional

In September of 2011 we started the Bing Maps v7 Module CodePlex Project. The purpose of this project is to create a centralized location where developers could find and share useful modules that expand the functionality of the Bing Maps V7 API. Since the start of the project, we’ve had 15 modules submitted.

Today, I would like to highlight the two newest modules added to the project and provide a few updates to existing modules.

GeoJSON Module

Download here

This module was created by Brian Norman a Microsoft Bing Maps MVP from Earthware Ltd.

This module allows you to import GeoJSON files into Bing Maps. A GeoJSON feed will be downloaded and parsed into an EntityCollection which can then be added to the map. Additional properties are captured and stored in a Metadata tag on each shape making it easy to relate shapes to their metadata.

GeoJSON is a data format standard used for representing geospatial objects in JSON (JavaScript Object notation). JSON is much more compact than XML which makes it a great format for sharing spatial data online. In fact the AJAX Map DataConnector uses GeoJSON to send spatial data from SQL Server to Bing Maps.

Well Known Text Reader/Writer Module

Download here

I created this module because I wanted a simple tool for quickly visualizing Well Known Text on Bing Maps. This module allows you to easily read and write Well Know Text data from Bing Maps. When reading Well Known Text data it is parsed into Bing Maps shapes; MultiPoint, MultiLinstring, MultiPolygon and GeometryCollection are turned into an EntityCollection of shapes. To write Well Known Text simply pass in a Bing Maps shape and the Well Known Text equivalent will be returned.

clip_image004

Well Known Text (WKT) is an OGC (Open Geospatial Consortium) standard for representing Geospatial Data. In fact WKT is supported by the spatial types in Microsoft SQL Server 2008 and above as well as SQL Azure.

*Project Idea: Combine this module with the Shape Toolbox Module and make it easy for your users to draw on the map and upload the shape data into Microsoft SQL Server.

*Demo Tip: Use this module to quickly create demos that render complex spatial data. Simply store your Well Known Text in a JavaScript file as a string to save time setting up a web service to connect to your database. Note: this approach is not recommended for production applications as loading all the spatial data via a JavaScript file can make for slow loading of your application.

Other Data Related Modules

GeoRSS Module – GeoRSS is a common XML file format for sharing spatial data as a syndication feed. This module also supports GML, an OGC compliant XML format. This module has been updated to support Complex Polygons (polygons with holes).

GPX Module – GPX is a common XML data format that is used by GPS devices. Many GPS devices allow you to stave points, routes and tracks which can then be exported from the device in GPX format. This module makes it easy to view these files on Bing Maps.

Google’s 1st Result, Links Can Hurt, Bing Maps & Shopping

I did the month webmaster review of Google. Google’s Peter Norvig explained how not necessarily the most relevant.

http://www.youtube.com/v/hla9Y7x4Odw?f=videos&app=youtube_gdata

The Bing Maps WPF Control

Since rejoining the Bing Maps team, I’ve been heads down focusing on the developer experience for Bing Maps. As a result, we’re releasing the Bing Maps WPF Control Beta on the Microsoft Download Center. What is WPF? The Windows Presentation Foundation (WPF) provides developers with a unified programming model for building rich Windows smart client user experiences that incorporate UI, media, and documents.

The WPF Control has everything you’d expect from a Bing Maps control including the ability to present information via a WPF native control such as:

· Map Styles: Road, Aerial and Hybrid

· The ability to place shapes on the map via lat/lon – pins, polylines and polygons

· Navigating the map with pan and zoom keyboard controls

 

We’ve also opened up a lot of the abilities within the control to empower the developer to take control of the user experience. So, you’ll notice there is no default navigation, no default pushpins and none roll overs – this is truly a blank (er, map-based) canvas – we want to see you do some killer things with.

Perhaps the most notable facet to this WPF control is support for Microsoft Surface. That’s right. The Bing Maps WPF Control Beta is touch-enabled with support for Surface v 2’s Pixel Sense technology. So, for those of you using WPF in your Surface applications you’ll have native support for touch features.

We worked closely with the Surface team and have had a constant need to support our WPF developer community with mapping. In the past, we’ve pushed to have WPF developers use the Bing Maps Silverlight Control (or our Bing Maps AJAX Control v7) in a web control, but it’s just not the same as having managed code libraries to work with.

The WPF control supports full rotation and inertia with options to turn both off. Plus, infinite scroll maps, touch to lat/lon to pixel conversions (think touch to add a pushpin) and the ability to plug into the Bing Maps REST API for geocoding and routing or the Bing API for search.

We hope you enjoy the control. It’s a beta, so we’re looking for some feedback on what you think, what works and what doesn’t. All questions/comments/feedback can be directed to the MSDN Forums. We hope to see some awesome applications built in WPF and Surface applications with our Bing Maps control.