bing-mapsbing-apipushpin

How can i rotate custom puspin dynamically using bingmaps v7


Anyone please help me I am using bing map api v7 module I added initially some pushpins (like cars/aeroplanes these all are svg code) when I am updating my pushpin(car) some times I want to rotate my pushpin. If any one knows please give a solution.


Solution

  • I would use the Bing Maps V8 control instead of V7 (V7 is nearing end of life). The documentation for V8 actually has an example of rotating a pin here: https://msdn.microsoft.com/en-us/library/mt712689.aspx

    It uses the HTML5 canvas. Note that you can easily draw SVG's on to HTML5 canvases. Here is a post with an example: Drawing an SVG file on a HTML5 canvas