如何运行jQuery代码(谷歌地图)?

时间:2014-07-18 12:39:29

标签: c# jquery asp.net google-maps

使用下面的代码,我想在我的页面添加地图。但是,当我复制粘贴它们时,它就像一个段落一样显示在体内。你能帮我吗?

$("#test").gmap3({
    map:{
      address:"POURRIERES, FRANCE",
      options:{
        zoom:4,
        mapTypeId: google.maps.MapTypeId.SATELLITE,
        mapTypeControl: true,
        mapTypeControlOptions: {
          style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
        },
        navigationControl: true,
        scrollwheel: true,
        streetViewControl: true
      }
    }
  });

1 个答案:

答案 0 :(得分:1)

我认为您需要退后一步并查看HTML的基础知识。您需要将javascript代码括在<script>标记中并添加到html页面。

基础知识的详细说明见 - Google Maps in HTML, ASP.NET, PHP, JSP etc. with ease

您正在编辑html以添加内容,因此它独立于c#。

相关问题