简体   繁体   English

显示代号为1的空白Google地图

[英]Show blank google maps in codename one

I'm building a codename one mobile application and i need to fetch a blank google maps on which i can place icons showing my own coordinates (not places i can fetch through the google places api). 我正在构建一个代号为一个移动应用程序,我需要获取一个空白的Google地图,可以在该地图上放置显示自己坐标的图标(而不是我可以通过Google Places API获取的位置)。 How can i do that ? 我怎样才能做到这一点 ? Since i don't want to fetch anything other than a blank map, i wonder if i need a webservice for that. 由于我不想获取空白地图以外的任何东西,因此我想知道是否需要网络服务。 I have read that instantiating the MapContainer would show me a blank google map but i am stil getting a osm map (on both the emulator and a real Android 4.4 device). 我已经读过实例化MapContainer会向我显示一个空白的Google地图,但是我仍然在获取osm地图(同时在模拟器和真实的Android 4.4设备上)。 I have already done all the procedures required to get a key and all the steps of the maps demo work fine for me. 我已经完成了获取密钥所需的所有过程,并且地图演示的所有步骤对我来说都可以正常工作。 Now what i need to know is how to be able to get a blank map. 现在我需要知道的是如何获得空白地图。

Thank you advance for the answers. 谢谢您提前提供答案。

You get OSM on the device as a fallback when initializing the native map failed. 初始化本机映射失败时,您会在设备上获得OSM作为后备。 Make sure you followed the integration instructions as explained here . 确保遵循此处说明的集成说明。

You can debug the issue on an Android device by connecting the device with a cable and launching the DDMS tool from the Android command line SDK. 您可以在Android设备上调试问题,方法是使用电缆连接设备并从Android命令行SDK启动DDMS工具。 In 90% of the cases this means your SHA1 is different from the one defined in the maps API and this will be printed when you try to open the map. 在90%的情况下,这意味着您的SHA1与maps API中定义的SHA1不同,并且在您尝试打开地图时会打印出来。

On the simulator OSM is shown unless you provided the Google maps provider in the constructor. 除非您在构造函数中提供了Google地图提供程序,否则在模拟器上将显示OSM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM