سوالات متداول پلتفرم نقشه های گوگل

شروع شدن

درک شرایط خدمات

محدودیت استفاده و صورتحساب

استفاده از پلتفرم نقشه های گوگل

خطاها و عیب یابی

خدمات پلتفرم نقشه های گوگل

Maps JavaScript API

Google Maps SDK برای iOS

Google Maps SDK برای اندروید

امضای URL

شروع شدن

پلتفرم نقشه های گوگل چیست؟

پلتفرم نقشه های گوگل مجموعه ای از API ها و SDK ها است که به توسعه دهندگان اجازه می دهد نقشه های گوگل را در برنامه های موبایل و صفحات وب جاسازی کنند یا داده ها را از نقشه های گوگل بازیابی کنند. چندین پیشنهاد وجود دارد. بسته به نیازتان، ممکن است متوجه شوید که از یک یا ترکیبی از این API ها و SDK ها استفاده می کنید:

نقشه ها:

مسیرها:

مکان ها:

چگونه می توانم با Google Maps Platform شروع کنم؟

به شروع با پلتفرم نقشه های Google مراجعه کنید.

به کدام API نیاز دارم؟

برای کمک به یافتن API مناسب بر اساس نیازهای عملکردی خود، نگاهی به انتخابگر API بیندازید.

چگونه می توانم از API ها در سایت خود استفاده کنم؟

راهنمای نمای کلی، توسعه‌دهنده و شروع به کار را برای API یا SDK خاصی که به آن علاقه دارید، ببینید. برای مثال، راهنمای Maps SDK برای Android یا Maps JavaScript API را بررسی کنید.

پلتفرم نقشه گوگل کدام کشورها را پوشش می دهد؟

تیم Google Maps دائماً داده‌های نقشه جدید را بیرون می‌آورد و پوشش بین‌المللی ما را افزایش می‌دهد. برای آخرین اطلاعات پوشش، با داده های پوشش Google Maps مشورت کنید. می توانید داده ها را با کادر فیلتر در بالای صفحه فیلتر کنید. لطفاً توجه داشته باشید که در صورت تغییر قراردادهای مجوز با ارائه‌دهندگان داده، داده‌های پوشش می‌توانند تغییر کنند.

همچنین مشاهده کنید:

آیا می توانم بدون استفاده از محصولات پلتفرم نقشه های گوگل، نقشه های گوگل را در سایت خود قرار دهم؟

آره. Google Maps اکنون امکان جاسازی نقشه ای را که در حال مشاهده آن هستید در وب سایت یا وبلاگ خود، بدون هیچ گونه برنامه نویسی یا استفاده از پلتفرم نقشه های Google ارائه می دهد. اطلاعات بیشتر در اینجا موجود است.

چگونه برنامه های Maps را در دستگاه های تلفن همراه ارائه کنم؟

برای گنجاندن نقشه ها در یک برنامه Android، از Maps SDK برای Android استفاده کنید.

برای گنجاندن نقشه ها در یک برنامه اصلی iOS، از Maps SDK برای iOS استفاده کنید.

Maps JavaScript API برای پاسخگویی به دستگاه‌های تلفن همراه توسعه یافته است و برای برنامه‌های مرورگر که هم روی دسکتاپ و هم دستگاه‌هایی که شامل یک مرورگر وب با پیاده‌سازی کامل جاوا اسکریپت هستند، مناسب است، مانند Apple iPhone.

برای برنامه‌هایی که دستگاه‌هایی را هدف قرار می‌دهند که برای استفاده از Maps JavaScript API مناسب نیستند، Maps Static API تصاویر نقشه را در قالب‌های GIF، JPG، و PNG، از جمله نشانگرها و چند خطوط ارائه می‌کند. توجه داشته باشید که استفاده از Maps Static API خارج از برنامه‌های مبتنی بر مرورگر مستلزم پیوند تصویر نقشه به Google Maps است.

Maps JavaScript API و Maps Embed API از کدام مرورگرهای وب پشتیبانی می کند؟

Maps JavaScript API و Maps Embed API از مرورگرهای وب زیر پشتیبانی می‌کنند:

دسکتاپ
  • نسخه فعلی Microsoft Edge (ویندوز)، به استثنای حالت اینترنت اکسپلورر.
  • دو آخرین نسخه اصلی پایدار فایرفاکس (ویندوز، macOS، لینوکس).
  • دو آخرین نسخه اصلی پایدار کروم (ویندوز، macOS، لینوکس).
  • دو آخرین نسخه اصلی پایدار سافاری (macOS).
اندروید
  • نسخه فعلی Chrome در Android نسخه 4.1 و بالاتر.
  • Chrome WebView در Android 4.4 و بالاتر.
iOS
  • سافاری موبایل در نسخه های اصلی فعلی و قبلی iOS.
  • UIWebView و WKWebView در نسخه های اصلی فعلی و قبلی iOS.
  • نسخه فعلی کروم برای iOS.
آیا می توانم نقشه ها را از Maps JavaScript API چاپ کنم؟

چاپ از Maps JavaScript API پشتیبانی نمی شود. این به این دلیل است که پشتیبانی از چاپ در مرورگرهای رایج ناسازگار است.

وقتی تغییراتی در محصولات پلتفرم Google Maps ایجاد می شود، چگونه می توانم مطلع شوم؟

برای به روز رسانی اخبار در مورد پیشنهادات مختلف توسعه دهندگان Google Geo، باید در وبلاگ پلتفرم نقشه های Google مشترک شوید.

چگونه با پشتیبانی فنی تماس بگیرم؟

برای اطلاعات در مورد گزینه های پشتیبانی موجود، به پشتیبانی و منابع پلتفرم نقشه های Google مراجعه کنید.

چه زمانی پشتیبانی فنی در دسترس است؟
تیم پشتیبانی 24×5 (روزهای هفته از دوشنبه 9 صبح به وقت توکیو تا جمعه 5 بعد از ظهر به وقت اقیانوس آرام) به استثنای تعطیلات منطقه ای برای مسائل "خدمات غیرقابل استفاده" در دسترس است.
چگونه می توانم دسترسی به حساب Google خود را بازیابی کنم؟

اگر دسترسی به حساب Google خود را از دست دادید (به عنوان مثال joe@mycompany.com یا joe@gmail.com)، می توانید با بازیابی یا تنظیم مجدد رمز عبور، دسترسی به حساب را بازیابی کنید. به مقاله نحوه بازیابی حساب Google یا Gmail خود در راهنمای حساب Google مراجعه کنید.

چگونه می توانم دسترسی به یک پروژه خاص را بازیابی کنم؟

اگر دسترسی به پروژه ای را که در آن پیاده سازی پلتفرم Google Maps خود را مدیریت می کنید از دست دادید، می توانید سعی کنید آن را بازیابی کنید.

