2014-05-09 29 views
8

के रूप में खुले सड़क मानचित्र का उपयोग करते समय त्रुटि देता है मैं आर के लिए नया हूं और मैं ggmap सीखने के लिए इस article का पालन कर रहा हूं।ggmap: स्रोत

qmap("Forbidden city",zoom=15) 
qmap("Forbidden city",zoom=15, source="osm") 

जबकि पहले आदेश ऊपर पूरी तरह से काम करता है, दूसरा एक मुझे एक त्रुटि की जानकारी देता है:

Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=Forbidden+city& zoom=15&size=%20640x640&maptype=terrain&sensor=false Google Maps API Terms of Service : http://developers.google.com/maps/terms Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Forbidden+city&sensor=false Google Maps API Terms of Service : http://developers.google.com/maps/terms Error: map grabbing failed - see details in ?get_openstreetmap. In addition: Warning message: In download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") : cannot open: HTTP status was '503 Service Unavailable'

किसी भी मदद की सराहना की है।

+0

मेरे लिए काम करता है। शायद एपीआई नीचे था ... – EDi

उत्तर

1

मुझे वही त्रुटि मिलती है, पुनरुत्पादन।

मुझे लगता है कि यह zoom=... विनिर्देश के साथ करना है। source के आधार पर यह तर्क अलग-अलग इंटरपेस्ट किया गया है। जब आप source="osm" निर्दिष्ट करते हैं तो कॉल get_openstreetmap(...) पर जाता है। कि समारोह के लिए प्रलेखन के अनुसार:

...if you get an error when downloading an openstreetmap the error is attributable to an improper scale specification...

zoom पैरामीटर पैमाने विनिर्देश प्रभावित करती है, तो scale="auto" (डिफ़ॉल्ट)। तो मूल रूप से, यदि zoom बहुत बड़ा है तो कॉल एक त्रुटि फेंक देगा। मुझे ज़ूम> 13 फॉरबिडन सिटी के लिए त्रुटियां मिलती हैं, लेकिन यह काम करती है:

qmap("Forbidden city",zoom=13, source="osm")