简体   繁体   English

Ionic 2自定义Google Map本地信息窗口

[英]Ionic 2 custom google map native infowindow

I'm working with ionic 2 app and i'm trying to add a custom info window from an ionic template with native google map plugin but I'm not able to set the content. 我正在使用ionic 2应用程序,并且尝试通过具有本地Google Map插件的ionic模板添加自定义信息窗口,但无法设置内容。 Seems like ionic 2 does not support the infowindow object. 似乎ionic 2不支持infowindow对象。 Can I get some info or documentation about this? 我可以得到一些有关此的信息或文档吗?

In short words, I'm trying to do something like this: https://developers.google.com/maps/documentation/javascript/infowindows?hl=en-419 (open an info window section, html contentString) in ionic 2 with native google map plugin. 简而言之,我正在尝试执行以下操作:ionic 2中的https://developers.google.com/maps/documentation/javascript/infowindows?hl=zh-419 (打开信息窗口部分,html contentString)与本机谷歌地图插件。

Edit: Still trying to find a solution for this where I can use a custom template on infowindow content at @ionic-native/google-maps package, I already have it done with canvas but nothing about HTML. 编辑:仍然试图找到一种解决方案,我可以在@ ionic-native / google-maps包的infowindow内容上使用自定义模板,我已经用画布完成了,但是HTML无关。

Please take a look at: https://github.com/mapsplugin/cordova-plugin-googlemaps/wiki/Marker#base64-encoded-icon 请看一下: https : //github.com/mapsplugin/cordova-plugin-googlemaps/wiki/Marker#base64-encoded-icon

That's a workaround, because seems that it's not supported on version 1.x, but from the v2-beta supports HTML infoWindow, https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1022 . 这是一种解决方法,因为似乎1.x版本不支持它,但是从v2-beta开始,它支持HTML infoWindow, https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1022

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

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