اگر به حساب Google مرتبط با پروژه خود دسترسی دارید:

اگر به حساب Google مرتبط با پروژه خود دسترسی ندارید :

آیا می توانم از Maps and Places SDK برای iOS در Mac های مبتنی بر Arm استفاده کنم؟

توسعه بر روی Mac های جدید مبتنی بر Arm امکان پذیر است، با این حال، نیاز به ساخت و اجرا بر روی یک دستگاه فیزیکی iOS دارد. این یک محدودیت موقتی است در حالی که ما به دنبال اضافه کردن پشتیبانی بیشتر برای توسعه در شبیه سازها هستیم.

درک شرایط خدمات

شرایط خدمات برای محصولات پلتفرم Google Maps چیست؟

شرایط خدمات پلتفرم Google Maps در آدرس زیر موجود است:

https://cloud.google.com/maps-platform/terms

آیا سایت من شرایط خدمات پلتفرم Google Maps را رعایت می کند؟

تا زمانی که سایت شما با شرایط خدمات پلتفرم Google Maps مطابقت داشته باشد، می‌توانید از پلتفرم Google Maps در برنامه‌های خود استفاده کنید.

با این حال، برخی از کاربردهای پلتفرم نقشه های گوگل وجود دارد که ما نمی خواهیم آنها را ببینیم: نقشه هایی که مکان های خرید مواد مخدر غیرقانونی در یک شهر را مشخص می کنند، به عنوان مثال، یا هر فعالیت غیرقانونی دیگری. ما همچنین به حریم خصوصی افراد احترام می گذاریم، بنابراین پلتفرم Google Maps نباید برای شناسایی اطلاعات خصوصی افراد استفاده شود.

قبل از توسعه و راه‌اندازی، باید از مشاوره خود برای تعیین اینکه آیا برنامه شما با شرایط خدمات پلتفرم Google Maps مطابقت دارد یا خیر استفاده کنید. مهندسان Google فقط می توانند کمک فنی ارائه دهند و صلاحیت ارائه مشاوره حقوقی را ندارند. Google این حق را برای خود محفوظ می دارد که در هر زمانی استفاده شما از این سرویس را تعلیق یا خاتمه دهد، بنابراین لطفاً شرایط Maps APIs را به دقت بخوانید.

آیا می توانم مستقیماً به کاشی های نقشه و تصاویر ماهواره ای دسترسی داشته باشم؟

شما نمی توانید از طریق مکانیسمی غیر از پلتفرم نقشه های گوگل (مانند ایجاد API نقشه برداری خود یا استفاده از اسکریپت دانلود انبوه کاشی) به کاشی های نقشه یا تصاویر ماهواره ای دسترسی پیدا کنید. اگر برنامه شما خارج از پلتفرم Google Maps به آنها دسترسی داشته باشد، دسترسی به کاشی‌ها مسدود می‌شود. برای جزئیات بیشتر به شرایط خدمات پلتفرم Google Maps مراجعه کنید.

آیا می توانم از محصولات پلتفرم نقشه های گوگل برای ردیابی برنامه ها استفاده کنم؟

هیچ محدودیتی برای نمایش داده‌های بی‌درنگ (ردیابی) با محصولات پلتفرم Google Maps وجود ندارد، مشروط بر اینکه برنامه با شرایط خدمات پلتفرم Google Maps مطابقت داشته باشد.

آیا می توانم از Google Maps در برنامه غیر وب خود استفاده کنم؟

بله، محصولات Google Maps Platform اکنون می توانند در برنامه های غیر وب استفاده شوند، مشروط بر اینکه از سایر محدودیت های شرایط خدمات پلت فرم Google Maps پیروی کنند.

Maps JavaScript API تنها زمانی پشتیبانی می شود که در یکی از مرورگرهای پشتیبانی شده اجرا شود.

آیا می توانم از محصولات پلتفرم نقشه های گوگل در سایتی استفاده کنم که دارای رمز عبور است؟

بله، خدمات Google Maps، Routes، Places را می توان با برنامه های کاربردی دسترسی خصوصی استفاده کرد. برای جزئیات بیشتر به شرایط خدمات پلتفرم Google Maps مراجعه کنید.

آیا می توانم برنامه ای ایجاد کنم که شامل داده های پلتفرم نقشه های گوگل در یک سند باشد؟

اگر برنامه شما سندی را به صورت الکترونیکی یا چاپی تولید می‌کند، هیچ داده‌ای از پلتفرم نقشه‌های Google، از جمله تصاویر، در سند گنجانده نمی‌شود. لطفاً برای جزئیات بیشتر به بخش شرایط خدمات پلتفرم Google Maps "بدون خراش دادن" مراجعه کنید.

چگونه می توانم از قرار دادن محتوای خود در نتایج جستجوی گوگل انصراف دهم؟

ما دیگر این داده ها را جمع آوری نمی کنیم. استفاده از پارامتر indexing منسوخ شده است و هیچ تاثیری ندارد. دیگر نیازی به انصراف صریح ندارید، اما ما شما را تشویق می‌کنیم که این پارامتر را در اولین فرصت خود حذف کنید.

برای حذف صفحه یا سایت خود از نتایج جستجو، دستورالعمل های ارائه شده در مرکز راهنمای وب مستر ما را دنبال کنید.

آیا می توانم با استفاده از Maps Static API که از وب سایت خود ذخیره و ارائه می کنم یک تصویر نقشه ایجاد کنم؟

شما نمی توانید کپی هایی از تصاویر تولید شده با استفاده از Maps Static API را از وب سایت خود ذخیره و ارائه دهید. همه صفحات وب که به تصاویر ثابت نیاز دارند باید ویژگی src یک تگ img HTML یا ویژگی background-image CSS یک تگ div HTML را مستقیماً به Maps Static API پیوند دهند تا همه تصاویر نقشه در محتوای HTML صفحه وب نمایش داده شوند. و مستقیماً توسط Google به کاربران نهایی ارائه می شود.

محدودیت استفاده و صورتحساب

چگونه صورتحساب پروژه خود را تنظیم کنم؟
به شروع با پلتفرم نقشه های Google مراجعه کنید.
چگونه مشتریان لایه رایگان Google Cloud Platform به یک حساب پولی ارتقا می دهند؟
برنامه Google Cloud Platform Free Tier یک دوره آزمایشی بدون هزینه با اعتبار 300 دلاری برای استفاده با هر سرویس Google Cloud Platform (GCP) از جمله APIهای پلتفرم Google Maps (GMP) به مشتریان ارائه می دهد. پس از پایان دوره آزمایشی بدون هزینه، برای ادامه استفاده از این خدمات، باید به یک حساب پولی ارتقا دهید . برای ارتقاء به یک حساب پولی، از Cloud Console دیدن کنید.
آیا پلتفرم نقشه های گوگل محدودیت استفاده دارد؟

