-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
geo - polygonize function & geomap - dragBbox mode
- Loading branch information
Showing
12 changed files
with
360 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>drag example</title> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1"> | ||
<meta name="description" content="An example of drag modes"> | ||
<meta name="author" content="Ryan Westphal"> | ||
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/blitzer/jquery-ui.css" /> | ||
<link rel="stylesheet" type="text/css" href="css/style.css" /> | ||
<style type="text/css"> | ||
#map | ||
{ | ||
position: fixed; | ||
left: 0; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div> | ||
<div id="map"> | ||
</div> | ||
<div class="info"> | ||
<div class="links"> | ||
<a href="../" class="docLink">< docs</a> | ||
<a href="http://jsfiddle.net/ryanttb/==JSFIDDLE==/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle ></a> | ||
</div> | ||
|
||
<h1>drag</h1> | ||
|
||
<p>There is currently only one drag mode, dragBbox. This demo tests it.</p> | ||
</div> | ||
</div> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> | ||
<script src="../../js/excanvas.js"></script> | ||
<script src="../../js/jsrender.js"></script> | ||
<script src="../../js/jquery.mousewheel.js"></script> | ||
<script src="../../js/jquery.ui.widget.js"></script> | ||
<script src="../../js/jquery.geo.core.js"></script> | ||
<script src="../../js/jquery.geo.geographics.js"></script> | ||
<script src="../../js/jquery.geo.geomap.js"></script> | ||
<script src="../../js/jquery.geo.tiled.js"></script> | ||
<script src="../../js/jquery.geo.shingled.js"></script> | ||
<!--<script src="../jquery.geo-test.min.js"></script>--> | ||
<script> | ||
$( function ( ) { | ||
// create a map, setting the mode to dragBbox | ||
var map = $( "#map" ).geomap( { | ||
center: [ -71.0595678, 42.3604823 ], | ||
zoom: 8, | ||
mode: "dragBbox", | ||
shape: function( e, geo ) { | ||
// drag modes generate GeoJSON objects and send them as the geo argument | ||
// you can append them to the map | ||
map.geomap( "append", geo ); | ||
} | ||
} ); | ||
} ); | ||
</script> | ||
|
||
<script> | ||
var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']]; | ||
(function (d, t) { | ||
var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.async = 1; | ||
g.src = ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'; | ||
s.parentNode.insertBefore(g, s); | ||
} (document, 'script')); | ||
</script> | ||
</body> | ||
</html> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!doctype html> | ||
|
||
<html lang="en" class="no-js"> | ||
<head> | ||
<meta charset="utf-8"> | ||
|
||
<title>polygonize | $.geo</title> | ||
<meta name="description" content="jQuery Geo polygonize method"> | ||
<meta name="author" content="Ryan Westphal"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<link rel="stylesheet" href="../css/style.css?v=2"> | ||
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id="polygonize" data-role="page"> | ||
<div data-role="header" data-theme="b"> | ||
<h1>polygonize</h1> | ||
</div> | ||
|
||
<div data-role="content"> | ||
<table> | ||
<tr> | ||
<th>return type</th> | ||
<td>Array ( <a href="http://geojson.org/geojson-spec.html#polygon" rel="external">GeoJSON Polygon</a> ) </td> | ||
</tr> | ||
<tr> | ||
<th>syntax</th> | ||
<td>$.geo.polygonize( Array bbox ( <a href="http://geojson.org/geojson-spec.html#bounding-boxes" rel="external">GeoJSON bounding box</a> ) )</td> | ||
</tr> | ||
<tr> | ||
<th>usage</th> | ||
<td><pre><code>var polygon = $.geo.polygonize( bbox )</code></pre></td> | ||
</tr> | ||
</table> | ||
|
||
<p>The polygonize method creates a new Polygon with an outer ring that matches the rectangle covered by the bbox. The Polygon is closed and will have five coordinates.</p> | ||
|
||
<p>This function is a simplification/adaptation of the Polygonizer class in JTS. While the JTS object operates on the line work of geometry objects, this function operates on bounding boxes.</p> | ||
</div> | ||
</div> <!-- end of #container --> | ||
|
||
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> | ||
<script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script> | ||
<script src="../js/script.js"></script> | ||
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script> | ||
</body> | ||
</html> | ||
|
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
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
Oops, something went wrong.