【发布时间】:2014-09-05 04:29:26
【问题描述】:
我在使用 google maps API 实现视口标记管理时遇到了一些问题。我正在关注的文档可以在这里找到:
https://developers.google.com/maps/articles/toomanymarkers#viewportmarkermanagement
我正在使用的部分标题为“视口标记管理”。
到目前为止,我可以按照代码进行操作:
function showMarkers() {
var bounds = map.getBounds();
// Call you server with ajax passing it the bounds
// In the ajax callback delete the current markers and add new markers
}
我不知道我需要使用什么代码来完成注释行中的说明。如果这很重要,我目前正在从 mySQL 数据库中提取标记信息。我不确定我是否遗漏了什么,或者谷歌文档是否不够全面。任何帮助表示赞赏!
【问题讨论】:
-
哪一部分你不明白? AJAX 请求? MySQL 查询?删除/加载新标记的回调?
-
AJAX 请求和删除/加载新标记的回调是我坚持的。
-
好的。你在使用 jQuery 吗?或者你能用吗?
标签: javascript ajax google-maps google-maps-api-3