Skip to content
This repository
Browse code

Final prep for Alpha 3!

  • Loading branch information...
commit ee3a383419864cb550b2dc4a9e03dc82dc2067b2 1 parent bf9c009
Ryan authored

Showing 47 changed files with 5,644 additions and 499 deletions. Show diff stats Hide diff stats

  1. +3 0  README
  2. +46 9 dev-journal-ryan.txt
  3. +1 1  docs/examples/append.html
  4. +1 10 docs/examples/bbox.html
  5. +1 10 docs/examples/census.html
  6. +1 1  docs/examples/center.html
  7. +7 0 docs/examples/css/style.css
  8. +1 1  docs/examples/destroy.html
  9. +2 2 docs/examples/draw.html
  10. +142 0 docs/examples/drawStyle.html
  11. +1 10 docs/examples/empty.html
  12. +101 60 docs/examples/events.html
  13. +1 10 docs/examples/find.html
  14. +1 1  docs/examples/geo-geometry.html
  15. +1 1  docs/examples/geometry.html
  16. +2 2 docs/examples/hurricane.html
  17. +1 1  docs/examples/logo.html
  18. +1 1  docs/examples/mobile.html
  19. +1 1  docs/examples/mode-zoom.html
  20. +2 11 docs/examples/opacity.html
  21. +1 1  docs/examples/proj.html
  22. +1 10 docs/examples/remove.html
  23. +1 10 docs/examples/services.html
  24. +121 141 docs/examples/shapeStyle.html
  25. +1 1  docs/examples/shingled.html
  26. +1 1  docs/examples/simplest.html
  27. +1 1  docs/examples/template.html
  28. +1 1  docs/examples/tiledservices.html
  29. +1 1  docs/examples/tilingScheme.html
  30. +19 12 docs/examples/tracking.html
  31. +2 11 docs/examples/twitter-heat.html
  32. +7 9 docs/examples/usastates.html
  33. +1 1  docs/examples/utah/index.html
  34. +3 10 docs/examples/voting.html
  35. +1 9 docs/examples/wkt.html
  36. +1 1  docs/examples/zoom.html
  37. +1 1  docs/geomap/index.html
  38. +5 4 docs/index.html
  39. +4,826 0 docs/jquery.geo-1.0a3.js
  40. +128 0 docs/jquery.geo-1.0a3.min.js
  41. +56 35 docs/jquery.geo-test.js
  42. +52 51 docs/jquery.geo-test.min.js
  43. +2 2 docs/quickstart/index.html
  44. +38 19 index.html
  45. +4 4 js/jquery.geo.core.js
  46. +4 7 js/jquery.geo.geographics.js
  47. +48 24 js/jquery.geo.geomap.js
3  README
@@ -12,6 +12,7 @@ Documentation is hosted at http://jquerygeo.com
12 12 * docs - geomap - more modes: zoom, drawPoint, drawLineString, drawPolygon
13 13 * geomap - [bug] tiles do not show when pixel sizes are near or lower than 1.0
14 14 * geo - cache bbox as geoBbox to match namespacing convention started by jQuery Mobile
  15 +* docs - geo - initial bbox operations: center, height/width, expandBy, scaleBy & reaspect functions
15 16 * docs - geo - initial geometry operations: bbox, distance, contains, centroid
16 17 * docs - geomap - shape event
17 18 * docs - geomap - refresh argument in append, remove & empty
@@ -69,6 +70,8 @@ Documentation is hosted at http://jquerygeo.com
69 70 * docs - geomap - make pixelSize a read-only option instead of a function
70 71 * geomap - make pixelSize a read-only option instead of a function
71 72 * docs - geomap - make shapeStyle an option
  73 +* geomap - make shapeStyle an option
  74 +* examples - rewrite shapeStyle example
72 75
73 76 === 1.0a2.5 (2011-08-03) ===
74 77 * geomap - find - [bug] does not handle GeoJSON features
55 dev-journal-ryan.txt
... ... @@ -1,15 +1,7 @@
1 1 == to do ==
2 2
3 3 === 1.0a3 ===
4   -* geomap - make shapeStyle an option
5   -* geomap - [bug] changing services array (without changing all services) after initialization fails
6   -* geomap - [bug] multiple maps do not work on the same page
7   -* geomap - use _currentServices in all functions unless we actually need to update the public options services object
8   -* geomap - create _defaultState object, use for widget-local _widgetState property, reinit _widgetState on _createWidget
9   -* geomap - don't redraw shapes after interactiveScale, they've already been drawn at new scale
10   -* examples - geomap resize method
11   -* examples - multiple maps example
12   -* geomap - [bug] when a singled image hasn't loaded after pan and you double click on empty space, the zoomed bbox seems wrong
  4 +* examples - geomap drawStyle option
13 5
14 6 === 1.0a35 ===
15 7 * geomap - use profiling to improve pan performance
@@ -18,15 +10,27 @@
18 10 * geo - use Array.push instead of $.merge
19 11 * docs - upgrade to jQuery Mobile rc2
20 12 * docs - allow page refreshing
  13 +* geomap - [bug] changing services array (without changing all services) after initialization fails
  14 +* geomap - [bug] multiple maps do not work on the same page
  15 +* geomap - use _currentServices in all functions unless we actually need to update the public options services object
  16 +* geomap - create _defaultState object, use for widget-local _widgetState property, reinit _widgetState on _createWidget
  17 +* geomap - don't redraw shapes after interactiveScale, they've already been drawn at new scale
  18 +* examples - geomap resize method
  19 +* examples - multiple maps example
  20 +* geomap - [bug] when a singled image hasn't loaded after pan and you double click on empty space, the zoomed bbox seems wrong
  21 +* remove BOM from release files
  22 +* add 3rd party license headers
21 23
22 24 === future ===
23 25 * geomap - test jQuery widget call chaining when setting option values
  26 +* geomap - pan lags on first drag
24 27 * docs - geomap - more modes: measureDistance, measureArea
25 28 * docs - geomap - document the correct way to add a service after init
26 29 * docs - geo - detect geodetic coordinates and call $.geo.proj automatically, don't require devs to set $.geo.proj to null
27 30 * geo - detect geodetic coordinates and call $.geo.proj automatically, don't require devs to set $.geo.proj to null
28 31 * docs - geomap - append label argument
29 32 * geomap - port shape labels
  33 +* geomap - unbind keydown handler on destroy, it's on the document
30 34 * docs - $.geo.WKT object
31 35 * geo - $.geo.WKT object
32 36 * geomap - reenable graphics redraw on interactiveScale, if canvas...and scale canvas
@@ -46,6 +50,7 @@
46 50 * geo - support up to GeometryCollection in centroid
47 51 * docs - geo - empty function
48 52 * geo - geometry - empty function
  53 +* geomap - show a drawPoint style while the mouse is down, hide if toolPan or dbltap scale
49 54 * geomap - android - [bug] cannot always pan map after appending shapes
50 55 * geomap - deep extend existing service objects when services property is set
51 56 * geomap - cache point bbox if $.geo.proj is not null?
@@ -91,6 +96,38 @@
91 96 ** in the drawing modes, this function ends drawing and triggers the shape event with whatever coordinates have already been added to the shape
92 97 * geomap - drawStop
93 98
  99 +==2011-11-07==
  100 +===gzip===
  101 +I added gzip to jquerygeo.com & all subdomains. jQuery Geo (minified & gzipped) is now 17k and falling!
  102 +
  103 +===move===
  104 +I don't like that mouse move events seem laggy with this release. I need to find out what's different. I thought it was that I'm sending move events even while drawing that removing that hasn't helped.
  105 +
  106 +===drawing===
  107 +Wow, geomap._refreshDRawing was terrible and geographics._drawLines needed a little tweaking.
  108 +
  109 +===return false===
  110 +I didn't have any return falses at the end of my event handlers. I hope that plus the drawing fix makes panning better.
  111 +
  112 +Oops, I went too crazy and added too many and wasn't letting the browser grab events it needed. Chrome's type=number input went crazy up or down if you didn't move the mouse away.
  113 +
  114 +===chrome===
  115 +I've done what I can. The issue appears to be with Chrome or something I'm doing with Chrome. Drawing and panning speed is tremendous in IE9 and Firefox 7.
  116 +
  117 +===geolocation===
  118 +Wow, after any timeout, Firefox stops checking for watchPosition? Is that part of the spec? Nope, not part of the spec. Oh, it *is* part of the spec if it fails due to timeout. It does sound like it's not supposed to trigger until the position changes despite what you put in maximumAge.
  119 +
  120 +==2011-11-01==
  121 +===shapeStyle===
  122 +Time to redo the shapeStyle example in a much more awesome way.
  123 +
  124 +Did I miss something? jQuery UI widget factory isn't complaining that shapeStyle isn't an option on the widget even though I haven't added it yet.
  125 +
  126 +New demo is super-cool!
  127 +
  128 +===refreshShapes===
  129 +I almost had this function clear the shapes geographics until I realized that it's recursive if there's a GeometryCollection. Can't do that.
  130 +
