Bing map เพื่อรับโรงพยาบาล

ฉันกำลังพยายามดึงข้อมูลโรงพยาบาลทั้งหมดสำหรับเมืองเฉพาะในอินเดียโดยใช้แอปพลิเคชัน BING Map API สำหรับ Windows 8 Metro อย่างไรก็ตาม ฉันไม่สามารถดึงรายละเอียดได้ ต่อไปนี้เป็นสองวิธีที่ได้ลอง

  1. การใช้คลาส NearVenueCollection

        NearbyVenueOptions options = new NearbyVenueOptions(loc, 10000);
    
        NearbyVenueCollection nearbyVenues = null;
        try
        {
            nearbyVenues = await MyMap.VenueManager.GetNearbyVenuesAsync(options); ;
        }
        catch (Exception)
        {
        }
        if (nearbyVenues != null && nearbyVenues.Count > 0)
        {
            foreach (var nearbyVenue in nearbyVenues)
            {
                if (nearbyVenue.Metadata.VenueType == VenueType.Hospital.ToString())
                {
                    string name = nearbyVenue.Metadata.Name;
                }
            }
        }
    

นี่ไม่ได้ให้รายละเอียดที่จำเป็น

  1. การใช้บริการข้อมูลเชิงพื้นที่ของ Bing

ต่อไปนี้เป็นข้อมูลโค้ด

////Create the Bing Spatial Data Services request to get nearby POI
string findNearbyPOIRequest = "http://spatial.virtualearth.net/REST/v1/data/            f22876ec257b474b82fe2ffcb8393150/ NavteqNA/NavteqPOIs? spatialfilter=nearby("
+ loc.Latitude + "," + loc.Longitude + "," + 1000 + ")"
+ "&$filter=EntityTypeID%20EQ%20'" + "8060" + "'&               $select=EntityID,DisplayName,__Distance,Latitude,Longitude,AddressLine,         Locality,AdminDistrict,PostalCode,Phone&$top=20"
+ "&key=" + BingCredentials;


Uri uri = new Uri(findNearbyPOIRequest);
WebRequest request = WebRequest.Create(uri);

// GetResponseAsync() returns immediately after the header is ready 
WebResponse response = await request.GetResponseAsync();
Stream inputStream = response.GetResponseStream();

XDocument doc = XDocument.Load(inputStream);
XNamespace m ="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";
MapLayer pushpinLayer = new MapLayer();
pushpinLayer.Name = "Push Pin Layer";

var elements = from nodes in doc.Descendants(m + "properties")
               select new
               {
                   Name = nodes.Element(d + "DisplayName").Value,
                   Latitude = nodes.Element(d + "Latitude").Value,
                   Longitude = nodes.Element(d + "Longitude").Value,
                   Address = nodes.Element(d + "AddressLine").Value,
               };

อย่างไรก็ตาม ฉันไม่ได้รับรายละเอียดที่จำเป็นสำหรับเมืองต่างๆ ในอินเดีย ใครสามารถช่วยฉันทราบว่าต้องทำอะไรเพื่อให้ได้รายละเอียดที่ถูกต้อง


person Rajan Phatak    schedule 26.07.2013    source แหล่งที่มา
comment
msdn.microsoft.com/en-us/library/bb259692.aspx   -  person zod    schedule 26.07.2013
comment
ลิงค์ที่ให้มาคือการควบคุม AJAX สามารถใช้ภายในแอปพลิเคชัน Windows 8 metro ได้หรือไม่   -  person Rajan Phatak    schedule 27.07.2013


คำตอบ (1)


แผนที่สถานที่เป็นเพียงสถานที่ที่ Bing Maps มีแผนชั้นในอาคารเท่านั้น ฉันไม่ทราบว่ามีโรงพยาบาลใดในอินเดียที่ให้บริการในรูปแบบ Venue Maps ข้อมูลจุดสนใจในบริการ Bing Spatial Data มีเฉพาะในอเมริกาเหนือและยุโรปเท่านั้น ตัวเลือกที่ดีที่สุดของคุณในการค้นหาสถานที่ในอินเดียคือการใช้บริการค้นหา SOAP ของ Bing Maps

http://msdn.microsoft.com/en-us/library/cc980849.aspx

http://msdn.microsoft.com/en-us/library/dd221354.aspx

person rbrundritt    schedule 31.07.2013
comment
สามารถใช้บริการ BING map SOAP ภายในแอพ Windows 8 Store ได้หรือไม่ - person Rajan Phatak; 31.07.2013
comment
ใช่. เพิ่มเป็นข้อมูลอ้างอิงบริการ - person rbrundritt; 02.08.2013
comment
ขอบคุณ @rbrundritt ฉันจะพยายามแจ้งให้คุณทราบอย่างแน่นอน - person Rajan Phatak; 03.08.2013
comment
มันไม่ทำงาน ฉันไม่แน่ใจว่าเป็นเพราะที่ตั้งของฉันในอินเดียหรือไม่ ฉันลองใช้สถานที่ที่ระบุในลิงก์แล้ว และใช้งานได้กับสถานที่เหล่านั้น - person Rajan Phatak; 05.08.2013