通过web-view嵌入一个h5页面,页面调用了谷歌地图,但小程序里不显示谷歌地图,请问怎么回事?

小程序 文章 2020-09-07 18:41 1031 0 全屏看文

AI助手支持GPT4.0

通过web-view嵌入一个h5页面,页面调用了谷歌地图,但小程序里不显示谷歌地图,请问怎么回事?Embed an h5 page through web-view, the page calls Google map, but Google map is not displayed in the applet, what's the matter?

通过web-view嵌入一个h5页面,页面调用了谷歌地图,但小程序里不显示谷歌地图,请问怎么回事?

写了一个h5页面,页面里使用谷歌地图的api,显示谷歌地图,在浏览器打开这个h5页面 显示没有任何问题,但将这个h5通过 放到小程序里后 谷歌地图显示不出来,除了谷歌地图外的其他元素都能正常显示, 域名那里设置了不校验了,请问怎么回事?

Write an H5 page, the page uses the Google map API to display Google map. There is no problem in opening the H5 page in the browser. However, after putting the H5 into the small program, Google map can not be displayed. Other elements except Google map can be displayed normally. The domain name is not checked. What's the matter?

回答:

谋谋谋:

不是吧 啊sir 谷歌地图你肯定是加不上业务域名的

拾忆:

web-view必须业务域名才能访问,谷歌地图你肯定是加不上业务域名的。

微喵网络:

真机必须校验

k:没有使用真机,就是在开发者工具上,而且设置了不校验域名了
微喵网络:调试看看有没有报错
k:web-view嵌入一个页面,能看到错误么,这个页面我在浏览器运行是没事的
微喵网络:能啊,模拟器里,网页上点右键

-EOF-

AI助手支持GPT4.0