asp.net中的Google Map的DOCTYPE问题 [英] DOCTYPE problem with google map in asp.net

查看:75
本文介绍了asp.net中的Google Map的DOCTYPE问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我尝试在asp应用程序中使用Google地图"Hello World",但是存在问题
当我删除DOCTYPE时,一切都很好,但是当我拥有时,那不会显示任何地图

我同时使用了以下两种DOCTYPE,但是它们都不适合我,你有什么主意吗?

Hi,
I try to use Google map ''Hello World'' in an asp application, but there is a problem
when i delete DOCTYPE every thing is fine but when i have, that doesn''t show any map

i used the both below DOCTYPEs but none of them works for me, do you have any idea?

<!DOCTYPE html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

推荐答案

发布标头的脚本部分以及一些地图脚本,这样我们就可以看到您做错了什么.

您是否在body标签的onload事件中加载了绘制地图?

页面或DOM必须已准备好,绘制地图也必须加载才能显示地图.因此DOM尚未准备就绪,或者您未加载函数.

这里是晚上11点,我要睡觉了.

post the script part of the header, and the some of the map script, so we can see what you did wrong.

Did you load the draw map in the body tag, onload event?

The page, or DOM has to be ready, and the draw map has to load, in order for the map to display. So either the DOM is not ready, or your not loading the function.

It''s 11pm here, i''m out to sleep.

<script>
  function initialize() {

    // Map initialization

  }
</script>
<body onload="initialize()">
  <div id="map_canvas"></div>
</body>


这篇关于asp.net中的Google Map的DOCTYPE问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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