Windows 8 Apps (HTML/JS) Bing Maps push pin images not loading

This has been fixed in the RP release of Bing Maps for JavaScript

——————–

I was messing around with the Bing maps SDK (Beta) for Windows 8 HTML/JS applications and found a quirk in the pushpin options.  I was converting one of my existing dashboards from HTML/JS web application to Windows 8.

I copied the code from one of my custom loader functions, here is what the pushpin data looks like,

var pin = new Microsoft.Maps.Pushpin({ latitude: pos.latitude, longitude: pos.longitude }, {
      icon: '/images/pio_custom.png',
      anchor: new Microsoft.Maps.Point(8, 8)
});

When I loaded my Windows 8 app I was surprised to see the white box with red X in it.  After some troubleshooting, it appears that the Bing maps SDK does not like icons with underscores in them.  Renamed the file and this works:

var pin = new Microsoft.Maps.Pushpin({ latitude: pos.latitude, longitude: pos.longitude }, {
      icon: '/images/piocustom.png',
      anchor: new Microsoft.Maps.Point(8, 8)
});
Advertisements
This entry was posted in Bing Maps, WinRT and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s