{"action":"closed","issue":{"url":"https://api.github.com/repos/open-apparel-registry/open-apparel-registry/issues/537","repository_url":"https://api.github.com/repos/open-apparel-registry/open-apparel-registry","labels_url":"https://api.github.com/repos/open-apparel-registry/open-apparel-registry/issues/537/labels{/name}","comments_url":"https://api.github.com/repos/open-apparel-registry/open-apparel-registry/issues/537/comments","events_url":"https://api.github.com/repos/open-apparel-registry/open-apparel-registry/issues/537/events","html_url":"https://github.com/open-apparel-registry/open-apparel-registry/issues/537","id":449431704,"node_id":"MDU6SXNzdWU0NDk0MzE3MDQ=","number":537,"title":"Allow client-side requests to Google resources to be conditionally fetched from China-hosted google.cn","user":{"login":"jwalgran","id":17363,"node_id":"MDQ6VXNlcjE3MzYz","avatar_url":"https://avatars0.githubusercontent.com/u/17363?v=4","gravatar_id":"","url":"https://api.github.com/users/jwalgran","html_url":"https://github.com/jwalgran","followers_url":"https://api.github.com/users/jwalgran/followers","following_url":"https://api.github.com/users/jwalgran/following{/other_user}","gists_url":"https://api.github.com/users/jwalgran/gists{/gist_id}","starred_url":"https://api.github.com/users/jwalgran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwalgran/subscriptions","organizations_url":"https://api.github.com/users/jwalgran/orgs","repos_url":"https://api.github.com/users/jwalgran/repos","events_url":"https://api.github.com/users/jwalgran/events{/privacy}","received_events_url":"https://api.github.com/users/jwalgran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"jwalgran","id":17363,"node_id":"MDQ6VXNlcjE3MzYz","avatar_url":"https://avatars0.githubusercontent.com/u/17363?v=4","gravatar_id":"","url":"https://api.github.com/users/jwalgran","html_url":"https://github.com/jwalgran","followers_url":"https://api.github.com/users/jwalgran/followers","following_url":"https://api.github.com/users/jwalgran/following{/other_user}","gists_url":"https://api.github.com/users/jwalgran/gists{/gist_id}","starred_url":"https://api.github.com/users/jwalgran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwalgran/subscriptions","organizations_url":"https://api.github.com/users/jwalgran/orgs","repos_url":"https://api.github.com/users/jwalgran/repos","events_url":"https://api.github.com/users/jwalgran/events{/privacy}","received_events_url":"https://api.github.com/users/jwalgran/received_events","type":"User","site_admin":false},"assignees":[{"login":"jwalgran","id":17363,"node_id":"MDQ6VXNlcjE3MzYz","avatar_url":"https://avatars0.githubusercontent.com/u/17363?v=4","gravatar_id":"","url":"https://api.github.com/users/jwalgran","html_url":"https://github.com/jwalgran","followers_url":"https://api.github.com/users/jwalgran/followers","following_url":"https://api.github.com/users/jwalgran/following{/other_user}","gists_url":"https://api.github.com/users/jwalgran/gists{/gist_id}","starred_url":"https://api.github.com/users/jwalgran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwalgran/subscriptions","organizations_url":"https://api.github.com/users/jwalgran/orgs","repos_url":"https://api.github.com/users/jwalgran/repos","events_url":"https://api.github.com/users/jwalgran/events{/privacy}","received_events_url":"https://api.github.com/users/jwalgran/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/open-apparel-registry/open-apparel-registry/milestones/12","html_url":"https://github.com/open-apparel-registry/open-apparel-registry/milestone/12","labels_url":"https://api.github.com/repos/open-apparel-registry/open-apparel-registry/milestones/12/labels","id":4235596,"node_id":"MDk6TWlsZXN0b25lNDIzNTU5Ng==","number":12,"title":"2019 Q2","description":"","creator":{"login":"dboyer","id":516764,"node_id":"MDQ6VXNlcjUxNjc2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/516764?v=4","gravatar_id":"","url":"https://api.github.com/users/dboyer","html_url":"https://github.com/dboyer","followers_url":"https://api.github.com/users/dboyer/followers","following_url":"https://api.github.com/users/dboyer/following{/other_user}","gists_url":"https://api.github.com/users/dboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/dboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dboyer/subscriptions","organizations_url":"https://api.github.com/users/dboyer/orgs","repos_url":"https://api.github.com/users/dboyer/repos","events_url":"https://api.github.com/users/dboyer/events{/privacy}","received_events_url":"https://api.github.com/users/dboyer/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":14,"state":"open","created_at":"2019-04-16T19:10:35Z","updated_at":"2019-06-13T20:22:24Z","due_on":"2019-06-30T07:00:00Z","closed_at":null},"comments":0,"created_at":"2019-05-28T19:12:11Z","updated_at":"2019-06-13T20:22:24Z","closed_at":"2019-06-13T20:22:24Z","author_association":"CONTRIBUTOR","body":"## Overview\r\n\r\nAllow client-side requests to Google resources to be conditionally fetched from China-hosted google.cn\r\n\r\n### Is your feature request related to a problem? Please describe.\r\n\r\nThe map does not load properly when browsing from China unless the Javascript resources are loaded from google.cn.\r\n\r\n### Describe the solution you'd like\r\n\r\n- Conditionally use `CN` instead of `IE` in `FacilitiesMap.jsx` https://github.com/open-apparel-registry/open-apparel-registry/blob/8d4db685e02dff2c49a6e8eda14fdc01ac2d5591/src/app/src/components/FacilitiesMap.jsx#L485\r\n- Conditionally use `google.cn` instead of `google.com` in `index.html` https://github.com/open-apparel-registry/open-apparel-registry/blob/8d4db685e02dff2c49a6e8eda14fdc01ac2d5591/src/app/public/index.html#L132 \r\n- Conditionally use `www.google.cn` and `CN` instead of `maps.googleapis.com` and `IE` in `FacilityDetailsStaticMap.jsx https://github.com/open-apparel-registry/open-apparel-registry/blob/8d4db685e02dff2c49a6e8eda14fdc01ac2d5591/src/app/src/components/FacilityDetailsStaticMap.jsx#L7-L9\r\n\r\n### Additional Context\r\n\r\nWe will likely use IP geolocation to determine if the application is being used from China (as discussed in https://github.com/open-apparel-registry/open-apparel-registry/issues/506#issuecomment-492310300) but for testing and manual override reasons we should not tie the conditional toggle directly to the location detection implementation.\r\n\r\nHere are the hardcoded changes we made to test https://github.com/open-apparel-registry/open-apparel-registry/issues/513\r\n\r\n```diff\r\ndiff --git a/src/app/public/index.html b/src/app/public/index.html\r\nindex d401e51..0dd56fa 100644\r\n--- a/src/app/public/index.html\r\n+++ b/src/app/public/index.html\r\n@@ -129,6 +129,6 @@\r\n             };\r\n         }\r\n     </script>\r\n-    <script type=\"text/javascript\" src=\"//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit\"></script>\r\n+    <script type=\"text/javascript\" src=\"//translate.google.cn/translate_a/element.js?cb=googleTranslateElementInit\"></script>\r\n   </body>\r\n </html>\r\ndiff --git a/src/app/src/components/FacilitiesMap.jsx b/src/app/src/components/FacilitiesMap.jsx\r\nindex f501519..b6631d6 100644\r\n--- a/src/app/src/components/FacilitiesMap.jsx\r\n+++ b/src/app/src/components/FacilitiesMap.jsx\r\n@@ -482,7 +482,7 @@ class FacilitiesMap extends Component {\r\n                         yesIWantToUseGoogleMapApiInternals\r\n                         onGoogleApiLoaded={this.handleAPILoaded}\r\n                         bootstrapURLKeys={{\r\n-                            region: 'IE',\r\n+                            region: 'CN',\r\n                             key: GOOGLE_CLIENT_SIDE_API_KEY,\r\n                         }}\r\n                         options={this.createMapOptions}\r\ndiff --git a/src/app/src/components/FacilityDetailsStaticMap.jsx b/src/app/src/components/FacilityDetailsStaticMap.jsx\r\nindex 20695ea..64d0b29 100644\r\n--- a/src/app/src/components/FacilityDetailsStaticMap.jsx\r\n+++ b/src/app/src/components/FacilityDetailsStaticMap.jsx\r\n@@ -4,9 +4,9 @@ import { GOOGLE_CLIENT_SIDE_API_KEY } from '../util/constants.facilitiesMap';\r\n \r\n import { facilityPropType } from '../util/propTypes';\r\n \r\n-const baseURL = 'https:///maps.googleapis.com/maps/api/staticmap';\r\n+const baseURL = 'https://www.google.cn/maps/api/staticmap';\r\n const staticParams =\r\n-    'zoom=18&size=320x200&maptype=satellite&region=IE';\r\n+    'zoom=18&size=320x200&maptype=satellite&region=CN';\r\n const apiKey = `key=${GOOGLE_CLIENT_SIDE_API_KEY}`;\r\n \r\n const makeGoogleMapsStaticMapURLFromLatLng = ({ lat, lng }) =>\r\n\r\n```"}}
{"actor":{"display_login":"rajadain"}}