Freigeben über


Bing Maps V8 July 2016 Update

It’s been just over a month ago since Bing Maps Version 8 (V8) was released, and today we are happy to announce the first of our regular updates to the main release branch of V8. For those not familiar with V8, it now has a new branching system which allows developers to access new features at their own pace. You can find out more about this new branching system here. This update takes all the new features and bug fixes that were added to the experimental branch in July and adds them to the main release branch. Below is a list of some of the key updates:

Spatial Math Geometry

The Spatial Math module has had a massive addition consisting of 24 spatial geometry calculations, bringing the total number of calculations available in the spatial math module to 47. Some of these calculations include: binary operations of shapes (intersection, difference, union), convex and concave hulls, Voronoi diagrams, shape validation and much more. Try it now.

VoronoiDiagram

Draggable Pushpins

Easily move drag pushpins around on the map by setting the draggable pushpin option to true. Try it now.

Custom Overlays

Custom overlays allow you to create your own custom rendering layers with the map control. Why might you want to do this you ask? Several years ago one of our Microsoft Bing Maps MVPs created an open source heat map layer for Bing Maps Version7 (V7). In order to get this to work correctly, he needed to insert an HTML5 canvas into the DOM structure of the map control. There was no supported way to do this and as such a hacky solution was implemented. This solution ended up breaking 3 times over the lifetime of Bing Maps V7. With this feature we have added a supported way to create custom rendering layers so that developers can easily create and experiment with new custom data visualizations.

TypeScript Definitions

Last week we released TypeScript definitions available for Bing Maps V8 on GitHub. You can find the announcement here. These definitions have been updated to include all the new features that are in this release.

Clickable Pushpin Area

Often, when using custom pushpins, the clickable area of the pushpin is rectangular, as the image used to create custom pushpins has a rectangular shape. This can often cause issues when using mouse events because often the actual drawn image may not be a rectangle itself and as such has some whitespace around it which will block the mouse events from getting to the pushpins below it. With this in mind, V8 now lets you specify that a rounded click area should be used instead. Early testing has found that this drastically reduces false clicks on pushpins and thus creates a much better user experience. Here is an example of the difference that this makes:

ClickArea

GeoJSON and Query API Shape Styling

Until now, styling of data that came from the GeoJSON module or Query API in Bing Maps V8 was limited to specifying a single default style that is used by all shapes. If you wanted to style individual shapes, you had to loop through the results and apply the logic to style each shape individually. Now, with this update, any Pushpin, Polyline or Polygon option can be specified for individual shapes through the shapes GeoJSON properties or as a data source column in the Bing Spatial Data Services.

Mercator Map Type

Bing Maps provides road and aerial maps which are great in most cases, but sometimes you may want to hide these all together. Perhaps you have your own custom tile layer that you want to display instead, or perhaps you simply want to view your data on its own without a map background. You can easily do this now by setting the map type id of the map to mercator.

Bug Fixes

Since the initial release of V8 many developers have been proactive in reporting bugs and testing the fixes in the experimental branch. With this release there are over 60 bug fixes.

A complete list of new features added in this release can be found on the What’s New page in the documentation. We have many other features and functionalities on the road map for Bing Maps V8. If you have any questions or feedback about V8, please let us know on the Bing Maps forums or visit the Bing Maps website to learn more about our V8 web control features.

Comments

  • Anonymous
    August 15, 2016
    trying to map a route from Belleville Ontario to Quebec City Quebec map shows no routes to get there no roads available???? maps show Montreal. what gives?????
    • Anonymous
      August 16, 2016
      Ah... this works in the Bing Maps V8 SDK which this blog post is about. I also tested it on the Bing Maps website and it works there too. Doing some digging it looks like you might be using the old Bing Maps site which was replaced nearly two years ago. You likely opted out of the new site at some point and that's why you are seeing the old site. There should be a button above the map to "try the new Bing Maps".