SQL数据库中的Google地图 [英] Google Map from SQL Database

查看:193
本文介绍了SQL数据库中的Google地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在数据库中有一组坐标,我想在google地图上添加标记。我怎么会这样做?我的代码设置如下:

I have a set of coordinates in a database that I want to be used to add markers on a google map. How would I go about doing this? I have my code set up to look like:

http://www.macrostash.com/2011/09/17/demo-use-a -php-mysql-database-to-load-markers-on-a-google-map /

和数据库设置方式相同。然而,这个例子不能很好地工作。我对这个相当新,所以任何帮助将不胜感激。
感谢

and the database set up the same way. However the example isn't working well. I am fairly new to this so any help would be appreciated. Thanks

推荐答案

这是一个很好的教程!我得到它使用源代码链接从破碎的演示网站。 Handy,我一直在寻找这样的源代码。

That's a good tutorial! I got it to work using sourcecode links from the broken demo site. Handy, and I've been looking for a source like this.

您需要根据脚本需要组织数据表字段名,并详细说明正确的js,即jquery-1.6.2.min.js和jquery-ui -1.8.14.custom.min.js。因为后者是自定义的jquery代码,你不能只找到名为jquery-ui-1.8.14.custom.min.js的任何文件,并使用它,你必须使用自定义代码,我已经链接到它下面。

You need to organize your datatable fieldnames just exactly as the script requires, and also detail the proper js, namely jquery-1.6.2.min.js and jquery-ui-1.8.14.custom.min.js. Since the latter is custom jquery code, you can't just find any file named jquery-ui-1.8.14.custom.min.js and use it, you have to use the custom code, and I have linked to it below.

jquery-1.6.2.min.js(香草,但这里是链接):
http://www.macrostash.com/wp-content/plugins/jquery-1.6.2.min.js

jquery-1.6.2.min.js (vanilla, but here is the link): http://www.macrostash.com/wp-content/plugins/jquery-1.6.2.min.js

jquery-ui-1.8.14.custom.min.js
http://www.macrostash.com/wp-content/plugins/jquery-ui-1.8.14 .custom.min.js

jquery-ui-1.8.14.custom.min.js http://www.macrostash.com/wp-content/plugins/jquery-ui-1.8.14.custom.min.js

下载以上文件,然后将其上传到服务器上的js目录。之后,更新您的html以读取:

download the above files and then upload them to a js directory on your server. After that, update your html to read:

<script type='text/javascript' src='js/jquery-1.6.2.min.js'></script>
<script type='text/javascript' src='js/jquery-ui-1.8.14.custom.min.js'></script>

此后应该工作。

这篇关于SQL数据库中的Google地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