Using google maps api behind firewall

前端 未结 3 1645

I have an application embedding google maps. Works fine. Some users are behind a firewall with very restricted access to the rest of the world.

Does anyone know of a

相关标签:
3条回答
  • 2021-01-20 16:48

    Here is the content of the article about domains used in Google Maps APIs. This article is available in Google Cloud support portal:

    This document lists all the domains that are used by the Google Maps Platform when Maps components are loaded. This list of domain is provided to help you set up your firewall configuration, in case your Internet access is filtered by a per-domain policy.

    Important notes:

    • This list is subject to change as new features are rolled out, and may not be up-to-date as new domains are noticed. It is recommended to check this page every 2 months.
    • The entries below containing google.com can be replaced with the other domains where Google Maps has launched: maps.google.co.uk, ditu.google.com, bendi.google.com, ditu.google.cn, bendi.google.cn, mapy.google.pl, etc.
    • Users accessing the API from China will send requests to domains under google.cn and gstatic.cn in addition to google.com and gstatic.com respectively.

    Javascript Maps API (V2 and V3) over HTTP

    The Maps Javascript API V3 (and V2) bootstrap and services (geocoding, driving directions, elevation, kml) use:

    • maps.google.com
    • maps.googleapis.com

    Static dependencies:

    • maps.gstatic.com

    Map tiles and traffic tiles:

    • maps.googleapis.com

    Aerial tiles:

    • khmdb0.google.com
    • khmdb0.googleapis.com
    • khmdb1.google.com
    • khmdb1.googleapis.com

    Satellite tiles:

    • khm.google.com
    • khm.googleapis.com
    • khm0.google.com
    • khm0.googleapis.com
    • khm1.google.com
    • khm1.googleapis.com
    • khms0.google.com
    • khms0.googleapis.com
    • khms1.google.com
    • khms1.googleapis.com

    Streetview imagery:

    • geo0.ggpht.com
    • geo1.ggpht.com
    • geo2.ggpht.com
    • geo3.ggpht.com
    • lh3.ggpht.com
    • lh4.ggpht.com
    • lh5.ggpht.com
    • lh6.ggpht.com
    • cbk0.google.com
    • cbk0.googleapis.com
    • cbk1.google.com
    • cbk1.googleapis.com
    • cbk2.google.com
    • cbk2.googleapis.com
    • cbk3.google.com
    • cbk3.googleapis.com
    • lh3.googleusercontent.com
    • lh4.googleusercontent.com
    • lh5.googleusercontent.com
    • lh6.googleusercontent.com

    Reporting requests:

    • gg.google.com

    Identification requests:

    • id.google.com

    Javascript Maps API (V2 and V3) over HTTPS

    The Maps Javascript API V3 (and V2) bootstrap and services (geocoding, driving directions, elevation, kml) use:

    • maps-api-ssl.google.com
    • maps.googleapis.com

    Static dependencies:

    • maps-api-ssl.google.com
    • maps.gstatic.com

    Map tiles and traffic tiles:

    • maps.googleapis.com

    Aerial tiles:

    • khmdb0.google.com
    • khmdb0.googleapis.com
    • khmdb1.google.com
    • khmdb1.googleapis.com

    Satellite tiles:

    • khm.google.com
    • khm.googleapis.com
    • khm0.google.com
    • khm0.googleapis.com
    • khm1.google.com
    • khm1.googleapis.com
    • khms0.google.com
    • khms0.googleapis.com
    • khms1.google.com
    • khms1.googleapis.com
    • khms2.google.com
    • khms2.googleapis.com
    • khms3.google.com
    • khms3.googleapis.com

    Streetview imagery:

    • geo0.ggpht.com
    • geo1.ggpht.com
    • geo2.ggpht.com
    • geo3.ggpht.com
    • lh3.ggpht.com
    • lh4.ggpht.com
    • lh5.ggpht.com
    • lh6.ggpht.com
    • cbks0.google.com
    • cbks0.googleapis.com
    • cbks1.google.com
    • cbks1.googleapis.com
    • cbks2.google.com
    • cbks2.googleapis.com
    • cbks3.google.com
    • cbks3.googleapis.com
    • lh3.googleusercontent.com
    • lh4.googleusercontent.com
    • lh5.googleusercontent.com
    • lh6.googleusercontent.com

    Reporting requests:

    • gg.google.com

    Identification requests are not sent.

    Additional domains

    You may also see the javascript v3 API access the following domains:

    • googleapis.l.google.com
    • clients.l.google.com
    • maps.l.google.com
    • mt.l.google.com
    • khm.l.google.com
    • csi.gstatic.com

    Maps API Web Services

    The Geocoding API V3 (and V2), the Directions API, the Elevation API, the Distance Matrix API, and the Static Maps API V2 (and V1) use:

    Over HTTP:

    • maps.google.com (legacy)
    • maps.googleapis.com (recommended)

    Over HTTPS:

    • maps-api-ssl.google.com (legacy)
    • maps.googleapis.com (recommended)

    Maps Android SDK

    The Maps Android SDK uses these domains over HTTPS:

    • clients4.google.com
    • www.google.com
    • csi.gstatic.com
    0 讨论(0)
  • 2021-01-20 16:54

    This is possible now. The primary source of information is found here: https://developers.google.com/maps/documentation/business/articles/prelaunch_checklist#firewall

    Configure Firewall to Allow Access to the Google Maps API Services

    Why it's important: The Maps API services use a variety of domains, some which do not belong to the *google.com domain. If you are behind a restrictive firewall, it is important you understand which Maps API services use which domains.

    Failure to allow access to the correct domains will cause API requests to fail, which can break your applications. For a complete listing of domains used by the Maps APIs, please consult our portal resource (login required):

    Log in to the Google Enterprise Support Portal The support portal is only available to Google Maps API for Work users. Navigate to the "Resources" tab Select the Resource called "List of domains used by the Google Maps API Family." You should allow your applications to access these domains.

    Please note that we do not recommend managing firewall restrictions by IP address, as the IPs associated with these domains are not static.

    0 讨论(0)
  • 2021-01-20 16:57

    As I see in Chrome's console there are 3 servers that Google Maps are using right now:

    • mt0.google.com (ew-in-f100.1e100.net)
    • mt1.google.com (ew-in-f102.1e100.net)
    • maps.gstatic.com (ew-in-f104.1e100.net)

    As you can see all of them are in 1e100.net domain.

    1e100 equals1 googol ;)

    0 讨论(0)
提交回复
热议问题