Answered by:
Create Venue Map - Uncaught TypeError: Cannot read property '0' of undefined

Question
-
Hello,
Lately I have been seeing issues with our Bing Venue Maps not being loaded. It Will fail during the
VenueMapFactory.create call, it will not return an error. The Map will load fine, however the Venue map does not load at all. Is there a way to check if the credentials are being passed properly? or if the Venue exists and try a reload of the method?
var vmaps = new window.Microsoft.Maps.VenueMaps.VenueMapFactory(map); vmaps.create({ venueMapId: 'theVenueId', success: venueMapLoaded, error: venueMapError });
If anyone can help greatly appreciated.
Chrome.
Uncaught TypeError: Cannot read property '0' of undefined veapiVenueMaps.js:3
n.convertMetadataV2ToV1 veapiVenueMaps.js:3n.MetadataRequest.callback veapiVenueMaps.js:3n.MetadataRequest._onWebRequestCompleted veapiVenueMaps.js:3(anonymous function) veapiVenueMaps.js:3(anonymous function) veapicore.js:3e veapicore.js:3(anonymous function) veapicore.js:1IE
SCRIPT5007: Unable to get property '0' of undefined or null reference
veapiVenueMaps.js, line 3 character 4562
- Edited by Dakota Lightning Monday, July 29, 2013 7:58 PM
Monday, July 29, 2013 6:50 PM
Answers
-
I haven't come across this issue before. Are you calling this code after the Venue Maps module has finished loading using the module callback?
http://rbrundritt.wordpress.com
- Proposed as answer by Ricky_Brundritt Tuesday, July 30, 2013 10:07 AM
- Unproposed as answer by Ricky_Brundritt Thursday, August 1, 2013 1:07 PM
- Marked as answer by Ricky_Brundritt Friday, August 9, 2013 9:22 AM
Tuesday, July 30, 2013 10:06 AM -
I like your implementation of Venue Maps. Unfortunately it isn't possible to have a local copy of the JSON/script file for Bing Maps. One possible option would be to take a digital version of your floor plans and turn them into a tile layer and overlay them on the map as a backup. This is how most Bing Maps customers have shown their venue layouts before Bing Maps had Venue Maps. This can be done using a tool called MapCruncher: http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/
Alternatively you could look at using a scaling image: http://rbrundritt.wordpress.com/2013/05/22/image-overlays-with-bing-maps-javascript/
http://rbrundritt.wordpress.com
- Proposed as answer by Ricky_Brundritt Thursday, August 1, 2013 1:07 PM
- Marked as answer by Ricky_Brundritt Friday, August 9, 2013 9:22 AM
Thursday, August 1, 2013 1:07 PM
All replies
-
I haven't come across this issue before. Are you calling this code after the Venue Maps module has finished loading using the module callback?
http://rbrundritt.wordpress.com
- Proposed as answer by Ricky_Brundritt Tuesday, July 30, 2013 10:07 AM
- Unproposed as answer by Ricky_Brundritt Thursday, August 1, 2013 1:07 PM
- Marked as answer by Ricky_Brundritt Friday, August 9, 2013 9:22 AM
Tuesday, July 30, 2013 10:06 AM -
It appears to be only our venue map not loading, we have confirmation they are working out the issue.
http://www.bing.com/maps/?vm=triplefive-wem
Is it possible to have our local JSON or script run with the map, instead of an external source? We rely on the venue map for our customers and when the map doesn't work we are unable to help customers find stores. Having a local resource of sorts would allow us to have a fall-back if this were to ever happen again.
Wednesday, July 31, 2013 3:46 PM -
I like your implementation of Venue Maps. Unfortunately it isn't possible to have a local copy of the JSON/script file for Bing Maps. One possible option would be to take a digital version of your floor plans and turn them into a tile layer and overlay them on the map as a backup. This is how most Bing Maps customers have shown their venue layouts before Bing Maps had Venue Maps. This can be done using a tool called MapCruncher: http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/
Alternatively you could look at using a scaling image: http://rbrundritt.wordpress.com/2013/05/22/image-overlays-with-bing-maps-javascript/
http://rbrundritt.wordpress.com
- Proposed as answer by Ricky_Brundritt Thursday, August 1, 2013 1:07 PM
- Marked as answer by Ricky_Brundritt Friday, August 9, 2013 9:22 AM
Thursday, August 1, 2013 1:07 PM