هیچ محدودیت روزانه حداکثری برای تعداد درخواست‌هایی که می‌توانید به محصولات پلتفرم Google Maps بدهید وجود ندارد و تنها محدودیت‌های استفاده مربوط به حداکثر تعداد درخواست‌ها در ثانیه (QPS) یا درخواست‌ها در دقیقه (QPM) است.

برای Distance Matrix، محدودیت بر حسب رویداد در ثانیه (EPS) تنظیم می‌شود که به‌عنوان مجموع پرس‌و‌جوهای سمت کلاینت و سمت سرور محاسبه می‌شود.

برای Routes: Compute Route Matrix، محدودیت بر حسب عناصر در دقیقه (EPM) است، که در آن تعداد عناصر در یک درخواست برابر است: (تعداد مبدا × تعداد مقصد).

جدول زیر محدودیت استفاده برای هر API را نشان می دهد.

API محدودیت استفاده
اعتبار سنجی آدرس 6000 QPM
جهت ها 50 QPS
ماتریس فاصله 1000 EPS
نقشه های پویا 500 QPS
ارتفاع 100 QPS
ژئوکدینگ 50 QPS
موقعیت جغرافیایی 100 QPS
مکان ها 100 QPS
جاده ها 500 QPS
مسیرها: محاسبه مسیرها 3000 QPM
مسیرها: محاسبه مسیر ماتریس 3000 EPM
نقشه های ایستا 500 QPS
API تصویر نمای خیابان 500 QPS
منطقه زمانی 500 QPS

به منظور کنترل هزینه‌ها، می‌توانید استفاده از API خود را کنترل کنید و محدودیت‌های روزانه برای همه درخواست‌ها برای هر API قابل پرداختی تعیین کنید .

محصولات Google Maps Platform باید مطابق با شرایط خدمات استاندارد Google Maps Platform مستقر شوند.

هزینه استفاده چگونه محاسبه می شود؟

برای مروری بر قیمت محصولات پلتفرم Google Maps، لطفاً به برگه قیمت‌گذاری مراجعه کنید.

برای کسب اطلاعات بیشتر در مورد نحوه صورت‌حساب APIهای پلتفرم Google Maps، لطفاً به درک صورت‌حساب Maps، Routes و Places مراجعه کنید.

بارهای نقشه در پلتفرم Google Maps چگونه محاسبه می‌شوند؟

زمانی که هر یک از موارد زیر رخ می دهد، یک بار نقشه واحد شارژ می شود:

  • یک صفحه وب یا برنامه یک نقشه را با استفاده از Maps JavaScript API نمایش می دهد.
  • یک برنامه یک تصویر نقشه واحد را از Maps Static API درخواست می کند.

هزینه پانورامای نمای خیابان به طور جداگانه از بارهای نقشه دریافت می شود:

  • یک پانورامای استاتیک نمای خیابان برای هر درخواست به API استاتیک نمای خیابان برای جاسازی یک پانورامای نمای خیابان ثابت (غیر تعاملی) هزینه می‌شود.
  • برای هر نمونه از یک شی پانوراما در Maps JavaScript API، Maps SDK برای Android یا Maps SDK برای iOS، هزینه پانورامای نمای خیابان پویا دریافت می‌شود.

پس از اینکه یک صفحه وب یا برنامه یک نقشه، یا یک تصویر نقشه ایستا، یا یک پانورامای نمای خیابان را بارگیری کرد، هرگونه تعامل کاربر با آن، مانند جابجایی، بزرگنمایی، یا تغییر لایه های نقشه، بارهای نقشه اضافی ایجاد نمی کند یا بر محدودیت های استفاده تأثیر نمی گذارد.

افزودن نشانگر بارهای نقشه اضافی ایجاد نمی کند، اما ممکن است هزینه هایی را در مورد نحوه تعیین مکان پین ایجاد کند (مانند بارگیری یا بارگیری مجدد کلاس `google.maps.Map()`.)

چگونه بر استفاده خود نظارت کنم؟

می‌توانید استفاده از APIهای جداگانه را در Google Cloud Console نظارت کنید.

  1. پروژه ای را که حاوی API مورد نظر برای بررسی است انتخاب کنید.
  2. از لیست APIها در داشبورد، روی نام API کلیک کنید.
  3. در نزدیکی بالای صفحه، روی معیارها یا سهمیه‌ها کلیک کنید.

برای مشاهده گزارش ترافیک و اطلاعات صورتحساب کل پروژه، این مراحل را دنبال کنید:

  1. اگر قبلاً این کار را نکرده‌اید، صورت‌حساب را تنظیم کنید .
  2. به صفحه صورتحساب کنسول Cloud بروید.
  3. یک پروژه را انتخاب کنید.
  4. در نوار کناری سمت چپ، روی گزارش‌ها کلیک کنید. از فیلترهای موجود در نوار کناری سمت راست برای مشاهده گزارش های حساب صورتحساب خود استفاده کنید.

برای کسب اطلاعات بیشتر، گزارش‌دهی پلتفرم نقشه‌های Google و همچنین نظارت بر استفاده از API و استفاده از پوشش API را ببینید.

اگر از محدودیت های نرخ درخواست (QPS) تجاوز کنم چه اتفاقی می افتد؟

اگر از محدودیت‌های QPS یک محصول پلتفرم Google Maps تجاوز کنید، API یک پیام خطا برمی‌گرداند. اگر مکرراً از محدودیت ها تجاوز کنید، ممکن است دسترسی شما به API به طور موقت مسدود شود.

اگر از محدودیت‌های QPS درخواست تجاوز کنید یا از سرویس سوء استفاده کنید، درخواست‌ها یک پیام خطای خاص را برمی‌گردانند. اگر همچنان از محدودیت ها تجاوز کنید، ممکن است دسترسی شما به پلتفرم Google Maps مسدود شود.

توجه: چهار API سرویس وب دارای یک سرویس مشابه در سمت سرویس گیرنده هستند که در Maps JavaScript API موجود است: مسیرها ، ماتریس فاصله ، ارتفاع و کدگذاری جغرافیایی .

از محدودیت های استفاده فراتر رفت

اگر از محدودیت‌های استفاده فراتر رفتید، یک کد وضعیت OVER_QUERY_LIMIT به عنوان پاسخ دریافت خواهید کرد.

این بدان معناست که سرویس وب ارائه پاسخ‌های عادی را متوقف می‌کند و تا زمانی که استفاده بیشتر مجاز نشود، فقط به بازگرداندن کد وضعیت OVER_QUERY_LIMIT روی می‌آورد. این می تواند در عرض چند ثانیه اتفاق بیفتد، اگر خطا دریافت شده باشد زیرا برنامه شما در هر ثانیه درخواست های زیادی ارسال کرده است.

