ChooseMap.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <html>
  2. <head lang="zh-CN">
  3. <meta charset="UTF-8">
  4. <meta name="viewport"
  5. content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  6. <meta name="mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <meta name="format-detection" content="address=no">
  10. <script type="text/javascript"
  11. src="https://3gimg.qq.com/lightmap/components/locationPicker2/js/main-62c2e3b971.js"></script>
  12. <title>locationPicker Components Demo - iframe</title>
  13. <style>
  14. * {
  15. margin: 0;
  16. padding: 0;
  17. }
  18. body,
  19. html {
  20. overflow: hidden;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <!-- 通过 iframe 嵌入地图选点组件 -->
  26. <iframe id="iframe" style="width:100vw;height:100vh" frameborder=0 scrolling="no"
  27. src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K&referer=Dingdong">
  28. </iframe>
  29. <script>
  30. window.addEventListener('message', function (event) {
  31. var loc = event.data;
  32. window.ReactNativeWebView.postMessage(JSON.stringify(loc))
  33. }, false);
  34. </script>
  35. </body>