94 131 ==2011-11-01==
95 132 ===refresh===
96 133 Cleaned up the wording for append, remove & empty. Also, going to have append allow style only, refresh only, or both.
2  docs/examples/append.html
@@ -33,7 +33,7 @@
33 33 </div>
34 34 </div>
35 35 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
36   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  36 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
37 37 <script>
38 38 $(function () {
39 39 // create a map
11 docs/examples/bbox.html
@@ -118,16 +118,7 @@
118 118 </div>
119 119 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
120 120 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
121   - <script src="../../js/jquery.geo.head.js"></script>
122   - <script src="../../js/excanvas.js"></script>
123   - <script src="../../js/jquery.mousewheel.min.js"></script>
124   - <script src="../../js/jquery.ui.widget.js"></script>
125   - <script src="../../js/jquery.geo.core.js"></script>
126   - <script src="../../js/jquery.geo.geographics.js"></script>
127   - <script src="../../js/jquery.geo.geomap.js"></script>
128   - <script src="../../js/jquery.geo.tiled.js"></script>
129   - <script src="../../js/jquery.geo.shingled.js"></script>
130   - <!--<script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>-->
  121 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
131 122 <script>
132 123 $(function () {
133 124 var $bboxInput = $(".bbox-prop input"); //< bbox input reference
11 docs/examples/census.html
@@ -24,16 +24,7 @@
24 24 <div id="map"></div>
25 25 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
26 26 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
27   - <script src="../../js/jquery.geo.head.js"></script>
28   - <script src="../../js/excanvas.js"></script>
29   - <script src="../../js/jquery.mousewheel.min.js"></script>
30   - <script src="../../js/jquery.ui.widget.js"></script>
31   - <script src="../../js/jquery.geo.core.js"></script>
32   - <script src="../../js/jquery.geo.geographics.js"></script>
33   - <script src="../../js/jquery.geo.geomap.js"></script>
34   - <script src="../../js/jquery.geo.tiled.js"></script>
35   - <script src="../../js/jquery.geo.shingled.js"></script>
36   - <!--<script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>-->
  27 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
37 28 <script>
38 29 $(function () {
39 30
2  docs/examples/center.html
@@ -65,7 +65,7 @@
65 65 </div>
66 66 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
67 67 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
68   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  68 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
69 69 <script>
70 70 $(function () {
71 71 // store references to the inputs
7 docs/examples/css/style.css
@@ -66,4 +66,11 @@ html
66 66 width: 95%;
67 67 }
68 68
  69 +fieldset { border: none; }
  70 +
  71 +legend {
  72 + font-size: 14px;
  73 + font-weight: bold;
  74 +}
  75 +
69 76
2  docs/examples/destroy.html
@@ -35,7 +35,7 @@
35 35 </div>
36 36 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
37 37 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
38   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  38 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
39 39 <script>
40 40 $(function () {
41 41 $("#map").geomap({
4 docs/examples/draw.html
@@ -41,8 +41,8 @@
41 41 </div>
42 42 </div>
43 43 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
44   - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
45   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  44 + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
  45 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
46 46 <script>
47 47 $(function () {
48 48 // create a map, setting mode to drawPoint initially
142 docs/examples/drawStyle.html
... ... @@ -0,0 +1,142 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <meta charset="utf-8" />
  5 + <title>drawStyle test</title>
  6 + <meta name="description" content="geomap drawStyle test" />
  7 + <meta name="author" content="Ryan Westphal" />
  8 + <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
  9 + <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/blitzer/jquery-ui.css" />
  10 + <link rel="stylesheet" href="css/style.css" />
  11 + <style type="text/css">
  12 + #map
  13 + {
  14 + position: fixed;
  15 + left: 0;
  16 + top: 0;
  17 + right: 0;
  18 + bottom: 0;
  19 + }
  20 +
  21 + label { white-space: nowrap; }
  22 +
  23 + label span { display: inline-block; width: 7rem; }
  24 + input { width: 6rem; }
  25 +
  26 + button { width: 16rem; }
  27 + </style>
  28 +</head>
  29 +<body>
  30 + <div class="drawStyle">
  31 + <div id="map">
  32 + </div>
  33 + <div class="info">
  34 + <div class="links">
  35 + <a href="../" class="docLink">&lt; docs</a>
  36 + <a href="http://jsfiddle.net/ryanttb/BXgV4/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
  37 + </div>
  38 + <h1>drawStyle</h1>
  39 + <p>This page tests various style properties using the drawStyle option to change the style displayed when a user is drawing shapes in drawLineString and drawPolygon modes.</p>
  40 + <div id="modes">
  41 + <input type="radio" id="drawPoint" name="mode" value="drawPoint" checked="checked" /><label for="drawPoint">point</label>
  42 + <input type="radio" id="drawLineString" name="mode" value="drawLineString" /><label for="drawLineString">line</label>
  43 + <input type="radio" id="drawPolygon" name="mode" value="drawPolygon" /><label for="drawPolygon">polygon</label>
  44 + </div>
  45 + <form id="drawStyle">
  46 + <fieldset>
  47 + <legend>geomap drawStyle option</legend>
  48 + <div>
  49 + <label><span>color</span> <input type="color" name="color" value="#7f0000" /></label>
  50 + <label><span>opacity</span> <input type="text" name="opacity" value="1.0" /></label>
  51 + </div>
  52 + <div>
  53 + <label><span>fill</span> <input type="color" name="fill" value="" /></label>
  54 + <label><span>fillOpacity</span> <input type="text" name="fillOpacity" value=".2" /></label>
  55 + </div>
  56 + <div>
  57 + <label><span>stroke</span> <input type="color" name="stroke" value="" /></label>
  58 + <label><span>strokeOpacity</span> <input type="text" name="strokeOpacity" value="1" /></label>
  59 + <label><span>strokeWidth</span> <input type="number" name="strokeWidth" value="2" /></label>
  60 + </div>
  61 + <div>
  62 + <label><span>width</span> <input type="number" name="width" value="8" /></label>
  63 + <label><span>height</span> <input type="number" name="height" value="8" /></label>
  64 + <label><span>borderRadius</span> <input type="number" name="borderRadius" value="8" /></label>
  65 + </div>
  66 + </fieldset>
  67 + <button type="button">set drawStyle</button>
  68 + <button type="reset">reset drawStyle</button>
  69 + </form>
  70 + </div>
  71 + </div>
  72 + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
  73 + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
  74 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
  75 + <script>
  76 + $(function () {
  77 + // create a map
  78 + var map = $( "#map" ).geomap( {
  79 + center: [ -71.0595678, 42.3604823 ],
  80 + zoom: 8,
  81 + mode: "drawPoint",
  82 + shape: function( e, geo ) {
  83 + // the shape event triggers when the user finishes drawing a shape
  84 + // the geo argument is a GeoJSON object representing the shape
  85 + // for this example, we'll append it to the map forcing an
  86 + // individual style that matches the current drawStyle
  87 +
  88 + // make a copy of the current drawStyle
  89 + var drawStyle = $.extend( { }, map.geomap( "option", "drawStyle" ) );
  90 +
  91 + // append the shape using that style
  92 + map.geomap( "append", geo, drawStyle );
  93 +
  94 + }
  95 + } );
  96 +
  97 + $( "#drawStyle input" ).change( function( ) {
  98 + // when an input of the drawStyle form changes,
  99 + // immediately set the property of geomap's drawStyle option
  100 +
  101 + // keep in mind that the three point-only styles (width, height & borderRadius)
  102 + // cannot be seen because with drawPoint, the shape event triggers immediately
  103 + // without drawing a shape
  104 + // this example, however, does use them when appending the shape after a click
  105 +
  106 + // first, we can grab a jQuery reference to the input that changed
  107 + var $this = $( this );
  108 +
  109 + // next, we can create an object that represents this change
  110 + // this example doesn't, but you can set more than one property
  111 + // on geomap's drawStyle option at a time
  112 + var styleOption = { };
  113 + styleOption[ $this.attr( "name" ) ] = $this.val();
  114 +
  115 + map.geomap( "option", "drawStyle", styleOption );
  116 + } );
  117 +
  118 + // jQuery UI for pretty buttons
  119 + $("#modes").buttonset();
  120 +
  121 + $("#modes input").click(function () {
  122 + // set the map's mode option based on value of the input clicked
  123 + // this will change the map's mode to drawPoint, drawLineString or drawPolygon
  124 + map.geomap("option", "mode", $(this).val());
  125 + });
  126 +
  127 + // jQuery UI for pretty reset buttons
  128 + $( "button" ).button( );
  129 +
  130 + // maintin a copy of the original drawStyle so we can reset it later
  131 + var originaldrawStyle = map.geomap( "option", "drawStyle" );
  132 +
  133 + $( "#drawStyle button[type='reset']" ).click( function( ) {
  134 + // when the user resets the drawStyle form,
  135 + // we want to also reset the drawStyle option
  136 + // back to its original state
  137 + map.geomap( "option", "drawStyle", originaldrawStyle );
  138 + } );
  139 + });
  140 + </script>
  141 +</body>
  142 +</html>
11 docs/examples/empty.html
@@ -21,16 +21,7 @@
21 21 </div>
22 22 </div>
23 23 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
24   - <script src="../../js/jquery.geo.head.js"></script>
25   - <script src="../../js/excanvas.js"></script>
26   - <script src="../../js/jquery.mousewheel.min.js"></script>
27   - <script src="../../js/jquery.ui.widget.js"></script>
28   - <script src="../../js/jquery.geo.core.js"></script>
29   - <script src="../../js/jquery.geo.geographics.js"></script>
30   - <script src="../../js/jquery.geo.geomap.js"></script>
31   - <script src="../../js/jquery.geo.tiled.js"></script>
32   - <script src="../../js/jquery.geo.shingled.js"></script>
33   - <!--<script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>-->
  24 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
34 25 <script>
35 26 $(function () {
36 27 var geomap = $(".geomap").geomap({
161 docs/examples/events.html
... ... @@ -1,9 +1,21 @@
1 1 <!DOCTYPE html>
2 2 <html>
3 3 <head>
4   - <title>Events test</title>
  4 + <meta charset="utf-8">
  5 + <title>events example</title>
  6 + <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
  7 + <meta name="description" content="An example of basic interaction events">
  8 + <meta name="author" content="Ryan Westphal">
5 9 <link rel="stylesheet" type="text/css" href="css/style.css" />
6 10 <style type="text/css">
  11 + #map
  12 + {
  13 + position: fixed;
  14 + left: 0;
  15 + top: 0;
  16 + right: 0;
  17 + bottom: 0;
  18 + }
7 19 th
8 20 {
9 21 text-align: left;
@@ -17,24 +29,17 @@
17 29 </style>
18 30 </head>
19 31 <body>
20   - <div>
21   - <a href="../" class="docLink">&lt; docs</a>
22   - <h1>
23   - Events test</h1>
24   - <div id="map" style="position: relative; width: 320px; height: 240px;">
  32 + <div id="events">
  33 + <div id="map">
25 34 </div>
26   - <fieldset>
27   - <legend>$.geo.proj</legend>
28   - <label>
29   - <input type="radio" name="proj" value="default" checked />
30   - default (map values are geodetic lon,lat)
31   - </label>
32   - <label>
33   - <input type="radio" name="proj" value="null" />
34   - null (map values are web mercator)
35   - </label>
36   - </fieldset>
37   - <table cellspacing="0">
  35 + <div class="info">
  36 + <div class="links">
  37 + <a href="../" class="docLink">&lt; docs</a>
  38 + <a href="http://jsfiddle.net/ryanttb/fg6wv/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
  39 + </div>
  40 + <h1>events</h1>
  41 + <p>The basic interaction events are: move, click, dblclick, and bboxchange. jQuery Geo triggers then when a user interacts with the map.</p>
  42 + <table cellspacing="0">
38 43 <thead>
39 44 <tr>
40 45 <th>
@@ -46,74 +51,110 @@
46 51 </tr>
47 52 </thead>
48 53 <tbody>
49   - <tr>
  54 + <tr class="geomapmove">
50 55 <td>
51   - move (<span class="movedate"></span>)
  56 + move (<span class="date"></span>)
52 57 </td>
53   - <td class="movedata">
  58 + <td class="data">
54 59 </td>
55 60 </tr>
56   - <tr>
  61 + <tr class="geomapclick">
57 62 <td>
58   - click (<span class="clickdate"></span>)
  63 + click (<span class="date"></span>)
59 64 </td>
60   - <td class="clickdata">
  65 + <td class="data">
61 66 </td>
62 67 </tr>
63   - <tr>
  68 + <tr class="geomapdblclick">
64 69 <td>
65   - dblclick (<span class="dblclickdate"></span>)
  70 + dblclick (<span class="date"></span>)
66 71 </td>
67   - <td class="dblclickdata">
  72 + <td class="data">
68 73 </td>
69 74 </tr>
70   - <tr>
  75 + <tr class="geomapbboxchange">
71 76 <td>
72   - bboxchange (<span class="bboxdate"></span>)
  77 + bboxchange (<span class="date"></span>)
73 78 </td>
74   - <td class="bboxdata">
  79 + <td class="data">
75 80 </td>
76 81 </tr>
77 82 </tbody>
78 83 </table>
  84 + </div>
79 85 </div>
80   - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
81   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  86 + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
  87 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
82 88 <script>
83 89 $(function () {
84   - var defaultProj = $.geo.proj;
85   -
  90 + // create a map
  91 + // hook into all the events and update the screen when they're triggered
  92 + // we don't need to prefix the events with the widget's name during initialization
86 93 var map = $("#map").geomap({
87   - move: function (e, geo) {
88   - $(".movedate").text($.now());
89   - $(".movedata").text("pixels: [ " + map.geomap("toPixel", geo.coordinates) + " ], coordinates: [ " + geo.coordinates + " ]");
90   - },
91   - click: function (e, geo) {
92   - $(".clickdate").text($.now());
93   - $(".clickdata").text("pixels: [ " + map.geomap("toPixel", geo.coordinates) + " ], coordinates: [ " + geo.coordinates + " ]");
94   - },
95   - dblclick: function (e, geo) {
96   - $(".dblclickdate").text($.now());
97   - $(".dblclickdata").text("pixels: [ " + map.geomap("toPixel", geo.coordinates) + " ], coordinates: [ " + geo.coordinates + " ]");
98   - },
99   - bboxchange: function (e, geo) {
100   - $(".bboxdate").text($.now());
101   - $(".bboxdata").text("[ " + geo.bbox + " ]");
102   - }
103   - });
  94 + center: [-71.0595678, 42.3604823],
  95 + zoom: 8,
104 96
105   - $("input[name='proj']").click(function () {
106   - switch ($(this).val()) {
107   - case "null":
108   - $.geo.proj = null;
109   - break;
  97 + // position events get a GeoJSON Point object
  98 + move: positionEventHandler,
  99 + click: positionEventHandler,
  100 + dblclick: positionEventHandler,
110 101
111   - default:
112   - $.geo.proj = defaultProj;
113   - break;
114   - }
  102 + // bbox events get an object with a bbox property
  103 + bboxchange: bboxEventHandler
115 104 });
  105 +
  106 + function positionEventHandler( e, geo ) {
  107 + // jQuery stores the event type in e.type
  108 + // outside of the initialization function,
  109 + // the jQuery UI widget events all have a widget prefix
  110 + // in this case it's: geomap
  111 +
  112 + // this example builds a selector for the class
  113 + // of the table's row for this event
  114 + // if the event is, e.g., move, e.type is geomapmove and the row we want is .geomapmove
  115 + var eventRowClass = "." + e.type;
  116 +
  117 + // update the time stamp for this event
  118 + $(eventRowClass + " .date").text($.now());
  119 +
  120 + // contained in the geo argument as a GeoJSON Point object
  121 +
  122 + // the coordinates property is an array,
  123 + // this example joins them with an extra space so they look a little nicer
  124 + var displayCoords = geo.coordinates.join( ", " );
  125 +
  126 +
  127 + // convert the map coordinates to pixel locations to show them as well
  128 + var displayPixels = map.geomap( "toPixel", geo.coordinates ).join( ", " );
  129 +
  130 + // update the position data
  131 + $(eventRowClass + " .data").html("pixels: [ " + displayPixels + " ]<br>coordinates: [ " + displayCoords + " ]");
  132 + }
  133 +
  134 + function bboxEventHandler( e, geo ) {
  135 + // again, build a selector for the class of the table's row for this event
  136 + // for example, the bboxchange event's e.type is geomapbboxchange
  137 + // and the row we want is .geomapbboxchange
  138 + var eventRowClass = "." + e.type;
  139 +
  140 + // update the time stamp for this event
  141 + $( eventRowClass + " .date" ).text( $.now( ) );
  142 +
  143 + // update the position data,
  144 + // contained in the geo argument as an object with a bbox property
  145 + // currently that's all the object has
  146 + $( eventRowClass + " .data" ).text( "[ " + geo.bbox.join( ", " ) + " ]" );
  147 + }
116 148 });
117 149 </script>
  150 +
  151 + <script>
  152 + var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']];
  153 + (function (d, t) {
  154 + var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.async = 1;
  155 + g.src = ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js';
  156 + s.parentNode.insertBefore(g, s);
  157 + } (document, 'script'));
  158 + </script>
118 159 </body>
119 160 </html>
11 docs/examples/find.html
@@ -13,16 +13,7 @@
13 13 <ul></ul>
14 14 </div>
15 15 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
16   - <script src="../../js/jquery.geo.head.js"></script>
17   - <script src="../../js/excanvas.js"></script>
18   - <script src="../../js/jquery.mousewheel.min.js"></script>
19   - <script src="../../js/jquery.ui.widget.js"></script>
20   - <script src="../../js/jquery.geo.core.js"></script>
21   - <script src="../../js/jquery.geo.geographics.js"></script>
22   - <script src="../../js/jquery.geo.geomap.js"></script>
23   - <script src="../../js/jquery.geo.tiled.js"></script>
24   - <script src="../../js/jquery.geo.shingled.js"></script>
25   - <!--<script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>-->
  16 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
26 17 <script>
27 18 $(function () {
28 19 var geomap = $(".geomap").geomap({
2  docs/examples/geo-geometry.html
@@ -189,7 +189,7 @@
189 189 </div>
190 190 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
191 191 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
192   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  192 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
193 193 <script>
194 194 $(function () {
195 195 // create a map
2  docs/examples/geometry.html
@@ -75,7 +75,7 @@
75 75 ready</div>
76 76 </div>
77 77 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
78   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  78 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
79 79 <script>
80 80 $(function () {
81 81 $("#cmdFrom").click(function () {
4 docs/examples/hurricane.html
@@ -60,7 +60,7 @@
60 60 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
61 61 <script src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>
62 62 <script src="js/iecors.js"></script>
63   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  63 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
64 64 <script>
65 65 $(function () {
66 66 $("#tmplHurricane").template("hurricane");
@@ -86,6 +86,7 @@
86 86
87 87 $.ajax({
88 88 url: "http://data.jquerygeo.com/hurricane.json",
  89 + dataType: "json",
89 90 success: function (result) {
90 91 var shapeStyle = {
91 92 color: "gray",
@@ -115,7 +116,6 @@
115 116 }
116 117 };
117 118
118   - //console.log("accuracy: " + trackPoint.properties.accuracy);
119 119 if (trackPoint.properties.date != null) {
120 120 var dateStr = trackPoint.properties.date.toString(),
121 121 year = dateStr.substr(0, 4),
2  docs/examples/logo.html
@@ -43,7 +43,7 @@
43 43 </div>
44 44 </div>
45 45 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
46   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  46 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
47 47 <script>
48 48 $(function () {
49 49 var dblClickTimeout = null, //< We use this timer to distinguish between click & dblclick, don't draw a logo on a dblclick
2  docs/examples/mobile.html
@@ -23,7 +23,7 @@
23 23 </div>
24 24 </div>
25 25 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
26   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  26 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
27 27 <script>
28 28 $(function () {
29 29 $("#map").geomap({
2  docs/examples/mode-zoom.html
@@ -41,7 +41,7 @@
41 41 </div>
42 42 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
43 43 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
44   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  44 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
45 45 <script>
46 46 $(function () {
47 47 // create a map, setting mode to zoom initially
13 docs/examples/opacity.html
@@ -39,7 +39,7 @@
39 39 <div class="info">
40 40 <div class="links">
41 41 <a href="../" class="docLink">&lt; docs</a>
42   - <a href="http://jsfiddle.net/ryanttb/==JSFIDDLE==/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
  42 + <a href="http://jsfiddle.net/ryanttb/kY5SC/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
43 43 </div>
44 44 <h1>opacity &amp; toggle</h1>
45 45 <p>The slider calls geomap's opacity method targeting the OSM service. The default service object doesn't have an id but it does have a class, osm, that we can reference using $(&quot;.osm&quot;). The button calls the toggle method. I've matched the map div's background color to OSM's water color for effect.</p>
@@ -55,16 +55,7 @@
55 55 </div>
56 56 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
57 57 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
58   - <script src="../../js/jquery.geo.head.js"></script>
59   - <script src="../../js/excanvas.js"></script>
60   - <script src="../../js/jquery.mousewheel.min.js"></script>
61   - <script src="../../js/jquery.ui.widget.js"></script>
62   - <script src="../../js/jquery.geo.core.js"></script>
63   - <script src="../../js/jquery.geo.geographics.js"></script>
64   - <script src="../../js/jquery.geo.geomap.js"></script>
65   - <script src="../../js/jquery.geo.tiled.js"></script>
66   - <script src="../../js/jquery.geo.shingled.js"></script>
67   - <!--<script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>-->
  58 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
68 59 <script>
69 60 $(function () {
70 61 // create a map
2  docs/examples/proj.html
@@ -75,7 +75,7 @@
75 75 ready</div>
76 76 </div>
77 77 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
78   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  78 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
79 79 <script>
80 80 $(function () {
81 81 $("#cmdFrom").click(function () {
11 docs/examples/remove.html
@@ -22,16 +22,7 @@
22 22 <div class="geomap" style="width: 640px; height: 480px;">
23 23 </div>
24 24 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
25   - <script src="../../js/jquery.geo.head.js"></script>
26   - <script src="../../js/excanvas.js"></script>
27   - <script src="../../js/jquery.mousewheel.min.js"></script>
28   - <script src="../../js/jquery.ui.widget.js"></script>
29   - <script src="../../js/jquery.geo.core.js"></script>
30   - <script src="../../js/jquery.geo.geographics.js"></script>
31   - <script src="../../js/jquery.geo.geomap.js"></script>
32   - <script src="../../js/jquery.geo.tiled.js"></script>
33   - <script src="../../js/jquery.geo.shingled.js"></script>
34   - <!--<script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>-->
  25 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
35 26 <script>
36 27 $(function () {
37 28 var geomap = $(".geomap").geomap({
11 docs/examples/services.html
@@ -34,16 +34,7 @@
34 34 </div>
35 35 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
36 36 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
37   - <script src="../../js/jquery.geo.head.js"></script>
38   - <script src="../../js/excanvas.js"></script>
39   - <script src="../../js/jquery.mousewheel.min.js"></script>
40   - <script src="../../js/jquery.ui.widget.js"></script>
41   - <script src="../../js/jquery.geo.core.js"></script>
42   - <script src="../../js/jquery.geo.geographics.js"></script>
43   - <script src="../../js/jquery.geo.geomap.js"></script>
44   - <script src="../../js/jquery.geo.tiled.js"></script>
45   - <script src="../../js/jquery.geo.shingled.js"></script>
46   - <!--<script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>-->
  37 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
47 38 <script>
48 39 $(function () {
49 40 // create a map
262 docs/examples/shapeStyle.html
@@ -6,169 +6,149 @@
6 6 <meta name="description" content="geomap shapeStyle test" />
7 7 <meta name="author" content="Ryan Westphal" />
8 8 <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
  9 + <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/blitzer/jquery-ui.css" />
9 10 <link rel="stylesheet" href="css/style.css" />
10 11 <style type="text/css">
11   - .styleDisplay:
  12 + #map
12 13 {
13   - max-width: 60%;
14   - }
15   - .geomap
16   - {
17   - width: 640px;
18   - height: 480px;
  14 + position: fixed;
  15 + left: 0;
  16 + top: 0;
  17 + right: 0;
  18 + bottom: 0;
19 19 }
  20 +
  21 + label { white-space: nowrap; }
  22 +
  23 + label span { display: inline-block; width: 7rem; }
  24 + input { width: 6rem; }
  25 +
  26 + button { width: 16rem; }
20 27 </style>
21 28 </head>
22 29 <body>
23 30 <div class="shapeStyle">
24   - <a href="../" class="docLink">&lt; DOCS</a>
25   - <h1>
26   - shapeStyle test</h1>
27   - <p>
28   - This page tests various style options and using the shapeStyle method to change the default style.</p>
29   - <h2>
30   - modify</h2>
31   - <p>
32   - Modify a style by changing options. Then choose a target style and click <b>set</b>.</p>
33   - <form action="" class="styleInputs">
34   - <fieldset class="global">
35   - <legend>global</legend>
36   - <label>
37   - <span>color</span>
38   - <input type="color" name="color" value="#7f0000" /></label>
39   - <label>
40   - <span>opacity</span>
41   - <input type="text" name="opacity" value="1.0" /></label>
42   - </fieldset>
43   - <fieldset class="visibility">
44   - <legend>visibility</legend>
45   - <label>
46   - <input type="radio" name="visibility" value="visible" checked="checked" />
47   - <span>visible</span></label>
48   - <label>
49   - <input type="radio" name="visibility" value="hidden" />
50   - <span>hidden</span></label>
51   - </fieldset>
52   - <fieldset class="stroke">
53   - <legend>stroke</legend>
54   - <label>
55   - <span>color</span>
56   - <input type="color" name="stroke" value="" /></label>
57   - <label>
58   - <span>opacity</span>
59   - <input type="text" name="strokeOpacity" value="1.0" /></label>
60   - <label>
61   - <span>width</span>
62   - <input type="text" name="strokeWidth" value="2px" /></label>
63   - </fieldset>
64   - <fieldset class="fill">
65   - <legend>fill</legend>
66   - <label>
67   - <span>color</span>
68   - <input type="color" name="fill" value="" /></label>
69   - <label>
70   - <span>opacity</span>
71   - <input type="text" name="fillOpacity" value="0.2" /></label>
72   - </fieldset>
73   - <fieldset class="size">
74   - <legend>point size</legend>
75   - <label>
76   - <span>width</span>
77   - <input type="text" name="width" value="8px" /></label>
78   - <label>
79   - <span>height</span>
80   - <input type="text" name="height" value="8px" /></label>
81   - <label>
82   - <span>borderRadius</span>
83   - <input type="text" name="borderRadius" value="8px" /></label>
84   - </fieldset>
85   - <fieldset class="target">
86   - <legend>target style</legend>
87   - <label>
88   - <input type="radio" name="target" value="defaultShapeStyle" checked="checked" />
89   - <span>default shapeStyle</span></label>
90   - <label>
91   - <input type="radio" name="target" value="appendStyle" />
92   - <span>append override</span></label>
93   - <button type="submit">
94   - set</button>
95   - </fieldset>
96   - </form>
97   - <h2>
98   - current</h2>
99   - <h3>
100   - default shapeStyle</h3>
101   - <div class="defaultShapeStyle styleDisplay">
  31 + <div id="map">
102 32 </div>
103   - <h3>
104   - append override</h3>
105   - <div class="appendStyle styleDisplay">
106   - </div>
107   - <h2>
108   - map</h2>
109   - <p>
110   - Choose to use either the default style or override the default style with the append override specified above. Click the map to add points.</p>
111   - <p>
112   - Any points you add with default shapeStyle selected will update when you change the default shapeStyle above.</p>
113   - <p>
114   - If you draw on the map with append override selected, the shape's final style will be based on the default style extended with the override style. If the append override is null or undefined, append uses the default style and the shape is susceptible to default shapeStyle changes.</p>
115   - <fieldset class="appendStyle">
116   - <legend>append style</legend>
117   - <label>
118   - <input type="radio" name="appendStyle" value="default" checked="checked" />
119   - <span>default shapeStyle</span></label>
120   - <label>
121   - <input type="radio" name="appendStyle" value="override" />
122   - <span>append override</span></label>
123   - </fieldset>
124   - <div class="geomap">
  33 + <div class="info">
  34 + <div class="links">
  35 + <a href="../" class="docLink">&lt; docs</a>
  36 + <a href="http://jsfiddle.net/ryanttb/BXgV4/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
  37 + </div>
  38 + <h1>shapeStyle</h1>
  39 + <p>This page tests various style properties using the shapeStyle option to change the default style or and passing a shape-specific style to the append method.</p>
  40 + <form id="shapeStyle">
  41 + <fieldset>
  42 + <legend>base geomap shapeStyle option</legend>
  43 + <div>
  44 + <label><span>color</span> <input type="color" name="color" value="#7f0000" /></label>
  45 + <label><span>opacity</span> <input type="text" name="opacity" value="1.0" /></label>
  46 + </div>
  47 + <div>
  48 + <label><span>fill</span> <input type="color" name="fill" value="" /></label>
  49 + <label><span>fillOpacity</span> <input type="text" name="fillOpacity" value=".2" /></label>
  50 + </div>
  51 + <div>
  52 + <label><span>stroke</span> <input type="color" name="stroke" value="" /></label>
  53 + <label><span>strokeOpacity</span> <input type="text" name="strokeOpacity" value="1" /></label>
  54 + <label><span>strokeWidth</span> <input type="number" name="strokeWidth" value="2" /></label>
  55 + </div>
  56 + <div>
  57 + <label><span>width</span> <input type="number" name="width" value="8" /></label>
  58 + <label><span>height</span> <input type="number" name="height" value="8" /></label>
  59 + <label><span>borderRadius</span> <input type="number" name="borderRadius" value="8" /></label>
  60 + </div>
  61 + </fieldset>
  62 + <button type="button">set shapeStyle</button>
  63 + <button type="reset">reset shapeStyle</button>
  64 + </form>
  65 + <form id="append">
  66 + <fieldset>
  67 + <legend>specific append style argument</legend>
  68 + <div>
  69 + <label><span>color</span> <input type="color" name="color" value="" /></label>
  70 + <label><span>opacity</span> <input type="text" name="opacity" value="" /></label>
  71 + </div>
  72 + <div>
  73 + <label><span>fill</span> <input type="color" name="fill" value="" /></label>
  74 + <label><span>fillOpacity</span> <input type="text" name="fillOpacity" value="" /></label>
  75 + </div>
  76 + <div>
  77 + <label><span>stroke</span> <input type="color" name="stroke" value="" /></label>
  78 + <label><span>strokeOpacity</span> <input type="text" name="strokeOpacity" value="" /></label>
  79 + <label><span>strokeWidth</span> <input type="number" name="strokeWidth" value="" /></label>
  80 + </div>
  81 + <div>
  82 + <label><span>width</span> <input type="number" name="width" value="" /></label>
  83 + <label><span>height</span> <input type="number" name="height" value="" /></label>
  84 + <label><span>borderRadius</span> <input type="number" name="borderRadius" value="" /></label>
  85 + </div>
  86 + </fieldset>
  87 + <button type="reset">clear append style</button>
  88 + </form>
125 89 </div>
126 90 </div>
127   - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
128   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
129   - <script src="js/json2.min.js"></script>
  91 + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
  92 + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
  93 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
130 94 <script>
131 95 $(function () {
132   - $("form.styleInputs").submit(function (e) {
133   - e.preventDefault();
  96 + // create a map
  97 + var map = $( "#map" ).geomap( {
  98 + center: [ -71.0595678, 42.3604823 ],
  99 + zoom: 8,
  100 + click: function ( e, geo ) {
  101 + // in the click handler append the shape to the map
  102 + // the final display style will be the base shapeStyle
  103 + // plus individual shape style property overrides via
  104 + // a style passed to the append method
  105 + var appendStyle = { };
134 106
135   - var style = {};
  107 + $.each( $( "#append input" ).serializeArray( ), function( ) {
  108 + // run through each input in the append fieldset and
  109 + // build a style object if there are any style overrides
  110 + if ( this.value ) {
  111 + appendStyle[ this.name ] = this.value;
  112 + }
  113 + } );
136 114
137   - $.each($(this).serializeArray(), function () {
138   - if (this.name != "target") {
139   - style[this.name] = this.value;
140   - }
141   - });
  115 + // append the shape
  116 + // it will get the base shapeStyle (which can change later)
  117 + // plus any overrides from the append style (which cannot change)
  118 + map.geomap( "append", geo, appendStyle );
  119 + }
  120 + } );
142 121
143   - var targetStyle = $("input[name='target']:checked").val();
  122 + $( "#shapeStyle input" ).change( function( ) {
  123 + // when an input of the shapeStyle section changes,
  124 + // immediately set the property of geomap's shapeStyle option
  125 + // this change will effect all appended shapes that don't have
  126 + // an explicit override for the style property that's changing
144 127
145   - if (targetStyle == "defaultShapeStyle") {
146   - geomap.geomap("shapeStyle", style);
147   - style = geomap.geomap("shapeStyle");
148   - } else if (targetStyle == "appendStyle") {
149   - appendStyle = style;
150   - }
  128 + // first, we can grab a jQuery reference to the input that changed
  129 + var $this = $( this );
151 130
152   - setStyleText(targetStyle, style);
153   - return false;
154   - });
  131 + // next, we can create an object that represents this change
  132 + // this example doesn't, but you can set more than one property
  133 + // on geomap's shapeStyle option at a time
  134 + var shapeOption = { };
  135 + shapeOption[ $this.attr( "name" ) ] = $this.val();
155 136
156   - var geomap = $(".geomap").geomap({
157   - center: [-76, 43],
158   - zoom: 5,
159   - click: function (e, geo) {
160   - geomap.geomap("append", geo, ($("input[name='appendStyle']:checked").val() == "override" ? appendStyle : undefined));
161   - }
162   - });
  137 + map.geomap( "option", "shapeStyle", shapeOption );
  138 + } );
163 139
164   - var appendStyle = null;
  140 + // jQuery UI for pretty reset buttons
  141 + $( "button" ).button( );
165 142
166   - setStyleText("defaultShapeStyle", $(".geomap").geomap("shapeStyle"));
167   - setStyleText("appendStyle", null);
  143 + // maintin a copy of the original shapeStyle so we can reset it later
  144 + var originalShapeStyle = map.geomap( "option", "shapeStyle" );
168 145
169   - function setStyleText(target, style) {
170   - $("." + target + ".styleDisplay").text(JSON.stringify(style).replace(/,/g, ', '));
171   - }
  146 + $( "#shapeStyle button[type='reset']" ).click( function( ) {
  147 + // when the user resets the shapeStyle form,
  148 + // we want to also reset the shapeStyle option
  149 + // back to its original state
  150 + map.geomap( "option", "shapeStyle", originalShapeStyle );
  151 + } );
172 152 });
173 153 </script>
174 154 </body>
2  docs/examples/shingled.html
@@ -43,7 +43,7 @@
43 43 </div>
44 44 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
45 45 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
46   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  46 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
47 47 <script>
48 48 $(function () {
49 49 // Set proj to null because we are working in map units
2  docs/examples/simplest.html
@@ -18,7 +18,7 @@
18 18 </div>
19 19
20 20 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
21   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  21 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
22 22 <script>
23 23 $(function () {
24 24 $("#map").geomap();
2  docs/examples/template.html
... ... @@ -1,8 +1,8 @@
1 1 <!DOCTYPE html>
2 2 <html>
3 3 <head>
4   - <title>TEMPLATE example</title>
5 4 <meta charset="utf-8">
  5 + <title>TEMPLATE example</title>
6 6 <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
7 7 <meta name="description" content="An example of TEMPLATE">
8 8 <meta name="author" content="Ryan Westphal">
2  docs/examples/tiledservices.html
@@ -128,7 +128,7 @@
128 128 </div>
129 129 </div>
130 130 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
131   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  131 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
132 132 <script>
133 133 $(function () {
134 134
2  docs/examples/tilingScheme.html
@@ -109,7 +109,7 @@
109 109 </div>
110 110 </div>
111 111 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
112   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  112 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
113 113 <script>
114 114 $(function () {
115 115
31 docs/examples/tracking.html
@@ -33,7 +33,7 @@
33 33 </div>
34 34 </div>
35 35 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
36   - <script src="http://jquerygeo.com/test/jquery.geo-test.min.js"></script>
  36 + <script src="http://code.jquerygeo.com/jquery.geo-1.0a3.min.js"></script>
37 37 <script>
38 38 $(function () {
39 39 var map = null;
@@ -41,19 +41,21 @@
41 41 function initMap(center) {
42 42 map = $("#map").geomap({
43 43 center: center || [-71.0597732, 42.3584308],
44   - zoom: 15
  44 + zoom: 15,
  45 + services: [
  46 + {
  47 + type: "tiled",
  48 + getUrl: function (view) {
  49 + return "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/" + view.zoom + "/" + view.tile.row + "/" + view.tile.column