اگر مرتباً از محدودیت‌های استفاده از QPS خود فراتر می‌روید، با بهینه‌سازی برنامه‌ها برای استفاده مؤثرتر از محصولات پلتفرم Google Maps، میزان مصرف را کاهش دهید. برای اطلاعات بیشتر به راهنمای بهینه سازی مراجعه کنید.

سایت من ترافیک زیادی می گیرد. آیا می توانم از محصولات پلتفرم نقشه های گوگل استفاده کنم؟

آره. با این حال، توصیه می‌کنیم که با محدودیت‌های استفاده برای هر یک از پلتفرم‌های Google Maps که برنامه شما به آن متکی است آشنا شوید.

هنگامی که یک حساب صورت‌حساب دارید، اگر از محدودیت استفاده ماهیانه 200 دلاری تجاوز کنید و روش پرداخت معتبری در حساب صورت‌حساب خود نداشته باشید (کارت اعتباری، حواله بانکی، ...)، API از کار می‌افتد. تا زمانی که یک روش پرداخت معتبر اضافه نکنید.

میزان مصرف چگونه محاسبه و صورتحساب می شود؟

میزان استفاده در پایان هر روز محاسبه می‌شود و طبق جدول قیمت‌گذاری نشان داده شده است. در پایان هر ماه، کل استفاده از روش پرداخت مربوط به حساب صورت‌حساب شما محاسبه می‌شود. برای اطلاعات بیشتر، صورت‌حساب پلتفرم Google Maps را ببینید.

هزینه استفاده از پلتفرم نقشه های گوگل چقدر است؟

برای بررسی کلی هزینه هر API، به برگه قیمت‌گذاری مراجعه کنید. اگر برنامه شما درخواست ها یا حجم بارگذاری نقشه را تا 200 دلار در ماه استفاده می کند، هزینه استفاده شما دریافت نمی شود. استفاده بیش از 200 دلار اعتبار ماهانه به حساب صورت‌حساب شما کسر می‌شود. برای جزئیات بیشتر، راهنمای ما برای درک صورت‌حساب پلتفرم Google Maps را ببینید.

آیا قیمت گذاری به ارزهای دیگر موجود است؟

ممکن است ارزهای اضافی در کنسول موجود باشد. وقتی ارز دیگری را انتخاب می‌کنید، نرخ‌ها از معادل دلار ذکر شده در برگه قیمت‌گذاری ما تبدیل می‌شوند.

من صورتحساب را تنظیم کرده ام. چگونه صورتحساب خود را مشاهده کنم؟

Google در ابتدای هر ماه هزینه فعالیت ماه قبل را با استفاده از روش پرداخت مشخص‌شده از شما دریافت می‌کند. برای جزئیات درباره صورتحساب خود، به راهنمای ما برای درک صورت‌حساب پلتفرم Google Maps مراجعه کنید.

منابع اضافی:

اگر مصرف من به طور غیرمنتظره افزایش یابد، چگونه می توانم از یک صورت حساب بزرگ جلوگیری کنم؟

پلتفرم نقشه های گوگل راه هایی برای تعیین محدودیت های درخواست روزانه و تعیین حداکثر محدودیت های قابل پرداخت روزانه ارائه می دهد. برای محافظت در برابر افزایش‌های غیرمنتظره، می‌توانید حداکثر محدودیت روزانه استفاده را محدود کنید. همچنین می‌توانید هشدارهای بودجه را تنظیم کنید تا زمانی که هزینه‌های حساب صورت‌حساب به آستانه‌ای که شما تعیین کرده‌اید، اعلان‌های ایمیلی دریافت کنید.

محدود کردن حداکثر سقف قابل پرداخت روزانه:

برای جلوگیری از قبض زیاد، می توانید یک سقف روزانه برای استفاده در نظر بگیرید تا از افزایش غیرمنتظره استفاده محافظت کنید. با انجام مراحل زیر می توانید این محدودیت را در Cloud Console تغییر دهید :

  1. به داشبورد APIs & Services بروید.
  2. در صورت درخواست، پروژه ای را انتخاب کنید.
  3. یک API را از لیست انتخاب کنید، سپس روی برگه Quotas کلیک کنید.
  4. روی نماد ویرایش در کنار سهمیه «درخواست‌ها در روز» کلیک کنید.

همچنین، می‌توانید با استفاده از داشبورد IAM و Admin Quotas، سهمیه‌های متعدد را برای چندین API ویرایش کنید.

تنظیم و مدیریت هشدارهای بودجه:

هشدارهای بودجه را برای ارسال اعلان‌های ایمیلی به سرپرستان صورت‌حساب زمانی که هزینه‌های حساب صورت‌حساب به آستانه‌ای که شما تعیین کرده‌اید رسید، تنظیم کنید . زمانی که هزینه‌های تخمینی حساب صورت‌حساب از 50%، 90% و 100% آستانه فراتر رفت، اعلان‌های ایمیل به مدیران صورت‌حساب ارسال می‌شود.

پیامی دریافت کردم مبنی بر اینکه پروژه من به "حساب انتقال پلتفرم Google Maps" مرتبط است، اما من به آن حساب دسترسی ندارم. چکار کنم؟

«حساب انتقال پلتفرم Google Maps» برای کمک به مشتریان خاص برای انتقال به طرح قیمت‌گذاری جدید ما ایجاد شده است. این حساب انتقالی Google را قادر می‌سازد تا اعتباری یک‌باره به این مشتریان ارائه دهد تا بتوانند از پلتفرم Google Maps تا سقف 200 دلار بدون هزینه استفاده کنند. پس از تجاوز از این حد، حساب صورت‌حساب بسته می‌شود و دسترسی به سرویس را از دست خواهید داد. برای جلوگیری از وقفه در خدمات، از شما می‌خواهیم حساب صورت‌حساب خود را تنظیم کنید و همچنان از سطح ماهیانه 200 دلاری بدون هزینه لذت ببرید. برای تغییر حساب صورتحساب پروژه خود:

  1. یک حساب صورت‌حساب جدید ایجاد کنید (اگر قبلاً یک حساب صورت‌حساب دارید، می‌توانید از این مرحله رد شوید).
  2. حساب صورتحساب را با پروژه خود مرتبط کنید .
چرا محدودیت سهمیه من روی 1 درخواست در روز تنظیم شده است؟ چگونه می توانم این حد را افزایش دهم؟

اگر یک حساب صورت‌حساب ایجاد نکرده‌اید و به پروژه خود پیوست نکرده‌اید، APIهای پلتفرم Maps شما به ۱ درخواست در روز محدود می‌شوند. با ایجاد و پیوست کردن حساب صورتحساب می توانید سهمیه بالاتری دریافت کنید. برای انجام این کار، به شروع با پلتفرم نقشه های گوگل مراجعه کنید.

