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
所以它现在工作?你的“那种”让我觉得你只是在那里... –