Files
openlayers/examples/popup.html
2013-08-28 12:28:47 -06:00

98 lines
3.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<style type="text/css">
#vienna {
text-decoration: none;
color: white;
font-size: 11pt;
font-weight: bold;
text-shadow: black 0.1em 0.1em 0.2em;
}
#popup-container {
background-color: white;
padding: 15px 20px;
border-radius: 10px;
margin-left: -30px;
margin-bottom: 10px;
}
#popup-closer {
position: absolute;
top: 2px;
right: 8px;
}
#popup-arrow {
position: absolute;
bottom: 1px;
width: 0px;
height: 0px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid white;
}
</style>
<title>Overlay example</title>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="./">OpenLayers 3 Examples</a>
<ul class="nav pull-right">
<li><iframe class="github-watch-button" src="http://ghbtns.com/github-btn.html?user=openlayers&repo=ol3&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" height="20" width="90"></iframe></li>
<li><a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-hashtags="openlayers">&nbsp;</a></li>
<li><div class="g-plusone-wrapper"><div class="g-plusone" data-size="medium" data-annotation="none"></div></div></li>
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div id="map" class="map">
<div id="popup-container">
<a href="#" id="popup-closer"></a>
<div id="popup-content"></div>
<div id="popup-arrow"></div>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h4 id="title">Popup example</h4>
<p id="shortdesc">Uses an overlay to create a popup.</p>
<div id="docs">
<p>
Click on the map to get a popup. The popup is composed of a few basic elements: a container, a close button, a place for the content, and an element to represent the little arrow at the bottom. To anchor the popup to the map, an <code>ol.Overlay</code> is created with the popup container. A listener is registered for the map's <code>click</code> event to render the popup, and another listener is set as the <code>click</code> handler for the close button to hide the popup.
</p>
<p>
See the <a href="popup.js" target="_blank">popup.js source</a> to see how this is done.
</p>
</div>
<div id="tags">overlay, popup, mapquest, openaerial</div>
</div>
</div>
</div>
<script src="loader.js?id=popup" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>
</body>
</html>