پس از ایجاد و پیوست یک حساب صورتحساب، محدودیت سهمیه روزانه شما حذف خواهد شد. می‌توانید برای جلوگیری از هزینه‌های غیرمنتظره، در Cloud Console محدودیتی تعیین کنید .

من یک اخطار نقض صورت حساب دریافت کردم. چگونه این را حل کنم؟

شما این اعلان را دریافت کرده‌اید زیرا Google تشخیص داده است که حساب شما از چندین حساب صورت‌حساب استفاده می‌کند. این نقض شرایط Google است، همانطور که در بخش 3.2.4 شرایط خدمات پلتفرم Google Maps تعریف شده است. تحت این شرایط، ایجاد چندین حساب صورتحساب ممنوع است. برای کسب اطلاعات بیشتر، به سؤالات متداول نقض حساب صورت‌حساب مراجعه کنید.

استفاده از پلتفرم نقشه های گوگل

از کدام کلیدها یا اعتبارنامه ها برای محصولات مختلف Maps استفاده کنم؟

هر بار که از محصولات پلتفرم Google Maps استفاده می کنید، باید یک کلید API برای تأیید درخواست خود اضافه کنید. پلتفرم نقشه های گوگل برای اندروید، iOS یا برنامه های وب و از طریق سرویس های وب HTTP در دسترس است.

کلید ای پی ای:

  • یک کلید API یک شناسه منحصربه‌فرد است که با استفاده از Cloud Console ایجاد می‌کنید.
  • مثالی از بارگیری یک API با یک کلید: &key=AIzaSyBjsINSH5x39Ks6c0_CoS1yr1Mb3cB3cVo

امضای دیجیتالی:

  • امضای دیجیتال با استفاده از راز امضای URL که توسط Google به شما ارائه شده است، ایجاد می‌شود. امضای دیجیتال با Maps Static API و Street View Static API استفاده می شود.

محدودیت های:

  • محدودیت‌های کلید API اختیاری هستند، اما ما قویاً توصیه می‌کنیم تمام کلیدهای API را برای امنیت بیشتر محدود کنید. برای جزئیات بیشتر به بهترین شیوه های امنیتی API مراجعه کنید.
  • می توانید یک محدودیت برنامه را به کلید API اضافه کنید. پس از محدود شدن، یک کلید فقط روی پلتفرم هایی کار می کند که از آن نوع محدودیت پشتیبانی می کنند. چهار نوع محدودیت برنامه موجود است. APIهایی که یک نوع محدودیت را اعمال می کنند می توانند از همان کلید محدود استفاده کنند.
    • آدرس های IP (سرورهای فردی) - برای استفاده با API های سرویس وب .
    • ارجاع دهنده های HTTP (وب سایت ها) - برای استفاده با API های وب .
    • محدودیت برنامه Android (بر اساس نام بسته و اثر انگشت) - برای استفاده با Maps SDK برای Android .
    • محدودیت برنامه iOS (توسط شناسه بسته iOS) - برای استفاده با Maps SDK برای iOS .
  • همچنین می توانید یک محدودیت API به کلید API اضافه کنید. برای اطلاعات بیشتر، به دریافت، افزودن و محدود کردن یک کلید API مراجعه کنید.

جدول زیر کلید / اعتبار و محدودیت برنامه را برای هر API/SDK پلتفرم Google Maps نشان می‌دهد.

API/SDK اعتبارنامه و محدودیت درخواست
Maps SDK برای اندروید کلید API با محدودیت اندروید 1
مکان‌های SDK برای Android کلید API با محدودیت اندروید 1
Maps SDK برای iOS کلید API با محدودیت iOS 1
مکان‌های SDK برای iOS کلید API با محدودیت iOS 1
Maps JavaScript API کلید API با محدودیت ارجاع HTTP 1
Maps Static API کلید API با محدودیت ارجاع HTTP 1 + امضای دیجیتال 2
API استاتیک نمای خیابان کلید API با محدودیت ارجاع HTTP 1 + امضای دیجیتال 2
Maps Embed API کلید API با محدودیت ارجاع HTTP 1
Address Validation API کلید API با محدودیت آدرس IP 1
Directions API کلید API با محدودیت آدرس IP 1
Distance Matrix API کلید API با محدودیت آدرس IP 1
Elevation API کلید API با محدودیت آدرس IP 1
API کدگذاری جغرافیایی کلید API با محدودیت آدرس IP 1
API مکان جغرافیایی کلید API با محدودیت آدرس IP 1
Places API کلید API با محدودیت آدرس IP 1
Roads API کلید API با محدودیت آدرس IP 1
Routes API کلید API با محدودیت آدرس IP 1
API منطقه زمانی کلید API با محدودیت آدرس IP 1
1 محدودیت های کلید API اختیاری است، اما ما قویاً توصیه می کنیم برای امنیت بیشتر، همه کلیدهای API را محدود کنید.
2 بسته به نوع استفاده، ممکن است برای Maps Static API و Street View Static API به امضای دیجیتال نیاز باشد. صرف نظر از استفاده، ما اکیداً توصیه می کنیم که از کلید API و امضای دیجیتال برای احراز هویت درخواست های خود استفاده کنید.
چگونه می توانم نوع محدودیت کلید خود را از یک ارجاع دهنده HTTP به یک محدودیت آدرس IP تغییر دهم؟

مهم: اگر از هر یک از APIهای سرویس وب با یک کلید API استفاده می‌کنید که دارای محدودیت‌های ارجاع است، درخواست‌های شما با این پیام خطا شکست می‌خورد: «کلیدهای API نمی‌توانند محدودیت‌های ارجاع‌دهنده داشته باشند وقتی با این API استفاده می‌شوند». باید به استفاده از کلید API با محدودیت آدرس IP تغییر دهید.

قبل از اینکه نوع محدودیت کلید API را از ارجاع دهنده HTTP به آدرس IP تغییر دهید، مطمئن شوید که همه APIهایی که از کلید API استفاده می کنند از نوع محدودیت IP پشتیبانی می کنند. APIهای یک نوع محدودیت می توانند از همان کلید محدود استفاده کنند. اگر نیاز به اعمال بیش از یک محدودیت دارید، یک کلید جداگانه با محدودیت مورد نیاز اضافه کنید. نحوه افزودن یک کلید API جدید را ببینید.

درباره محدودیت‌های کلیدی API مرتبط با محصولات پلتفرم Google Maps بیشتر بیاموزید.

