2
你好我正在使用流星谷歌地圖。我可以在桌面上看到它們,但在移動設備上我看不到它們。有人可以告訴我,我做錯了什麼?在手機上的地圖容器都是空白的。這裏是一個圖像谷歌地圖不顯示在手機上
如果非要白名單域名,那麼有人可以告訴我,我怎麼會白名單中的谷歌地圖因爲這是
tel:, geo:, mailto:, sms:, market:* are allowed and launch externally (phone app, or an email client on Android)
我覺得文檔谷歌地圖允許
這裏是谷歌地圖代碼
的index.html
個<div class="map-container">
{{> googleMap name="exampleMap" options=exampleMapOptions}}
</div>
index.js
exampleMapOptions: function() {
// Make sure the maps API has loaded
if (GoogleMaps.loaded()) {
// Map initialization options
return {
center: new google.maps.LatLng(Meteor.user().profile.latitude, Meteor.user().profile.longitude),
zoom: 13
};
}
}
Template.body.onCreated(function() {
// We can use the `ready` callback to interact with the map API once the map is ready.
GoogleMaps.ready('exampleMap', function(map) {
// Add a marker to the map once it's ready
var marker = new google.maps.Marker({
position: map.options.center,
map: map.instance
});
});
});
UPDATE
我發現我得到的錯誤未捕獲的ReferenceError:谷歌沒有定義
所以我想白名單,但它是不起作用
> App.info({ id: 'com.example.matt.uber',
>name: 'MedCircle',
> description: 'Get über power in one button click',
>author: 'Matt
> Development Group',
>email: '[email protected]',
>website: 'http://example.com'
>});
>
> App.setPreference('BackgroundColor', '0xff0000ff');
> App.setPreference('HideKeyboardFormAccessoryBar', true);
> App.setPreference('Orientation', 'default');
>
>
> // App.accessRule('*.googleapis.com');
> //App.accessRule('*.gstatic.com');
>// App.accessRule('*.google.com'); //
>// App.accessRule('maps.googleapis.com');
>// App.accessRule('maps.gstatic.com');
>// App.accessRule('mt0.googleapis.com');
>// App.accessRule('mt1.googleapis.com');
>// App.accessRule('csi.gstatic.com');
>
>
> // <access origin="*://*.googleapis.com/*" subdomains="true" />
> //<access origin="*://*.gstatic.com/*" subdomains="true" />
> // <accessorigin="*://*.google.com/*" subdomains="true" />
> // <accessorigin="*://*.googleusercontent.com/*" subdomains="true" />
>
> App.accessRule('*');
你是什麼意思?我正在研究一個應用程序,該應用程序將使用帶有dburles包的谷歌地圖(就是你正在使用的),並且想知道交易在這裏。 –
@ B.ClayShannon我有白名單這兩個http和https協議和這個域'http://maps.googleapis.com/*',以便移動設備將允許我使用它 – Gardezi
所以它現在工作?你的「那種」讓我覺得你只是在那裏... –