问题标签 [yandex-maps]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - api yandex maps on different pages of wordpress site
I have 4 pages in wordpress site where i need to inculde api yandex maps. So i created 4 scripts, which works. I included script tags in my footer:
All scripts have different ids for div blocks, different variable names. But when i put my divs inside 4 pages, only the first script is working, in this example i will see map only on the page that contains this script
Other pages will be blank.
In browser it looks like this, so script is not working
If i load all 4 maps on 1 page it is working. But i want each map on certain page.
What should i do to get things work?
yandex - 在构造函数中移动 yandex 映射控制器
我可以使用 yandex 地图构造函数更改控件位置吗?我的地图控件看起来像这样
所以我需要将所有控件向右移动一点。使用 yandex API 我可以这样做:
但是我可以使用地图构造函数来达到它吗
javascript - 如何从 vuejs 中的 javascript 导出数据?
我有一个 vuejs 表单和一个纯 JS 的地图小部件。我需要从地图(vanilla js)中提取坐标到表单输入(vuejs)中。我怎样才能做到这一点?看法:
还有一个 vuejs 代码:
binding - Xamarin YandexMapKit Android 绑定
我正在尝试在我的 Xamarin 项目中使用适用于 Android 的 YandexMapKit。
我下载了最新版本的 YandexMapKit ( yandexmapkit-2.5.4.aar ),创建了 Xamarin.Android 绑定库并将其包含到我的项目中。但是在构建它之后我遇到了很多错误。我找到了这个项目:https ://github.com/pocheshire/Xamarin.YandexMaps.Android并从中使用了变换和添加。之后只剩下一个构建错误:
Error CS0542 'OverlayItem': member names cannot be the same as their enclosing type
在生成的源中,此块包含错误:
它是从这个 Java 块生成的:
如何在 Xamarin 项目中正确实现此功能?
谢谢。
javascript - 在yandex地图中的多边形内获取点击点的地址
我正在使用 yandex 地图来识别地址是否在特定公司的送货区域内。
我发现已经在地图中绘制多边形的工作示例( yandex 交付区 api )。它运作良好,但我需要在多边形内获取送货地址。
问题是,当我们点击多边形的区域时,我们无法获得点击点的地址。
如何获取多边形内的地址?
javascript - JS加载内容(Yandex Map)和android webview
我正在使用 webview 制作一个 web 应用程序。在应用程序中使用的站点的一个页面上,有一个内置的 Yandex 地图。在搭载 Android 4 及更低版本的设备上,不显示地图。我发现事件“ymaps.ready”,其中传递了“init”函数,它创建了一个地图的实例,不起作用。如果您在超时的情况下调用“init”函数,则会在该行中导致错误“Uncaught TypeError: undefined is not a function”
据我了解,尽管加载了 Yandex 库,但应用程序看不到 ymaps 对象。我试图从我的服务器加载 Yandex 库 - 结果相同。应用程序中的所有必要权限均已公开。setJavaScriptEnabled = 真。在 android 6 及更高版本中,会显示地图。有什么问题?谢谢!对不起我的英语。
代码如下:
javascript - 将数据从 firebase 异步加载到嵌入了 yandex 地图的 HTML 页面
我正在尝试将数据从 firebase 检索到嵌入了 yandex 地图的 html 页面。一切都很好,数据来了,但问题是数据是在地图渲染之后来的,所以任何标记都会显示
firebase.js
地图.js
试图将地图放置function(init)
在firebase的.then()
promice中,但没有成功。
尝试async
与 firebase 库脚本加载一起使用-同样的运气。
当从本地 js 文件 (arr.js) 加载相同的结构化数据时 - 一切正常:加载、显示、闪亮。提前致谢