برای تغییر کلید API با محدودیت ارجاع HTTP به محدودیت آدرس IP، موارد زیر را انجام دهید:

  1. به صفحه Credentials در Cloud Console بروید.
  2. پروژه ای را انتخاب کنید که حاوی کلید API است که می خواهید ویرایش کنید.
  3. در صفحه Credentials ، از لیست کلیدهای API، نام کلید API را برای ویرایش جزئیات کلید انتخاب کنید.
  4. در بخش محدودیت کلید صفحه، «آدرس‌های IP (سرورهای وب، کارهای کرون و غیره)» را انتخاب کنید و آدرس‌های IP سرور مناسب را وارد کنید، سپس روی ذخیره کلیک کنید.
چگونه یک کلید API جدید دریافت کنم؟
به شروع با پلتفرم نقشه های Google مراجعه کنید.
چگونه می توانم تغییرات ایجاد شده در هر نسخه از APIهای Google Maps را پیدا کنم؟

اطلاعات تغییر نسخه برای بسیاری از Maps API در پیوندهای زیر موجود است:

همچنین می‌توانید بررسی کنید که کدام نسخه از پلتفرم نقشه‌های Google با استفاده از ردیاب مشکلات پلتفرم Google Maps یک اشکال خاص معرفی و رفع شده است:

https://issuetracker.google.com/bookmark-groups/76561

چگونه می توانم پس از بارگیری صفحه، API را به صورت ناهمزمان در صفحه بارگذاری کنم؟

فقط پارامتر callback را هنگام بارگذاری API مشخص کنید. اطلاعات بیشتر و کد نمونه را می‌توانید در بخش شروع به کار از مستندات Maps JavaScript API بیابید.

چگونه می توانم محصولات Google Maps Platform را برای نمایش به زبانی غیر از انگلیسی دریافت کنم؟

به طور پیش‌فرض API تلاش می‌کند تا مناسب‌ترین زبان را بر اساس موقعیت مکانی کاربر یا تنظیمات مرورگر بارگیری کند. برخی از APIها به شما این امکان را می دهند که در هنگام درخواست، به صراحت یک زبان را تنظیم کنید. اطلاعات بیشتر در مورد نحوه تنظیم زبان در اسناد هر API موجود است:

Supported Languages:

Google often updates supported languages. This list may not be exhaustive and is subject to change.

Language Code Language Language Code Language
af Afrikaans ja Japanese
sq Albanian kn Kannada
am Amharic kk Kazakh
ar Arabic km Khmer
hy Armenian ko Korean
az Azerbaijani ky Kyrgyz
eu Basque lo Lao
be Belarusian lv Latvian
bn Bengali lt Lithuanian
bs Bosnian mk Macedonian
bg Bulgarian ms Malay
my Burmese ml Malayalam
ca Catalan mr Marathi
zh Chinese mn Mongolian
zh-CN Chinese (Simplified) ne Nepali
zh-HK Chinese (Hong Kong) no Norwegian
zh-TW Chinese (Traditional) pl Polish
hr Croatian pt Portuguese
cs Czech pt-BR Portuguese (Brazil)
da Danish pt-PT Portuguese (Portugal)
nl Dutch pa Punjabi
en English ro Romanian
en-AU English (Australian) ru Russian
en-GB English (Great Britain) sr Serbian
et Estonian si Sinhalese
fa Farsi sk Slovak
fi Finnish sl Slovenian
fil Filipino es Spanish
fr French es-419 Spanish (Latin America)
fr-CA French (Canada) sw Swahili
gl Galician sv Swedish
ka Georgian ta Tamil
de German te Telugu
el Greek th Thai
gu Gujarati tr Turkish
iw Hebrew uk Ukrainian
hi Hindi ur Urdu
hu Hungarian uz Uzbek
is Icelandic vi Vietnamese
id Indonesian zu Zulu
it Italian

You can see what the map will look like in any of the languages listed above in this sample application .

Can the Google Maps Platform be accessed over SSL (HTTPS)?

The Maps JavaScript API, Maps Static API, and Web Service APIs can be accessed over secure (HTTPS) connections. Please see the documentation for the API concerned for information on how to access the API over SSL.

Note that the Maps Static API does not support custom icon URLs that use HTTPS; the default icon will be displayed.

How do I report a bug or request a new feature in the Google Maps Platform?

If you experience behavior that you believe may be a bug, please begin by raising it in the relevant forum . This will allow other developers to validate the bug, and rule out any potential issues with your code.

If you wish to request a feature, please also first raise it in the relevant forum to confirm that a solution that meets your requirements is not already available.

Once you have confirmed that you have identified a new bug, or that your requirements cannot be met by the existing functionality of the Google Maps Platform products, please report your bug or feature request using the Google Maps Platform Issue Tracker .

Before adding a bug or feature request to the Issue Tracker please be sure to check that the bug or feature concerned has not already been added. If it has, you can star the issue to register your interest and be notified of updates.

How do Google Maps Platform APIs use site cookies?

Maps SDK for Android and Maps SDK for iOS use cookies subject to Google's Privacy Policy , such as calculating daily and 7-day active users and service abuse prevention. These cookies are not associated with any signed-in Google Account and are not logged with the rest of the information collected from the API calls.

I can't find the answer to my question. Who should I contact?

Google's Developer Relations team maintains a presence on Stack Overflow — a collaboratively-edited question and answer site for programmers. It's a great place to ask technical questions about developing and maintaining Google Maps applications. More information about asking questions on Stack Overflow is available on the Support page.

For best results when requesting help, please keep the following in mind:

  • Search the current discussions. Chances are someone else has experienced a similar issue and found a fix.
  • Submit a link to your site if possible. Only post code snippets if the code is not easily viewable online.
  • Provide all relevant information including browser versions, errors, and all other facts that may be useful in troubleshooting this problem.

Errors and troubleshooting

What does this error mean?

If you encounter an error while loading or running the Google Maps APIs, please see the following links to find explanations for the error codes:

My maps appear darker than usual. What's happening?

Under certain circumstances, a darkened map, or 'negative' Street View image, watermarked with the text "for development purposes only", may be displayed. This behavior typically indicates issues with either an API key or billing. To use Google Maps Platform products, you must have a billing account and all requests must include a valid API key. The following flow will help troubleshoot this:


How do I resolve the error codes: OVER_DAILY_LIMIT or OVER_QUERY_LIMIT ?
These error codes can be returned for any of the following reasons:
  • An API key is missing from the request.
  • The provided API key is invalid.
  • The project does not have a billing account attached.
  • A self-imposed usage cap has been exceeded.
  • The provided method of payment is no longer valid (for example, a credit card has expired).
  • You have exceeded the QPS limits for a given API.

To use Google Maps Platform products, you must have a billing account, and all requests must include a valid API key. To fix this, take the following steps:

How do I resolve the error codes: kGMSPlacesRateLimitExceeded or 9005 PLACES_API_RATE_LIMIT_EXCEEDED ?
If you are seeing kGMSPlacesRateLimitExceeded or 9005 PLACES_API_RATE_LIMIT_EXCEEDED , you may be using a deprecated version of the Places SDK for Android or Places SDK for iOS. Learn more and find the new SDKs at https://goo.gle/places-sdk-deprecation .
How do I resolve the error: "This IP, site or mobile application is not authorized to use this API key."?

There are various scenarios which may cause this error:

  • You've enabled IP address (server) restrictions on your API key, and an unauthorized IP address is attempting a request.
  • You've enabled HTTP referrer (website) restrictions on your API key, and an unauthorized referrer is attempting a request.
  • You've restricted usage to your Android apps by setting a package name and fingerprint, and an unauthorized Android app is attempting a request.
  • You've restricted requests from iOS apps by specifying bundle identifiers and an unrecognized iOS app is attemting to send a request.
  • It used to be possible to get this error if you used any of the web service APIs , with an API key with HTTP referer restrictions. Requests to those APIs should be identified with an API key with IP address restrictions. Switch your key restriction type from an HTTP referer restriction to an IP address restriction . For more information about restricting API keys, see API Key Best Practices .

View and Edit your API Key Credentials

To view your API keys and manage any restrictions, do the following:

  1. Go to the Credentials page of the Cloud Console.
  2. Select the project that contains the API key you want to review.
  3. To view credential details, including any restrictions set for the key, from the list of API keys, click the name of the key.
  4. The full credentials of the selected API key are displayed, including any restrictions set up for the key. From here, the restrictions can be changed, deleted, or updated as needed.
How do I resolve the error: "API keys with referer restrictions cannot be used with this API."?

You are using any of the web service APIs with an API key restricted to an HTTP referer. For security reasons, web service APIs need to use API keys restricted to IP addresses . Switch your key restriction type from an HTTP referer restriction to an IP address restriction , or create a new API key if your key is already used with the Maps JavaScript API.

Google Maps Platform Services

I need to convert addresses to latitude/longitude pairs. Can I do that with the Google Maps Platform?

Yes, this process is called "geocoding." The Maps JavaScript API includes a class for performing a geocoding service. The class is: google.maps.Geocoder .

Alternatively, Google also provides the Geocoding API , which offers a REST interface that can respond in JSON and XML formats.

Which countries is geocoding available in?

To see countries currently supported by the Google Maps Platform geocoders, please consult the Google Maps coverage data .

The accuracy of geocoded locations may vary per country, so you should consider using the returned location_type field to determine if a good enough match has been found for the purposes of your application. Please note that the availability of geocoding data depends on our contracts with data providers, so it is subject to change.

Why do the Google Maps Platform Geocoders provide different locations than Google Maps?

The API geocoder and Google Maps geocoder sometimes use different data sets (depending on the country). The API geocoder occasionally gets updated with new data, so you can expect to see results changing or improving over time.

How should I format my geocoder queries to maximise the number of successful requests?

The geocoder is designed to map street addresses to geographical coordinates. We therefore recommend that you format geocoder requests in accordance with the following guidelines to maximize the likelihood of a successful query:

  • Specify addresses in accordance with the format used by the national postal service of the country concerned.
  • Do not specify additional address elements such as business names, unit numbers, floor numbers, or suite numbers that are not included in the address as defined by the postal service of the country concerned. Doing so may result in responses with ZERO_RESULTS .
  • Format plus codes as shown here (plus signs are url-escaped to %2B and spaces are url-escaped to %20 ):
    • global code is a 4 character area code and 6 character or longer local code (849VCWC8+R9 is 849VCWC8%2BR9 ).
    • compound code is a 6 character or longer local code with an explicit location (CWC8+R9 Mountain View, CA, USA is CWC8%2BR9%20Mountain%20View%20CA%20USA ).
  • Use the street number of a premise in preference to the building name where possible.
  • Use street number addressing in preference to specifying cross streets where possible.
  • Do not provide 'hints' such as nearby landmarks.
How should I format a US address on a numbered highway for geocoding?

The Google Maps Platform geocoder requires that US numbered highways be specified in addresses as follows:

  • County Roads: "Co Road NNN " where NNN is the road number. eg. "Co Road 82"
  • State Highways: " State NNN " where State is the full name of the state and NNN is the highway number. eg. "California 82"
  • US Highways: "US NNN " where NNN is the highway number. eg. "US 101"
  • US Interstates: "Interstate NNN " where NNN is the interstate number. eg. "Interstate 280"
When should I use an API geocoder class and when should I use the HTTP Geocoding Service?

See the document: Geocoding Strategies , which details the pros and cons of different geocoding strategies.

How do I provide driving directions with the Google Maps Platform?

The Compute Routes service of the Routes API and the Directions API allow you to provide driving directions for single and multi-leg journeys. Routing options help you shape directions with a travel mode (driving), a single or a set of routes, and restrictions (no toll roads). These services are available in the following forms:

  • HTTP request/response interface (used in mobile and other applications) is compatible with Maps SDK for Android and with other Google Maps web services.
  • JavaScript API , for client-side applications, allows you to provide driving directions via the google.maps.DirectionsService class. The DirectionsRenderer class can automatically create the overlays and directions panel for you. Additional examples are provided in the documentation.
  • Java, Python, go, and Node.js client interfaces , for server-side applications, provide the same functionality. For more information on client libraries, see Directions API client libraries .
In which countries are driving directions available?

To see countries currently supported by driving directions in the Google Maps Platform products, consult the Google Maps coverage data . Please note that the availability of driving directions data depends on our contracts with data providers, and is subject to change.

In which countries are transit directions available?

The Directions API and Distance Matrix API support all Google Transit partners , except those in Japan.

Which KML and GeoRSS features are supported in the Maps JavaScript API?

The KmlLayer class in the Maps JavaScript API enables developers to overlay KML/KMZ and GeoRSS files on top of the map. Documentation and examples can be found here .

What are the limits on the size and complexity of KML that can be displayed using the KmlLayer class of the Maps JavaScript API?

The size and complexity limits on the display of KML using the KmlLayer class are documented here .

How do I render KML files that are hosted on intranet sites on a map?

The KmlLayer class that generates KML overlays in the Maps JavaScript API uses a Google hosted service to retrieve and parse KML files for rendering. Consequently it is not possible to display KML files that are not hosted at a URL that is available publicly accessible, or that require authentication to access.

If you need to develop applications that use KML files hosted on intranet sites we recommend that you render the KML on the client side by using third-party JavaScript libraries. As the KML file is analyzed by the browser, performance may be lower than by using the KmlLayer class.

What is the maximum number of markers or path vertices supported by the Maps Static API?

There is no limit to the number of markers or path vertices supported by the Maps Static API. When using custom icons, up to five unique icons can be specified per request, but each can be used multiple times within the map.

