返回信息流lz要在google地图的折现层上描线,
在用户还没提交表单时,将数组lat、lng初始化,用该数组的值描线(也就是没描线);
用户提交表单后,需要从数据库中读经纬度的值,如下所示:
<?php include("test.php");?>
lat = <?php echo json_encode($arrx);?>;
lng = <?php echo json_encode($newy);?>;
读到以后描线。
但实际情况是:
初始化根本不管用,一开始打开网页时从PHP获得的值已经将lz初始化之后的数组覆盖成了这个鬼样子:
<br />
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: before_day in E:\graduation_project\wamp\www\test.php on line <i>32</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0010</td><td bgcolor='#eeeeec' align='right'>138992</td><td bgcolor='#eeeeec'>{main}( )</td><td title='E:\graduation_project\wamp\www\googlemap.html' bgcolor='#eeeeec'>..\googlemap.html<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0010</td><td bgcolor='#eeeeec' align='right'>153096</td><td bgcolor='#eeeeec'>include( <font color='#00bb00'>'E:\graduation_project\wamp\www\test.php'</font> )</td><td title='E:\graduation_project\wamp\www\googlemap.html' bgcolor='#eeeeec'>..\googlemap.html<b>:</b>32</td></tr>
</table></font>
所以根本加载不出来地图,所以请教大神们lz该怎么搞,拜谢[ema1][ema1][ema11][ema11]
这是一条镜像帖。来源:北邮人论坛 / www-technology / #30587同步于 2015/6/25
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖
js引入google地图的一个小问题
bywyzypt
2015/6/25镜像同步6 回复
订阅后,新回复会通过你的通知中心匿名送达。
6 条回复
但是用户点击之前HTML中PHP的代码是乱码的
【 在 vampire24 (vampire24) 的大作中提到: 】
: ajax吧。用户点击提交后js从PHP那里把得来的值赋给相应的数组就行了吧。
通过『我邮2.0』发布
谢谢[ema11][ema11]
【 在 w353150777 (ICARUS) 的大作中提到: 】
: 不懂php。。帮顶
: 发自「贵邮」
通过『我邮2.0』发布
哦,好像懂了,谢谢点拨!!!很奇怪,我在电脑上发的时候是一堆乱七八糟的代码,可是用手机看竟然变成了运行出错愿意,我邮APP好强大?
【 在 bywyzypt (tenterhooks) 的大作中提到: 】
: lz要在google地图的折现层上描线,
: 在用户还没提交表单时,将数组lat、lng初始化,用该数组的值描线(也就是没描线);
: 用户提交表单后,需要从数据库中读经纬度的值,如下所示:
: ...................
通过『我邮2.0』发布