无法在Google地图v3中保存航点 [英] Can't save waypoints in Google maps v3

查看:114
本文介绍了无法在Google地图v3中保存航点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了这个项目:

http://vikku.info/programming/google-maps-v3/draggable-directions/saving-draggable-方向保存道路点谷歌方向谷歌地图-v3.htm

为了如何保存航点,我打开了,HTML和尝试保存航点,但它不工作,我不知道我是否需要在SQL中执行某些操作,我只是试图使其工作,请帮助我,如果您已成功实现它。

解决方案

您必须:


  1. 名为 mapdir

  2. 的DB在此DB内部创建名为 mapdir 的表,该表应该只有一个名为 value 文本类型(在ZI中有一个文件mapdir.sql您可以使用它来创建表)

  3. 在process.php中,您必须编辑第5行并为 mysql_connect(servername,用户名,密码)

您还应该将process.php,第3行更改为

  @ $ data = $ _REQUEST ['mapdata']; 

....否则,您以后将无法在 error_reporting 已打开。



但是,我不会建议使用这个项目,因为它没有任何保护措施SQL注入。


I downloaded this project:

http://vikku.info/programming/google-maps-v3/draggable-directions/saving-draggable-directions-saving-waypoints-google-directions-google-maps-v3.htm

To se how to save waypoints, I opened, the html, and tryied to save the waypoint, but it don't work, I dont know if i need to do something in SQL or not, I just tryied to make it works, please help me if you had sucess to make it works.

解决方案

You have to:

  1. create a DB with the name mapdir
  2. create a table with the name mapdir inside this DB, the table should have only 1 field named value with the type text (there is a file mapdir.sql inside the ZIP-file, you may use it to create the table)
  3. inside process.php you must edit line#5 and set the correct values for mysql_connect(servername,username,password)

You also should change process.php,Line#3 to

@$data = $_REQUEST['mapdata']; 

....otherwise you later will not be able to load the waypoints when error_reporting is on.

But however, I wouldn't suggest to use this project like it is, there isn't any protection against SQL-injection.

这篇关于无法在Google地图v3中保存航点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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