我在应用程序中使用Google Map。场景是,当用户单击文本框时,将出现一个模态窗口,其中Google地图必须与搜索框一起显示。请注意,没有模式,它可以正常工作。但是当我使用引导模态时,现在谷歌地图在搜索框中显示正常,但是
1)搜索框自动完成功能不起作用。(但没有模式就可以工作)
2)当用户取消模型窗口并重新打开它时,SearchBox消失,并出现javascript错误“在新T6处无法读取null的属性'值'(places_impl.js:10)”
下面是我的完整代码。请任何人可以诊断问题?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GoogleMap.aspx.cs" Inherits="WingtipToys.GoogleMap" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Places Searchbox</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the …
Run Code Online (Sandbox Code Playgroud)