Last active
December 17, 2015 18:49
-
-
Save gborelli/5655577 to your computer and use it in GitHub Desktop.
collective.geo simple example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<title>collective.geo - Simple Map</title> | |
<link rel="stylesheet" | |
href="http://openlayers.org/dev/theme/default/style.css" | |
type="text/css"> | |
<link rel='stylesheet' href="http://twitter.github.io/bootstrap/assets/js/google-code-prettify/prettify.css"> | |
<style type="text/css"> | |
#map { | |
width: 100%; | |
height: 400px; | |
} | |
textarea { | |
width: 100%; | |
} | |
/* OpenLayers overrides */ | |
.olControlLayerSwitcher .maximizeDiv, | |
.olControlLayerSwitcher .layersDiv { | |
background-color: rgba(0, 60, 136, 0.6); | |
border-radius: 4px 0 0 4px; | |
color: white; | |
} | |
.olControlLayerSwitcher .maximizeDiv:after { | |
content: '+'; | |
font-size: 1.5em; | |
text-align: center; | |
margin-left: 4px; | |
line-height: 18px; | |
} | |
.olControlLayerSwitcher .maximizeDiv img { | |
display: none; | |
} | |
.olControlLayerSwitcher .layersDiv label { | |
display: inline-block; | |
line-height: 1em; | |
margin-top: 4px; | |
padding: 4px 0 0 0.5em; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="map" | |
class="widget-cgmap olMap" | |
data-cgeozoom="10.0" | |
data-cgeolatitude="45.07" | |
data-cgeolongitude="7.685676"> | |
</div> | |
<p>You can initialize a simple map with this snippet.</p> | |
<pre class="prettyprint linenums"><code class='r'><div id="map" | |
class="widget-cgmap olMap" | |
data-cgeozoom="10.0" | |
data-cgeolatitude="45.07" | |
data-cgeolongitude="7.685676"> | |
</code></pre> | |
<script type="text/javascript" | |
src="http://code.jquery.com/jquery-1.7.2.min.js"> | |
</script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/collective/collective.geo.openlayers/master/collective/geo/openlayers/browser/proj4js-1.0.0.min.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/collective/collective.geo.mapwidget/master/collective/geo/mapwidget/browser/static/collectivegeo.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/collective/collective.geo.mapwidget/master/collective/geo/mapwidget/browser/static/collectivegeo_init.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/prettify/188.0.0/prettify.js"> | |
</script> | |
<script | |
src='https://google-code-prettify.googlecode.com/svn-history/r232/trunk/src/lang-r.js'> | |
</script> | |
<script> | |
(function ($) { | |
prettyPrint(); | |
}(jQuery)); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment