We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我最近在研究如何解决vuepress静态站点页面显示地图,目前的想到解决方案是通过iframe内嵌的方式调用地图api,在md文件中传入经纬度和描述,在地图中标记地点并显示地点的名称信息,
目前的想到解决方案是通过iframe内嵌的方式调用地图api, 比如这样: `<iframe id="mapPage" width="100%" height="100%" frameborder=0 src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=your key&referer=myapp">
` 用户传入想locationPicker传入数据:22.547086,114.010066,,地图上标注地点,地图下边的列表中显示地址名称:广东省深圳市福田区侨香三道1号,传入多个地点则同时在地图上标注位置,并显示地址名称.
No response
The text was updated successfully, but these errors were encountered:
Not a common need
Sorry, something went wrong.
No branches or pull requests
Clear and concise description of the problem
我最近在研究如何解决vuepress静态站点页面显示地图,目前的想到解决方案是通过iframe内嵌的方式调用地图api,在md文件中传入经纬度和描述,在地图中标记地点并显示地点的名称信息,
Suggested solution
目前的想到解决方案是通过iframe内嵌的方式调用地图api, 比如这样:
</iframe> <script> window.addEventListener('message', function(event) { // 接收位置信息,用户选择确认位置点后选点组件会触发该事件,回传用户的位置信息 var loc = event.data; if (loc && loc.module == 'locationPicker') {//防止其他应用也会向该页面post信息,需判断module是否为'locationPicker' console.log('location', loc); } }, false); </script>`<iframe id="mapPage" width="100%" height="100%" frameborder=0 src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=your key&referer=myapp">
`
用户传入想locationPicker传入数据:22.547086,114.010066,,地图上标注地点,地图下边的列表中显示地址名称:广东省深圳市福田区侨香三道1号,传入多个地点则同时在地图上标注位置,并显示地址名称.
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: