doctype错误与谷歌地图 [英] doctype error with googlemaps
本文介绍了doctype错误与谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在尝试显示Google地图时遇到错误
I am having an error when I try to display googlemaps
如果我加载googlemaps javascript来源
If I load the googlemaps javascript source
在firebug中出现这个错误
I get this error in firebug
syntax error
[Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nmaps?fil...sor=false (regel 1)
我有这个加载文件
<?php if (isset($gmap))?><script type="text/javascript" src="<?php echo __PUBLIEK_PAD; ?>/js/<?php echo $gmap; ?>"></script>
以下是我如何设置变量
$key='my-api-key';
$this->view->gmap="http://maps.google.com/maps?file=api&v=2&key=".$key."&sensor=false";
$this->view->js_gmaptest = 'gmaptest.js';
这里有什么可以导致问题的东西吗?
我以前工作过,但知道我不知道了。
Is there something in here that can cause the problem? I had it working before, but know I don't know anymore.
谢谢,理查德
推荐答案
不确定这是否是问题,但文档的开头应该看起来像这样:
Not sure if it's the problem, but the documentation says the beginning of your document should look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
这篇关于doctype错误与谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文