Note that Maps Static API URLs can contain a maximum of approximately 8,192 characters which constrains the number of markers and path vertices that can be specified based on the number of decimal places used when specifying each latitude/longitude pair. For information on how the number of decimal places used relates to the accuracy on the Earth see the Wikipedia article on Decimal Degrees .

Why can't I access Google Maps Platform products for certain countries?

Maps APIs may not be used in Prohibited Territories . Refer also to the Terms of Service .

How do I report a problem on the Google basemap?
Send feedback through Google Maps for wrong or missing map information such as:
  • Wrong addresses or marker locations
  • Incorrect road names
  • Wrong information about one-way and two-way roads
  • Incorrectly drawn road
  • Closed roads
  • Roads that don't exist

For correction of a place or business listing, suggest an edit .

If Maps content needs to be removed for legal reasons, submit a legal request.

For critical or time-sensitive requests, file a support case with specific details on what needs to be fixed.

How is performance monitored for the services used with Maps JavaScript API?

Some client-side features are instrumented to report success or failure for the purpose of calculating the SLO (Service Level Objective). This information is sent to Google at maps.googleapis.com/maps_api_js_slo/log in calls that log SLO information. This information includes success status, latency, and version/channel of the Maps JavaScript API in use. The calls may be batched for performance. Please note that you may need to allow maps.googleapis.com in your Content Security Policy to ensure these calls are not blocked at browser-level. For example: Content-Security-Policy: default-src 'self' maps.googleapis.com; with HTTP headers, or <meta http-equiv="Content-Security-Policy" content="default-src 'self' maps.googleapis.com;"> with HTML Meta Tags.

Maps JavaScript API

How long will the Maps JavaScript API work after it has been loaded?

You need to refresh the page that loads the Maps JavaScript API at least once every 5 days.

Google Maps SDK for iOS

How do I resolve the error: kGMSPlacesRateLimitExceeded ?
If you are seeing this error, you may be using a deprecated version of the Places SDK for iOS. Version 2.7.0 of the Places SDK for iOS has been turned off, and is no longer available. Please update your app to use the latest version as soon as possible. See the migration guide for details.
I'm getting crashes when debugging with an iOS 8.x device. What should I do?

If you experience issues when debugging with devices running iOS 8.x, follow these steps to disable GPU frame capture in the XCode scheme you are running:

  1. In XCode, choose Product , Scheme , Manage Schemes .
  2. Select a scheme and choose Edit... .
  3. Set the GPU Frame Capture option to Disabled . Note that this option may not be present for all devices.
Xcode GPU Frame Capture option on the Generic iOS device page
What's the impact of rounded and wider screens on the Google Maps iOS SDK?

Beginning with the iPhone X , iPhones have a screen shape featuring rounded corners, a notch at the top for the device's sensor housing, and an indicator at the bottom of the screen for accessing the Home screen. As of iOS 11.0 SDK, Apple added the Safe Area API allowing developers to position elements in an area which is safe from being clipped by the new screen shape.

The Google Maps iOS SDK has many visual elements and controls, such as an indoor picker and the report a problem link. With version 2.4, these visual elements and controls could be clipped by the new screen shape. In landscape mode, the indoor floor picker may be clipped by either the notch or the home button indicator.

With the Google Maps iOS SDK 2.5 release these layout issues are fixed automatically. When your app is used on an iPhone X or later, the padding on GMSMapView and GMSPanoramaView are increased so that the visual elements aren't clipped.

By default, we will always include your padding. The Google Maps iOS SDK assumes that padding is intended to pad from within the safe area. If you design your interface with the assumption that everything is positioned within the safe area, this will work without any extra effort.

If you have designed an interface which doesn't work with our default adjustment, we have introduced a new property to GMSMapView, called paddingAdjustmentBehavior . GMSMapView now allows you to pick from one of three padding adjustments behaviors: 'Always' (default), 'Automatic', and 'Never'.

If GMSMapView is set to use the 'Always' padding behavior, it will always add the safe area insets to the padding. This allows you to design your interface with the assumption that all placement is from the edges of the safe area. This is the default value.

If GMSMapView is set to use the 'Automatic' padding behavior, it will always choose the larger of padding or safe area inset. This will allow you to add padding from the screen edge while always ensuring that all elements stay within the safe area.

If GMSMapView is set to use the 'Never' padding behavior, it will never add the safe area insets to the padding. This is the behavior prior to the 2.5 release and may be useful if your padding already takes into consideration the safe area, or if our other behaviors don't act well with your interface. It is your responsibility to ensure that the Google logo and copyright notices are always visible, as specified in the Google Maps Platform Terms of Service .

In contrast, GMSPanoramaView doesn't have an optional padding property. This means that there is no padding to adjust and GMSPanoramaView will always apply any necessary padding to ensure that all visual elements are within the safe area.

Google Maps SDK for Android

How do I resolve the error: 9005 PLACES_API_RATE_LIMIT_EXCEEDED ?
If you are seeing this error, you may be using a deprecated version of the Places SDK for Android. The Google Play services version of the Places SDK for Android has been turned off, and is no longer available. Please update your app to use the latest version as soon as possible. See the migration guide for details.
My app only shows blank grey tiles instead of a map. How can I resolve this?

A common reason that a blank grey tiles are shown instead of a map is authentication issues. You can follow the steps below to troubleshoot those issues by using adb logcat.

  1. Make sure you have adb installed. If not, you can follow the guide here .
  2. Install the app that shows the problem on a device or an Android emulator. If you use Android emulator, make sure the emulator settings has Play Store included.
  3. In Android Studio terminal, run adb logcat -e "Google Maps Android API" . This will only print lines where the log message matches "Google Maps Android API" (Optionally, you can output the log to a text file by appending: > logcat.txt)
  4. Reproduce the issue on your device and check for common errors such as:
    • The wrong/unintended API Key is being referenced in Manifest.
    • Billing isn't enabled on Project.
    • The SDK isn't enabled on project APIs.
    • The incorrect SHA1 fingerprint is added to the API Key restrictions.
    • The Google Play Service dependencies is not included in the build.gradle file.

URL signing

Can I sign URLs using JavaScript?

We strongly recommend against signing URLs using JavaScript as this would expose your URL signing secret to end users. Therefore signatures should only be generated by server side components.

Why am I receiving a HTTP 403 Forbidden response to my Maps API web service requests?

An HTTP 403 response indicates a permission issue, likely because the signature could not be verified for this request. This could be because:

  1. A signature has been specified but is incorrect for this request.
  2. The request specifies a Google Maps Platform Premium Plan an API key but does not specify a signature, and the service being called requires that requests made using an API key include a valid signature.
  3. A signature has been specified but the associated Google Maps Platform Premium Plan API key has not been specified.