TO DO: Seperate JS file for Bing Map Ver 7.

Coordinator
May 20, 2012 at 4:49 AM
Edited May 20, 2012 at 4:59 AM

The task is to use the bing map API 7 from a seperate java script file. These map api functions inside the cshtml file is working fine in the samples. Below is required. There are two seperate file, CSHTML and JS. It is required that the java script functions should called from cshtml file. please submit your suggestions how to do it for Bing ver 7 .

***Map.CSHTML****

$(document).ready(

function () {
BloodDonors.GetMap();
}

************************* 

 

***Map.js *****

function BloodDonors() { }

 BloodDonors.GetMap =function () {

// Initialize the map

 BloodDonors._map = new Microsoft.Maps.Map(BloodDonors.getElementById("mapDiv"), { credentials: "Your Bing Maps Key"

, mapTypeId: Microsoft.Maps.MapTypeId.road });

};