Export 0.2.1
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0b2 / dev-journal-ryan.txt
1 == to do ==
2
3 === b2 ===
4 * geomap - delay refresh after append/remove/empty until some timeout; hook into interactiveTransform?
5 * geomap - [bug] mouse wheel & mac touchpads zoom too quickly
6 * geomap - [bug] setting zoom & then center on two lines does not zoom to the correct location
7 ** http://jsfiddle.net/dyTn9/11/
8 * docs - geomap - click mode
9 * geomap - click mode
10 * geomap - [bug] removing a shape from one service that has been appended to two services causes an error in the second service
11 * docs - geo - audit in-place geo calls, e.g., fromGeodetic
12 * geo - audit in-place geo calls, e.g., fromGeodetic
13 * geomap - convert MapQuest icon to data URI so we don't have to resolve developer.mapquest.com every time
14 * geomap - support Windows 8 Store apps
15 * test with zepto
16 ** zepto doesn't have Deferred, but we can drop support for Deferred services in zepto mode
17 * geographics - ie8 - append vml to text and set innerHTML once during refresh
18 * geomap - audit mousewheel timing & behavior vs. interactiveTransform
19 * docs - geomap - geo-attr class
20 * geomap - geo-attr class
21
22 === examples ===
23
24 * examples - jQuery Mobile
25 * examples - weather
26 ** http://openweathermap.org/example-json
27 * examples - MBCR: http://www.mbta.com/rider_tools/developers/default.asp?id=21899
28 * examples - drag shapes
29 * examples - ie7 - [bug] floating info div doesn't show up, inputs are alone and on the left
30 * examples - redo the jVectorMap demo page using jQuery Geo
31 * examples - make OSM editing simple
32 ** http://www.maploser.com/2012/03/29/all-i-want-for-openstreetmap-is-simple/
33 ** http://jvectormap.owl-hollow.net/ ( found via http://www.moretechtips.net/2011/12/22-most-popular-jquery-plugins-of-2011.html )
34 * examples - geomap resize method
35 * examples - Codecademy course
36 * examples - SVG & other neat elements/media in labels
37 * examples - continent puzzle
38 ** http://stephanmendler.de/thinkmaps/puzzle/index_en.html
39
40 === future ===
41
42 * geomap - map & map services type objects should refresh their own shapes after the map image (or tiles) has downloaded or after some timout
43 ** this could increase responsiveness in case the user interacts just slightly after it's time to refresh
44 ** it will also be required for plugin service objects
45 * geomap - [bug] using shift-zoom during interactiveTransform doesn't zoom to correct location
46 ** tiled maps only
47 ** not as noticeable now that the refresh timeout is shorter
48 * geomap - test changing shingled service URL to get updated images (in case of dynamic data)
49 * geomap - [bug] touchmove events trigger geomap move events even when the event is on a div above the maps
50 ** makes other parts of the UI feel sluggish
51 * geomap - stop using $.data to store bbox since it's only used for drawing; store on _graphicShapes instead
52 * geomap - [bug] exception when calling destroy on uninitialized div
53 * geomap - do not interactiveTransform non-tiled maps out past pixelSizeMax
54 ** pixelSizeMax is calculated by bboxMax on non-tiled maps
55 * geomap - [bug] multiples of the same event trigger after creating more than one map on the same div, even after destroy
56 ** destroy should unbind all geomap events
57 * geomap - [bug] there's an extra service.refresh call after a non-mousedown touchmove after a refresh
58 ** most noticeable on shingled services
59 * geomap - [bug] if panning is false, mode is draw*, and user attempts to pan, the drawing begins (or another point is added) on the touchstop point
60 ** a failed pan shouldn't add a point to drawCoords
61 * geomap - ie (8?) - [bug] ie highlights entire map div during shift-zoom
62 ** possibly only when axisLayout is image
63 * geomap - [bug] first use of mouse/touch in any mode moves map by one pixel on mousedown/touch
64 ** possibly only when axisLayout is image
65 * geomap - [bug] iPad 2 measureLength puts current length on second to last coord instead of last coord
66 * geomap - iPad 2 - [bug] pointAlong doesn't take last point into account in all browsers
67 ** cannot reproduce; possibly axisLayout image only
68 * geomap - include bboxMax in interactiveTransform engine
69 * docs - geomap - add indexMax property to service object to limit the view.index number so it can be used in template src
70 * geomap - add indexMax property to service object to limit the view.index number so it can be used in template src
71 * geomap - [bug] page scroll effects zoom center on fixed position maps
72 * geomap - clean up touch tracking
73 * geomap - support high-precision mice better in tiled maps
74 * geomap - don't repeat attr text if the same as one previously added
75 * docs - geomap - zoomMin, zoomMax on service object
76 ** determines if service is visible but doesn't change map interaction, only map zoomMax/zoomMin options do that
77 * geomap - zoomMin, zoomMax on service object
78 * geomap - [bug] errors when setting src to empty string
79 ** "When I added services for my graphics layers with src set to an empty string I got very weird results -- I was seeing the single image from my inset map repeated over and over.  I had to set it to a function that returns an empty string for it to work."
80 ** possibly an object reference error when multiple maps are created
81 * geomap - [bug] on two-finger scroll on some laptops, scroll zoom doesn't move much at first, then moves too fast
82 * geomap - remove this-style state properties
83 * geomap - add delegate handler for image load instead of one load handler per image
84 * docs - geomap - services option on actual services should return an array of the services in the selector
85 * geomap - services option on actual services should return an array of the services in the selector
86 * geomap - [bug] cannot wheel zoom in dragCircle mode
87 * geomap - users should be able to escape out of dragCircle
88 * geomap - [bug] cannot wheel zoom in dragBbox mode
89 * geomap - users should be able to escape out of dragBbox
90 * geomap - remove "px" from .css calls
91 * docs - geomap - bboxTiles option (the currently bounding tiles)
92 * geomap - bboxTiles option
93 * geo - use Array.push instead of $.merge where needed
94 * docs - upgrade to jQuery Mobile 1.1.0
95 * docs - non-mobile version via adaptive check
96 * geomap - [bug] centroid is wrong (for labels?) at high tile levels (19+)
97 ** see MapGeo showtiles switch
98 * geomap - [bug] changing services array (without changing all services) after initialization fails
99 * geomap - if a service is not visible, detach it's container from the DOM
100 * geomap - create _defaultState object, use for widget-local _widgetState property, reinit _widgetState on _createWidget
101 * geographics - draw to img elements to include in interactiveTransform 
102 * geographics - better support retna displays
103 ** http://mir.aculo.us/2012/06/26/flowchart-how-to-retinafy-your-website/
104 * geomap - see what knowledge Gamecore.js has to offer
105 ** http://blog.getplaycraft.com/gamecore-js/
106 * geomap - maybe throw an error when setting center to an invalid object, such as the first number in a coordinate array: coordinates[ 0 ] <== wrong!
107 ** oddly, iPod Touch 4 (iOS 4) is fine
108 ** might be related to the jQuery UI bug I found
109 * geomap - implement service-level shape redrawing during interactive movement
110 * geomap - use CSS transition or transform for smoother tiling
111 * geomap - don't request tiles that > max possible y for scale
112 * docs - geomap - view.service.row & view.service.column to string multiple services together or repeat horizontal tiles
113 * geomap - Firefox - [bug] inertial pan is choppy post touchstop
114 ** post inertial pan rewrite
115 * geomap - dragCircle must hook into _refreshDrawing so that the circle moves correctly when the user zooms; which means I have to store the center coordinate as well as pixel
116 * geomap - [bug] on that note, I can't zoom in dragCircle mode
117 * docs - better describe append/find connection and how to append data and use the click event to find it later
118 ** see email reply to Marc
119 * docs - geomap - describe "graphic service" as shingled with src set to empty string or null
120 * docs - warn users about potential CSS/JavaScript issues relating to generated elements
121 ** ul, li, div, span, img
122 * geomap - compile shingled & tiled string src templates for re-use
123 ** be sure their template names are unique so they don't overwrite each other
124 * geomap - don't redraw graphics if the map doesn't move during pan
125 * geomap - replace data-geo attributes with classes
126 * geomap - cache label coordinates (the labelPixel cannot be cached, it will change each refresh)
127 * geomap - rotate label based on segment
128 * geomap - use pointer-events: none where appropriate
129 * docs - geomap - allow template for label argument to append
130 * geomap - allow template for label argument to append
131 * docs - geomap - allow template for properties on style argument to append
132 * geomap - allow template for properties on style argument to append
133 * docs - geomap - shapeLabel property
134 ** template for labels for all shapes added via append
135 * geomap - tiled - retry failed requests once if status === 0 (failed)
136 * geomap - shapeLabel property
137 * docs - geomap - allow template for properties on shapeStyle option
138 * geomap - allow template for properties on shapeStyle option
139 * geomap - better integrate resize with interactiveTransform
140 * geomap - determine if moz-transform improves speed in Firefox
141 * geomap - [bug] once we detect a pan, disable the ability to go to multitouch
142 * geomap - [bug] verify label clamping is correct in axisLayout=image maps
143 * docs - geomap - pass the service id (if there is one) to the src callback as a view property
144 * geomap - pass the service id (if there is one) to the src callback as a view property
145 * docs - geomap - support dynamic map services that only work in geodetic coordinates (sr=4326)?
146 ** can be done with src function that uses $.geo.toGeodetic?
147 * geomap - support dynamic map services that only work in geodetic coordinates (sr=4326)?
148 * docs - geomap - pan events (pattern after HTML5 drag)
149 ** can cancel with preventDefault
150 * docs - geomap - zoom events (pattern after HTML5 drag)
151 ** can cancel with preventDefault
152 * docs - geomap - support two-finger vertical slide as zoom on mobile devices
153 * geomap - create own .position function b/c $.position is doing too much
154 ** we don't have to worry about border or margin, all elements are within map div
155 * geomap - pan events (pattern after HTML5 drag)
156 * geomap - zoom events (pattern after HTML5 drag)
157 * geomap - test jQuery widget call chaining when setting option values
158 * geomap - when scroll is zoom, attempt to not zoom while user is scrolling the page anyway
159 * docs - geomap - document the correct way to add/change a service after init
160 * geomap - unbind keydown handler on destroy, it's on the document
161 * geomap - use requestAnimationFrame instead of setTimeout when waiting to move the map during intractiveTransform
162 * expose jQuery Geo as an AMD module so asynchronous loaders like RequireJS and curl.js can use it
163 * cdn - test cache headers with http://redbot.org/ before release
164 * docs - $.geo.WKT object
165 * geo - $.geo.WKT object
166 * geomap - panning cursor (closed hand, for when user is actually panning)
167 * geomap - completely original cursor set for pan, zoom, draw, etc.
168 * docs - geomap - replace method
169 * geomap - replace method
170 * geomap - draw shapes to img and integrate with interactiveTransform
171 * docs & examples - settle on the word "option" in all text (instead of property) to match widget function
172 * docs - make all map examples live
173 * docs - explain the 96px scale bar, why 96?
174 * docs - write a full page about GeoJSON and what each object type is to $.geo
175 * docs - geomap - allow name as service object property
176 ** if a service has a name property, it will maintain a hidden input with the given name
177 * docs - geo - support up to GeometryCollection in distance
178 * geo - support up to GeometryCollection in distance
179 * docs - geo - support up to GeometryCollection in contains
180 * geo - support up to GeometryCollection in contains
181 * docs - geo - support up to GeometryCollection in centroid
182 * geo - support up to GeometryCollection in centroid
183 * geomap - show a drawPoint style while the mouse is down, hide if toolPan or dbltap scale
184 * geomap - audit allocations and reduce garbage
185 ** see http://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript
186 * geomap - re-use services that have the same id as existing services
187 * geomap - deep extend existing service objects when services property is set
188 * geomap - cache point bbox if $.geo.proj is not null?
189 * geomap - spatially index shapes when a tilingScheme is in place
190 * geomap - internal - add _getVisibleTiles method and use it in tiled service and shapes spatial index
191 * geomap - remove wheel plugin and use built-in mousewheel event
192 * geomap - test how the comma selector works with the find method
193 * geomap - compile service src templates, refresh when services changes
194 * geomap - audit destroy and memory leaks (jQuery data values, JavaScript object references, etc.)
195 * code - prefer $.data over $.fn.data
196 * docs - internal - explain what projection is and which one we use by default (3395) and maybe why we call it web mercator & why we can't get to +/- 90 lat
197 * docs - internal - document how geomap draws shapes, the geomapgraphics widget and the reason shapeStyle is a method
198 * docs - demo - location based notes/to do list
199 * geomap - find should check labels first
200 * geo - geometry - implement JTS note: "The centroid is equal to the centroid of the set of component Geometries of highest dimension (since the lower-dimension geometries contribute zero "weight" to the centroid)"
201 * geo - all bbox operations should be done in non-geodetic coordinates for accuracy
202 * geo - support bbox in distance ( fix geomap.find )
203 * geomap - perf test putting all containers that need to move with panning in a single super-container
204 * docs - geomap - multiple labels
205 * geomap - multiple labels
206 * docs/geomap - store WKT input for each service
207 * geographics - rename the generated style properties to something simple or get better control over closure compiler
208 * geomap - document and implement find's callback syntax
209 * geomap - custering demo/support
210 * proj - take scale factor into account when calculating distance in web mercator
211 * geographics - disable fill by setting style.fill to "" & stroke by style.stroke to ""
212 * geographics - See Modernizr for comment on BB Storm & canvas detection
213 * geographics - document graphics widget
214 * geographics - support border, padding, and margin
215 * geographics - undo manual outer div style changes
216 * geomap - store a copy of shapes as WKT in a hidden input
217 * geomap - only update WKT copy if shape is appended with refresh argument set to true
218 * geomap - find - [maybe] after flatten, check more cached bboxes for non-Point geometrie
219 * docs - geomap - support TMS
220 * geomap - support TMS
221 * docs - geomap - toDataURL method
222 * geomap - toDataURL method
223 * docs - geo - $.geo.guessLocation function
224 * geo - $.geo.guessLocation function
225 * docs - services - document the plugin architecture
226 * docs - geomap - drawPush function
227 ** in the drawing modes, this function starts drawing or adds a point into the already-started shape at the given coordinate
228 ** immediately triggers the shape event if mode is drawPoint
229 * geomap - drawPush function
230 * docs - geomap - drawPop function
231 ** in the drawing modes, this function ends drawing or removes a point into the already-started shape at the given coordinate
232 * geomap - drawPop function
233 * docs - geomap - drawStop function
234 ** in the drawing modes, this function ends drawing and triggers the shape event with whatever coordinates have already been added to the shape
235 * geomap - drawStop
236 * geomap - use profiling to improve pan performance
237 * geo - potentially add address cracking
238
239 ==2012-11-02==
240 ===shape functions===
241 I'm going to head into the realm of delaying refresh during shape operations: append, remove, and empty.
242
243 The issue is that users, including myself, forget to add the ", false" to append calls which makes the geographics widget refresh after every append. That needs to stop. It's a little better now with double buffering but not all devices (including Android) support that.
244
245 I'm also not sure about hooking into interactiveTransform. This might require it's own timeout but if I can hook into interactiveTransform, I still think that's the preferred options.
246
247 I certainly don't want to trigger interactiveTransform.
248
249 ==2012-11-01==
250 ===graphics===
251 It feels very slow without the timeout in place. Also, I still get a graphics jump if I pan after the services refresh but before all images come in. Most likely due to the service div resetting position and the graphics div not.
252
253 This isn't ready yet. I don't think attaching to the global "all images are done" is working how I wanted. I'm going to abandon it for now.
254
255 ===service type graphics===
256 I need to better design more specifically how this will work.
257
258 * Each service type's refresh method will get an array of graphics to draw.
259 * The service objects will maintain their own geographics widget.
260
261 I don't know, it's keeping up pretty well the way it was. I'm sure i can make the graphics rendering errors happen but I might be able to release this as b2.
262
263 Also, it could have been worse because of all the console writing I was doing, and having the debugger open.
264
265 ===labels===
266 It wasn't too hard to get labels moving again. % placement works well.
267
268 ===shape refresh===
269 I would still like to fix the timing of refreshShapes so that it's not so jumpy with wheel zoom. I wonder what it's like during pinch zoom though.
270
271 I could potentially do the refreshShapes inside the base interactive timeout. Then it can be canceled by more interaction.
272
273 That works quite well. That's exactly what I've been trying to do.
274
275 ===mouseWheelFinish===
276 It this function even used anymore? If so, why isn't it part of interactiveTransform?
277
278 ==2012-10-30==
279 ===graphics===
280 Yes, more graphics talk. It might be too much to move refreshShapes to the service objects. I would want more planning. The most I can do now is not call _refreshShapes until all services have finished or some timeout has occurred.
281
282 ==2012-10-29==
283 ===jster===
284 I added this project to jster.net. I think it looks nice on the list.
285
286 ==2012-10-28==
287 ===graphics===
288 I'm going to change how service type objects and refreshShapes works. Service types will need to draw their own shapes. Here are some notes:
289
290   The refresh method of the service type objects will get an array of all the shapes.
291   
292   The service types will initialize their own geographics if they wish and draw the shapes themselves.
293   
294   This will duplicate some code in tiled & shingled but better allow for custom service types.
295   
296   Might want to have the service type objects allow for some sort of inheritance.
297   
298   When refreshing shapes, current services should wait for all pending images to avoid graphics swap errors. However, there should be a long timeout in case the images or a tile takes way too long.
299   
300   On interactive transform, they will call the same method on their geographic widget.
301
302 I originally considered sending only view-relevent shapes to each service type but who is the map widget to decide?
303
304 I would like to further note that the shapes array sent to each service type's refresh method is not just an array of GeoJSON objects, it's contains all the internal stuff we track like shape-specific style. If the service type want's the layer's shapeStyle, it will have to ask for it, I think. Maybe that will change later.
305
306 This may or may not fix the flip issue. The map itself will have a special, fake shingled service (src is ""), that has all the map's graphics. They will not refresh until all images have completed downloading, user interaction is mostly done (time for a flip!) or a long timeout has been reached.
307
308 All of this will need to be WELL-documented before I release info about adding custom service types.
309
310 ==2012-10-25==
311 ===geographics flicker===
312 I am swapping buffers a little better now and I also have to force a swap if we get an interactiveTransform call after we've begun drawing the next scene.
313
314 This is not quite ready for production but it's a lot better than it was before yesterday.
315
316 ===android browser===
317 Android 2 doesn't have toDataURL so I have to disable doubleBuffer even if the option is set to true. I'm now feature testing for toDataURL.
318
319 ==2012-10-24==
320 ===graphics===
321 I'm going to hide labels during interactiveTransform but keep shapes for now.
322
323 I don't have to keep removing & creating the scene images, I can reuse them and swap. Double buffer FTW.
324
325 The timeout is going to be part of all graphics drawing, even non-true canvas. I might roll labels into the code as well.
326
327 ===labels===
328 I should build HTML apart from the labelsContainer and set the container's html once during _end. Wow. That's a lot faster. I can't believe I wasn't doing that before. I feel less worried about copying existing label elements at the moment.
329
330 ===flicker===
331 There's now too much flicker, especially with measure & drawing tools. I do need some kind of immediate mode...doubleBuffer option?
332
333 ==2012-10-23==
334 ===touchstop===
335 There is a serious issue with jQuery Geo and either iOS 6 and Android 4. I like to be the first one to say that jQuery Geo is far from perfect. But first, finish:
336
337 ===graphics===
338 I'm close, I think in light of more serious issues, once I get graphics drawing working as planned, I'm going to ignore label updates until I fix the touchstop bug. So, shapes will remain during interactive movement but labels will disappear.
339
340 ===graphics jump===
341 Similar to shingled, my graphics jump when I draw the new scene. I need to have an original /interactive/ image and a new final image. Currently, geographics DOM layout (in true canvas mode) is:
342
343 div.geo-graphics
344  |- img
345  \- div.geo-labels-container
346
347 Needs to be:
348
349 div.geo-graphics
350  |- img (back)
351  |- img (front)
352  \- div.geo-labels-container
353
354 And later it will finally be:
355
356 div.geo-graphics
357  |- div.geo-graphics-scene-container (back)
358  |   |- img
359  |   \- div.geo-labels-container
360  \- div.geo-graphics-scene-container (front)
361      |- img
362      \- div.geo-labels-container
363
364 ==2012-10-18==
365 ===graphics===
366 I'm drawing graphics to the canvas internally now and copying to an image tag for later transform. That second part is going to be hard.
367
368 ==2012-10-16==
369 ===shift===
370 There is still something wrong with the first "shift" drag. It's noticeable with the measure tools. If you set mode to "measureLength" and start measuring, your first shift-drag will pan instead. Your second shift-drag will create a marquee zoom box.
371
372 And what about dragCircle? That always seems to dragCircle no matter what shift is. It must follow a different path.
373
374 ===graphics===
375 I have to re-enable moving shapes and have two thoughts on how to change the graphics widget.
376
377 1.
378
379 - add public begin/end functions and leave it to geomap (or later, the developer) to call them
380 - end will copy the current canvas data to an img which ...
381
382 this is silly, I don't want to add more public methods than I have to. I need interactiveTransform but I think I want begin/end methods, but they should be private and happen behind the scenes. This leads me to my second option, internally calling end via a timer if we don't get another draw call within a requestAnimationFrame/timeout. It will call its internal end function. It will also call it if there's not image and the user calls interactiveTransform.
383
384 ==2012-10-15==
385 ===ie8 graphics===
386 A client noticed our graphics don't resize with the window on IE8. Not a suprise.
387
388 ===shift option===
389 It's silly to have mode change to zoom when the shift option is default and the mode is dragBox. It should stay on dragBbox unless the use purposefully sets the shift option to "zoom".
390
391 ==2012-10-11==
392 ===markers===
393 I need to release this demo tonight. It's been too long. It's finally done. What's next? b2 issues I suppose.
394
395 ===b2===
396 There are a few major issues I need to clean up. First, don't clear shapes while moving the map.
397
398 ==2012-10-09==
399 ===tiles===
400 Chris asked if geo provides the current tiles in view. That's not part of the design but I might add it in the future. A counter part to tilingScheme and zoom options. Maybe named bboxTiles.
401
402 ==2012-10-05==
403 ===point shape labels===
404 The width/height of the point shape style seems to change the position of the label. It shouldn't do that. Or, maybe it should. Why would a user want the label to be drawn over the shape when the shape is larger. If you're using point markers, you should know to use 0,0 width/height.
405
406 ==2012-10-04==
407 ===marker===
408 Twheat! 2 is out. Time to get back to making that marker demo people have been asking for. What to use for data? Maybe WA state boat launches, like in my other demo. That sounds fine.
409
410 I'm not going to add docs or rename .geo-labels-container. It's not needed if you use negative margins on the .geo-label CSS class.
411
412 In my canvas version of my marker demo, I think the image is taking too long to load, or rather the service is made visible too quickly. It's the right time for a jQuery Promise I think. Nah, I'll just refresh after the image loads.
413
414 ===click mode===
415 Peter wins. I'm going to add a click mode to the official list. It will be identical to drawPoint but trigger the click event instead of the shape event.
416
417 ==2012-09-30==
418 ===helping brazil===
419 I got a question from a student in brazil about jQuery Geo not rendering graphics. Here are some tips I told him:
420
421 There are no built-in limits in jQuery Geo. However, I can think of a few potential reasons why nothing is showing up.
422
423 1.  I don't usually have trouble with the number of coordinates in a polygon but the total amount of polygons. Too many polygons can cause browsers to stop responding. A combination of both (many coordinates and many polygons) will be even worse so it's always a good idea to generalize your data when you don't need it to be so accurate.
424 2.  When you append a lot of features with the append function, add a ", false" at the end to delay refreshing the map until all the features are in. You can call "refresh" on the map when you're done. Something like this: $.each(polygons, function() { map.geomap("append", this, false); }); map.geomap("refresh");
425 3.  Be sure that if your data is in lat/long, that you put the longitude first in any coordinates. Despite how they are generally spoken, longitude is an X coordinate and should come first in jQuery geo: center: [ -71 /*lon*/, 40 /*lat*/ ],
426 4.  When possible, store and draw your shapes in web mercator meters instead of lon, lat coordinates so jQuery Geo doesn't have to process them.
427 5.  When you are trying to draw a LOT of data, it's best to use a map server and render it as a shingled service in jQuery Geo. I recommend GeoServer for PostGIS.
428 6.  Lastly, try to get one polygon to render as a test first before attempting to render your whole country.
429
430 I think it's good advice.
431
432 ===tiger===
433 tiger has map services now, so, that's cool. They are running ArcGIS Server. I forget how to restyle layers in AGS. At least it's AGS 10 so we *can* change it. No we can't, that just determines a definition query. The layers do have a WMS service but it's an Esri one. I'm not sure if you can change the style in a URL. Each layer only has one style named: default. Maybe you can, with the SLD_BODY argument!
434
435 Here's an example, encodeURIComponent on something like this:
436
437 <sld:StyledLayerDescriptor xmlns:sld="http://www.opengis.net/sld" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><sld:NamedLayer><sld:Name>74</sld:Name><sld:NamedStyle><sld:Name/></sld:NamedStyle><sld:UserStyle><sld:Name>redStates</sld:Name><sld:Title>redStates</sld:Title><sld:FeatureTypeStyle><sld:Rule><sld:LineSymbolizer><sld:Stroke><sld:CssParameter name="stroke">#FF0000</sld:CssParameter></sld:Stroke></sld:LineSymbolizer></sld:Rule></sld:FeatureTypeStyle></sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>
438
439 Good luck getting that to look nice in code :/
440
441 I made it smaller. Oh, and you can't send that to Esri's REST API because it's a WMS parameter. Ignoring it for now. That's too bad, it would really add to my TIGER demo.
442
443 ==2012-09-29==
444 ===twheat===
445 I'm going to release the new version to Twheat! tonight, Twheat! 2.
446
447 ===range===
448 There's an issue with jQuery Geo and Chrome's handling of the range input. Chrome doesn't stop tracking the mouse, likely because we're cancelling the mouseup event.
449
450 ==2012-09-21==
451 ===gaming===
452 A month break (well, a couple bug fixes & a b1.1 release between) to play some games. Also, I did get it running as a desktop (Store) app in Windows 8 & will post about that later.
453
454 ==2012-08-24==
455 ===center/zoom options===
456 Ishmael has found some errors with setting zoom & center options. Specifically, if you set the zoom first and then the center, the final image doesn't refresh properly.
457
458 http://jsfiddle.net/dyTn9/11/
459
460 ==2012-08-22==
461 ===shapeStyle===
462 Somethings wrong with setting shapeStyle at init. I'm not sure this is a problem. I think I was appending to a service and didn't set the service's shape style, was setting the map's shapeStyle. Phew!
463
464 ===default service===
465 There really needs to be a way to get a copy of the default service object. Perhaps just the string: default?
466
467 $("#map").geomap( {
468   services: [
469     "default",
470
471     {
472       id: "my-service",
473       type: "shingled",
474       src: ""
475     }
476   ]
477 } );
478
479 I kind of like that. Maybe I should go further and include other strings: "osm", "toposm", "mq-o", "mq-oa", "bing", "esri-wsm", "esri-demo-*"
480
481 That's a lot of extra objects to have hanging around. I might not want to go that far. Also, with a string, there's no way to set opacity or visibility. I'll think further.
482
483 ===socrata===
484 At Evergreen Apps Challenge in Spokane, WA. Socrata has some great data/APIs! I need a section in here on data/map endpoints.
485
486 ==2012-08-20==
487 ===drawPolygon===
488 There's an error in my culling logic where I get a bbox that has xmax and ymax that are smaller than the minimum.
489
490 I just noticed I don't double buffer drawLineString or drawPoint!
491
492 ===zoom class!===
493 I had what I think is a great idea today. I can have a class on the map div that changes based on zoom, e.g., .geo-zoom-7. It won't help as much for non-tiled maps but it would be great to show/hide labels for tiled maps. Hide labels at world scale:
494
495 .geo-zoom-0 .geo-label { display: none; }
496
497 :)
498
499 Although, maybe it should be a data selector: [data-zoom='0'] .geo-label
500
501 That will be slower but looks nicer. I'm not sure.
502
503 ==2012-08-14==
504 ===Deferred===
505 I fixed that issue. _cancelUnloaded was correctly removing image elments but the load event still fired and old images removed unloaded, but correct, images before they could be shown. Nice error!
506
507 ==2012-08-13==
508 ===Deferred===
509 Here's a fiddle that shows the Deferred missing image on shingled service issue: http://fiddle.jshell.net/ryanttb/nZMEV/show/
510
511 jQuery Geo gets the images but none are shown in the map frame after all is said & done.
512
513 ==2012-08-08==
514 ===image===
515 There's a GigaPan of an Olymic Women's Volleyball tournament. It's a quadkey-based tile system and I can implement it in Geo. Here are some notes:
516
517       some gigapan tile ids
518 http://tile111.gigapan.org/gigapans0/111225/tiles.83f6152eea5140f76880a283c3479288//rXX/rXXYYY.jpg
519 http://tile111.gigapan.org/gigapans0/111225/tiles.83f6152eea5140f76880a283c3479288//rXX/YYY/rXXYYYZ.jpg
520
521 level 0:
522 r00/r000.jpg r00/r001.jpg r01/r010.jpg r01/r011.jpg r10/r100.jpg r10/r101.jpg
523 r00/r002.jpg r00/r003.jpg r01/r012.jpg r01/r013.jpg r10/r102.jpg r10/r013.jpg
524
525 level 1:
526 r00/r0000.jpg r00/r0001.jpg r00/r0010.jpg r00/r0011.jpg 
527 r00/r0002.jpg r00/r0003.jpg r00/r0010.jpg r00/r0011.jpg 
528
529 ==2012-08-07==
530 ===labelsContainer===
531 Since this is always positioned relative to the graphics container, I think I can tell developers that it exists, has the class geo-labels-container and that they can offset it. That would be the best way to get image markers with an offset center. However, I think I'm going to rename it .geo-labels instead because it's shorter.
532
533 .geo-map
534   .geo-service
535     .geo-labels
536       .geo-label
537   .geo-service
538   .geo-service
539   .geo-labels
540     .geo-label
541
542
543 ==2012-07-31==
544 ===beta===
545 1.0b1 is out. I hope people like it.
546
547 ===wkt===
548 I will need to test bad input later so that there aren't JavaScript errors even when I will be returning null.
549
550 ===b2===
551 No rest.
552
553 ==2012-07-28==
554 ===multitouch status===
555 Here's some code to render multitouch status to an h1 tag. For future reference/debugging:
556
557           $("h1").html("multitouch {<br>" + 
558             "anchorDistance: " + anchorDistance + "<br>" +
559             "currentDistance: " + currentDistance + "<br>" +
560             "delta: " + ( ( currentDistance - anchorDistance ) / anchorDistance * 5 ) + "<br>" +
561           "}" );
562
563 Place it in touchmove.
564
565 ===multitouch refresh===
566 I'm disabling refresh during multitouch and it makes the whold multitouch experience better, I think.
567
568 ===zoomMin===
569 I'm going to fit this in for b1; might as well complete the API.
570
571 ==2012-07-26==
572 ===mouse===
573 Peter's mouse can't wheel zoom easilly. It's a high precision mouse and it doesn't click when you scroll it. I have a feeling I'm getting .25 delta and it's rounding down to zero.
574
575 ===iOS touch===
576 I have to stop killing the document events on iOS. Phew! I wasn't shutting _inOp off after multitouch ends.
577
578 ==2012-07-26==
579 ===zoomMax===
580 Seems to work ok with tiled & shingled. I think I should document and add zoomMin this weekend.
581
582 ===pixelSizes===
583 That bug where rendering zoom 0 with string src...this one:
584
585 * geomap - [bug] tiled services with pixelSizes set do not render zoom level 0, when src is a template string
586
587 appears to have been fixed with the latest jsRender for me. Here's a jsFiddle to prove it: http://jsfiddle.net/ryanttb/RNrNC/
588
589 ==2012-07-25==
590 ===zoomMax===
591 Only clamp if it's *over* the zoomMax value.
592
593 ===shapeStyle===
594 Since I'm not creating geographics widgets (or elements) for layers during startup, the shapeStyle property doesn't work.
595
596 ==2012-07-24==
597 ===refresh tiles===
598 I'm going to see if I can set jQuery Geo up to load tiles faster on faster browsers. Depending on how fast the initial refresh runs, I can decrease the timout delay.
599
600 ===click===
601 The y value of a clicked coordinate is off a little. I'm creating a jsFiddle to find out what's up. It's not off. Something in their website is messing up my calculations for map point location.
602
603 ===refresh===
604 Wow, I didn't notice until now that the new interactiveTransform code wasn't triggering refresh if the user was moving the mouse, even if they weren't actively panning. That's a good one to not have in b1 :)
605
606 ===zoomMax===
607 I have too much redundant code calculating/testing agains zoomMax. I need to specify which functions don't test agains it. Likely _getPixelSize should not but _getZoom should.
608
609 ==2012-07-22==
610 ===force===
611 There is code from our original implementation to reload tiles. It is no longer being triggered. I'm wondering if I should remove it. There is also code for dirty tiles. They are removed at the end of refresh. I'm not sure I need to keep that code in there because I don't think it's being triggered either.
612
613 ==2012-07-20==
614 ===jsRender===
615 There's new syntax for default templating. It uses the {{>var}} syntax. I think the old one is still valid, {{:var}} but the new one is preferred. I will change jQuery Geo to use the new one by default. I should also change the docs. Ah, no, it's new syntax to do HTML encoding. I'll have to check the measure templates but I think I will go with higher performance {{:var}}.
616
617 ===refresh===
618 I need to take control of when this is called so I can handle service-level refresh properly.
619
620 That's better. _refresh will only run on the map itself and calls _refreshShapes on all the service objects.
621
622 ===interactiveTransform===
623 I turned the timeout back up to 500. Panning was no longer happy in IE with some shapes to manage.
624
625 ==2012-07-13==
626 ===interactiveTransform===
627 A side effect of the way I'm doing interactiveTransform is that changes to the widget options bbox, center, and pixelSize aren't immediately available. I need to at least update the public options during each change. That may be a little expensive because I will have to do projection but is necessary.
628
629 Ok, I think that's better, except that I forgot the zoom option. Added.
630
631 ===tile query===
632 I've decreased the delay to begin checking for new images from 500ms to 256ms. There's a balance here somewhere.
633
634 ==2012-07-10==
635 ===dragCircle===
636 Time to move this into _refreshDrawing. But first, I have to trigger the Point shape event. Maybe not. I can't zoom. That's against the docs but I think I can leave it for b2.
637
638 ==2012-07-07==
639 ===dragCircle===
640 I'm going to add this to beta. It will work similar to dragBbox, including sending the bbox.
641
642 ===dragBbox===
643 I may rename this to dragRectangle before the b1 release to keep the drawing modes more about geometry than geography.
644
645 ==2012-07-06==
646 ===bboxMax===
647 A side effect of changing bboxMax is that zoom's value will have to change. This means that changing bboxMax should refresh the map services.
648
649 There's going to be more to do later when I want to handle changing bboxMax properly at runtime. It should hook into the interactiveTransform engine. For now, though, I'm going to make it work right during init.
650
651 Heh, bboxMax wasn't doing anything right :) It now sets both centerMax & pixelSizeMax.
652
653 ===inset===
654 A new example is up based on AppGeo's MapGeo product's inset map.
655
656 ===dragBbox===
657 This needs to finally send a bbox. Also, handle points differently. No more click event but you will get a Point shape event.
658
659 ==2012-07-05==
660 ===inset shingled map is off===
661 If I pre-render an inset map and use a shingled service, the extent box is wrong vs. what we see on the map.
662
663 ===bboxMax===
664 Initializing this property should set _userGeodetic because sometimes you want to init with bboxMax: [], zoom: 0.
665
666 ==2012-06-22==
667 ===client work===
668 I finished the docs last time, then client work stopped me from finishing the code.
669
670 ===bostock===
671 In implementing the Bostock demo, I found a bug in jQuery Geo. There's a way around it but it's a little slower. The bug will go away when I fix bbox storage on appended shapes.
672
673 ==2012-06-07==
674 ===vacation===
675 I've been away for almost two weeks. Time to finish b1.
676
677 ===zoomMax===
678 This is where I left off. I'm also considering zoomMin and zoomMax on service objects but that's not until later if needed.
679
680 ==2012-05-23==
681 ===tiled===
682 The new origin stuff appears to work better. I'm going to run through the other examples & see if I'm ready for a build.
683
684 ===chrome===
685 Chrome's screen tearing is really bad. I'm going to try to disable 3d transform in Chrome. Maybe it's just my laptop, Chrome is doing the tearing even without translateZ. I'm reverting the changes for that test.
686
687 ===bbox===
688 I'm getting a bbox event after a single tap.
689
690 ===setInteractiveTimemout===
691 I need to only call this if: a) it's already been called once (to keep it going) & b) we actually change centerInteractive or pixelSizeInteractive.
692
693 The programatic changes are going to be a part of this, too. I need a way to turn on trigger during setInteractiveTimemout.
694
695 ===programatic===
696 I updated all the programatic calls to use the new system with the ability to say not to trigger. I will need to test these but for now, I do think I'm finally ready to merge.
697
698 ===merge===
699 I merged the interactive rewrite into b1. There are bugs that I will have to work through before this becomes beta.
700
701 ===initial zoom===
702 No matter what your initial zoom is, you can see the map at zoom 0 before the new tiles show up. That makes sense given the changes I've made.
703
704 ok, the area that handles init options checks to see if the widget has been created before heading into intractiveTransform mode.
705
706 ===ie8===
707 I *know* ie8 support is broken. I haven't even tried it yet. We will keep supporting that browser, though.
708
709 ==2012-05-22==
710 ===mouseup===
711 I'm ignoring rogue mouseup events now. Hopefully, that will clean resize up a bit on Chrome & Firefox.
712
713 ===resize===
714 Seems to work like it did before. I'm going to increase the frequency (decrease the timeout) of the resize check. In the future, I want the resize in two parts, one to move stuff around in real time/animationFrame time, another to perform the final refresh. Maybe move the latter back up to 500ms? Maybe not.
715
716 67ms is too soon, Chrome flickers. I'm bumping it back up to 500ms for now.
717
718 This should really be part of the new interactiveTransform code. At least, moving the images around and waiting for the final setCenterAndZoom. The issue I'm seeing with tiled now is that if I pan and the resize before the new tiles come in, the map jumps from the interactive to the final center. Same with shingled.
719
720 For now, I think I may be done enough with this to merge back into the main project. That's a lie. I disabled a bunch of stuff before doing this, like marquee zoom. Any of the immediate mode changes.
721
722 ===immediate===
723 I'm going to try to tie these into the new interactiveTransform.
724
725 ===draw===
726 The last obvious thing broken is moving the draw points during interactiveTransform.
727
728 shapesContainer is no longer part of panContainer which is now only draw or measure layers.
729
730 Scratch that, I'm not going to move the original panContainer. I need to include the draw and measure coordinates in the new interactiveTransform stuff as well.
731
732 That works ok, I think. I might change it later depending on how was shape drawing to img elements goes.
733
734 I still need to test scale changes with drawing but I have a feeling it's fine. Took the code from pinch zoom.
735
736 ===tiled===
737 I forgot, tiled still needs some of the origin fixes I put into shingled.
738
739 ==2012-05-14==
740 ===mouseup===
741 Chrome & Firefox trigger a rogue mouseup event when maximizing the window. I don't think that's right but I suppose I have to handle it. But, for some reason, geomap in Firefox doesn't trigger the refresh.
742
743 ==2012-05-10==
744 ===shingled===
745 Much better now! Two things I was missing: 1) I needed to base calculation on the original map origin of the scale container & 2) the position is now %-based, like tiled.
746
747 ===keepAlive===
748 I don't think there's a need for this any more so I removed it. I had better make sure :) Oh, right. It was for opacity. We don't want to layer semi-transparent images.
749
750 The code's not here. I see where I set keepAlive but can't find where I delete the images. This may be a regression from, like a2.
751
752 I probably had it chained to a line I deleted. 
753
754 Oooh, I didn't need it anymore when I added the concept of a pan container way back. Since I no longer have pan containers, I have to add keepAlive back.
755
756 Yep, I had to add it back with the pan/zoom rewrite.
757
758 ===resize===
759 For resize, I should be able to just resize each scale container. Everything else is %-based.
760
761 ==2012-05-07==
762 ===shapes===
763 I need to finish the rewrite by making sure graphic overlays move correctly.
764
765 I might cheap out and hide the graphics for the b1 release. The geographics widget needs its own interactiveTransform method.
766
767 ===canvas===
768 Do I need my blit canvas to be part of the document? I hope now, will remove it soon.
769
770 ===wow===
771 I was originally moving all the servicesContainer for all services INSIDE the loop where I was moving all services.
772
773 Also, _$servicesShapesContainer did not include the draw or primary shapes containers. I wonder if that was on purpose. It should not include the draw container because those shapes change during any change in the mouse or map.
774
775 ===shapesContainers===
776 shapesContainers will eventually need the transform, but again, maybe not now. For now, I'm hiding the drawn shapes during interactiveTransform.
777
778 ===jump===
779 There's still a jumpiness issue when you catch it just before/during refresh. Old tiles that have already been scaled pop into weird locations. Should I fix it now or continue with shapes? Probably, I should finish with shapes and then work on bugs.
780
781 ===pinch zoom===
782 Hmm, there are issues here once I turned refresh back on.
783
784 It's with double click zoom as well, once you start panning.
785
786 A single hardware pinch zoom appears to work perfectly if you don't pan any time after the zoom. I end up in Africa or the Virgin Island a lot from MA on the iPad.
787
788 Definitely a problem with refresh. Disabling the refresh timer shows that interactiveTransform still works fine.
789
790 I'm not doing any pixelSize clamping in _setCenterAndSize. That must have originally been somewhere else. With that change, there is still the jump issue of old transformed tiles but I don't seem to end up in Africa.
791
792 ===pinch jump===
793 I need to jump to the closest pixelSize, not the smallest. It will make this smoother...maybe in the future as well as it only affects when they zoom in just shy of the half-level mark.
794
795 ===shingled===
796 I'm creating a new shingle for each pan, which is right, but not positioning it correctly after refresh.
797
798 Actually, this is a much better representation of the jump issue I'm seeing in tiled. If I fix this, I may be able to fix tiled based on it.
799
800 ===data vs. parseInt===
801 I'm going to guess that storing a number with $.data is much faster than trying to use parseInt on current CSS values. Although, the parseInt would only happen on refresh, while the .data call will happen with every pixel move.
802
803 ==2012-05-06==
804 ===shinged===
805 I have to get this started. Appears to work pretty well. What's left for beta?
806
807 ===non-moving divs===
808 I don't think I need the transform on divs that don't move, such as the event target and content frame. I'm removing it for now.
809
810 ==2012-05-01==
811 ===rewrite===
812 I turned refresh back on and there's still that image repeating. I'm going to log some stuff and see what I can discover.
813
814 First step, interactiveTransform is being called on every mouse move even when the mouse isn't down, that has to stop.
815
816 ===pixel-size===
817 Wow, I was making a new scale container every time because I had changed to using data-pixel-size but was still testing for data-pixelSize.
818
819 The duplication is now gone. You can still mess up the view if you start panning right at the right moment, just as it's about to refresh but I can live with that for now.
820
821 ===shingled===
822 I suppose shingled is next.
823
824 ==2012-05-01==
825 ===shingled===
826 Since tiled is pretty much ready for linking to the true refresh, I can either fix shinged now or actually implement the refresh. I suppose I should try to finish the rest of the geomap widget with tiled for now. It's not fun to be unable to refresh the map in this in-between state.
827
828 ===refresh===
829 Tiled services are ready to be merged into refresh. I'm going to skip the _panEnd stuff now and just go to _panFinalize. I can add the inertial pan back later.
830
831 Calling _setCenterAndSize at the end of my timer now. Pretty fast! I'm getting weird behavior with tiles that aren't in the current view, though. And some, look like they're repeating. It all settles down after the refresh but the quarter second leading up to it there is a visible jump.
832
833 ==2012-04-27==
834 ===transform===
835 Setting the transform on the images helped iOS. Settig it on the map div itself helped Android a lot and iOS a little.
836
837 ===iOS===
838 If there's anything else over the map, iOS doesn't respond very well. It doesn't let me pan (scrolling the page instead) and pinch zoom is just weird.
839
840 Out of a whim, I didn't include the jQuery UI style sheet. iOS now works like the others. I wonder what's in the style that it doesn't like. Latest version of jQuery UI (1.8.19) still has the issue. I wonder which widget does it.
841
842 Weird, if I take out the .button() calls, the demo works on iPad.
843
844 iOS works fine with fixed position. It's still the .button calls. I'm sniffing out the button calls for iOS 4-5 for now. I don't have time to figure out that issue.
845
846 ===ie9===
847 I've been wanting to use better features in ie9 for a while. Let's see how this goes because with the new code, I have to drop the filter. I didn't like using filter anyway.
848
849 I cannot belive how nicely the transform scale + transform-origin work in ie9! I might investigate using them instead of the % hook on the scale container for webkit & Firefox.
850
851 ==2012-04-27==
852 ===panzoom===
853 _inOp gets set to true during pan.
854
855 When to have the interactive center and pixelSize match the current values? Any function where timeoutInteractive is null, likely.
856
857 I may have been moving the services' shapesContainers twice, once in _panMove and again in the service's serviceContainer.children().css call. No, the service container is the data-geo-service object. Its only children are scale containers.
858
859 I'm not going to move the scaleContainers separately during pan...oh, I have to because they will move at different velocities.
860
861 ===transform===
862 I'm attempting to add transform support for iOS. 3D CSS transforms make the images bounce around funny during scaling. At least, when I set the CSS on the scaleContainer.
863
864 ==2012-04-26==
865 ===measure===
866 In some instances, the measure tool doesn't position properly. Going to change it from a div to a span to calculate width better. The container can stay a div. Only the actual label needs to be inline.
867
868 Fixed. I'm also clamping to [0, 0] so the measure label doesn't move past the left or top of the map.
869
870 ===pixel measure===
871 I can tell I will have to add support for axisLayout=image into the measure code. The clamping is backwards.
872
873 ===centroid===
874 On bad polygon geometry (hourglass is the common example), our centroid function returns weird results. I might clamp to the bbox for now as a stopgap until I fix it for real.
875
876 That's better. Not great but not nearly as much weirdness.
877
878 ===pan/zoom===
879 Back to this. I need to disable the pan pop as well as calls to refresh.
880
881 When panning, we move the _$panContainer. It contains various top-level items (shapes/draw/measure containers). Each service moves their own content. Pan finalize resets the pan container as well as the shapes container for all services.
882
883 I'm still doing too much in touchmove.
884
885 Now caching the reference to services shapesContainers.
886
887 ==2012-04-24==
888 ===pan/zoom===
889 Where was I? :) Right, first disable all refreshing and attempt a the new interactive pan.
890
891 Not all refreshing will be disabled, the function/option calls from the developer should be honored.
892
893 ===zoomTo===
894 Private but never called?
895
896 ===no refresh===
897 With all _setCenterAndZoom calls commented out, the pan container still jumps back to starting position. That's expected with the current code but shouldn't happen when we're done. That jump needs to wait for the full refresh.
898
899 ==2012-04-20==
900 ===b1 docs===
901 I got some more docs in. I need to take a small break and actually rework the pan/zoom engine.
902
903 ===pan/zoom===
904 So it begins. I think the first thing to do is create the clearable refresh time during pan/zoom and remove the duplicate refresh code in interactivePan & interactiveScale.
905
906 ===google===
907 Google Maps requests new tiles during pan when running in Chrome on the desktop, however, the mobile website waits until the user lets go of the map.
908
909 ==2012-04-12==
910 ===polygonize===
911 That's what the bbox->polygon function will be called. It's in GEOS. Their docs say: Polygonizes a set of Geometries which contain linework that represents the edges of a planar graph.
912
913 While that's supposed to be only for linework, e.g., a LineString to Polygon, I think it's fine to extend that to bbox. It's not called polygonize in JTS, there's a Polygonizer class and a getPolygons method. I'll simplify that, too.
914
915 ===shift===
916 I changed the shape value to dragBbox so I can use it in the code a little more smoothly (choosing cursors, actually switching the mode).
917
918 ==2012-04-11==
919 ===foss===
920 I gave my talk, went ok. Gotta get back to docs.
921
922 ===dragBbox===
923 This mode should operate even if pannable is set to false. There's a test in the code where I have to special case that out.
924
925 ==2012-04-10==
926 ===foss===
927 I'm coding at foss4g!
928
929 ===Deferred===
930 Deferred demo is done.
931
932 ==2012-03-30==
933
934 ### markdown
935 The new markdown file looks nice!
936
937 ### docs
938 Time to document the last feature that are going into b1. Actually, I want to lint the last file, tiled.js.
939
940 ### Deferred context
941 The last lint issue is that I shouldn't create functions in a loop. That's done when the user returns a Deferred object as the tiled service's src property. The function calls _loadImage on the service object but needs more than the url, which is all the Deferred done call gives it. How do I get the rest, such as $img, pixelSize, etc. $.proxy? But isn't that creating a function anyway, just one that lint can't see? Yes, it does. Maybe I can put the data on the Deferred object itself. I don't see why not.
942
943 ==2012-03-30==
944 ===grunt===
945 I haven't written in a while. Checking out grunt now.
946
947 Wow, that was cool. jQuery Geo now compiles with Grunt and I also have a jQuery plugin package file!
948
949 ===graphic holes===
950 With canvas, I have better control of drawing polygons with holes. It's pretty nice. I can't wait to get into WebGL.
951
952 ==2012-02-15==
953 ===labels===
954 The code already worked the way I wanted! No .geo-label div is created if you don't at least provide an empty string label.
955
956 ==2012-02-12==
957 ===find===
958 Need to implement the * selector. That was easy. $.isPlainObject thankfully returns false on strings.
959
960 ===unloaded image===
961 It appears that when you pan starting on an area that has an unloaded image, i.e., empty space, this._center gets set to string values. Checking on this now.
962
963 ===shingled 0===
964 To prohibit shingled maps from zooming out past 0, I had to change quite a bit of code. I now have getZoom & getPixelSize methods that will work regardless of tilingScheme. I'm also calculating pixelSizeMax when bboxMax changes and making sure the non-tiled zoom doesn't go less than 0 in two spots. That seems to do the trick.
965
966 ===service-level shape refresh===
967 Shapes on services draw twice, heh. That was a tough one. Turns out, when I create the service-level geomap widgets, I wasn't setting _graphicShapes to a new array before passing the (this) object to the widget factory. All services were sharing the same _graphicShapes reference.
968
969 ==2012-02-11==
970 ===current services===
971 I need to make sure their style property is always full, that's the point of having an internal copy. This means I have to fill in visibility & opacity when I create the services based on defaults.
972
973 === service style===
974 $.extend({
975     visibility: "visible",
976     opacity: 1
977   }, style)
978
979 That returns what you would expect if style is undfined.
980
981 ===str src===
982 I can't mod index in the template. I feel that there is a way, but it's not there yet.
983
984 ==2012-02-06==
985 ===mousewheel===
986 This needs to be updated, it doesn't work with jQuery 1.7.
987
988 ==2012-02-04==
989 ===options===
990 Right, this._options does equal this.options but only because the latter must be called so and we can minify the former for internal use.
991
992 ==2012-02-03==
993 ===proj===
994 I seem to be able to detect geodetic coordinates ok. I'm switching all of the $.geo functions to use it. So far, so good.
995
996 ==2012-02-02==
997 ===transition===
998 They look cool, but I don't think this project is ready for transitions, they have some unexpected side-effects. I would like to rewrite the interactive portion anyway.
999
1000 ==2012-02-01==
1001 ===destroy===
1002 There's a bug with shingled services if I call destroy and try to re-create.
1003
1004 ===services===
1005 Changing the services option will destroy all service-level shapes. I'm not sure what to do about that. Eventually, I will re-use serviceContainers (and service-geomaps) based on the new services array coming in but I currently don't do that.
1006
1007 ===proj===
1008 Finally, to get rid of proj. The point is, you should be able to use projected coordinates even when $.geo.proj is not null.
1009
1010 The same geodetic test applies to both bbox & coords because the first two elements of either are the x and y of some number. Nice!
1011
1012 ==2012-01-31==
1013 ===shapes zoom===
1014 Service-level shapes don't refresh while zooming and it's not going to be easy at the moment. All I can do is call geomap("refresh") on the serviceContainer which, since they're just service pseduo-map widgets, will only refresh the shapes. The problem is they don't have access to the in-between state of the zoom so the shapes don't draw correctly. I will fix this later when I re-invent the pan/zoom code for beta. For now, service-level shapes will not draw during interactive zoom.
1015
1016 However, it's good to have an idea of how the new system will need to work. Each service-map widget will check the _interactiveCenter & _interactivePixelSize values to draw shapes in proper positions.
1017
1018 ==2012-01-30==
1019 ===geographics===
1020 This widget needs some updates. For now, I'm just going to add the resize function.
1021
1022 Note, with canvas, you don't need to set size CSS at all. The canvas is, by default, inline-block with width and height based on the html element attributes. Also, as is shown in this fiddle, changing the runtime width & height properties of the canvas element does clear the canvas: http://jsfiddle.net/jcGY2/
1023
1024 ==2012-01-28==
1025 ===service-level shapes===
1026 Where was I before I stopped to add Deferred & fix bugs? Right. The service-level geomap widgets should now initialize their own shapesContainer. 
1027
1028 ===resize===
1029 resize is a method on the service object because shingled need to stretch the current image.
1030
1031 I need to finally add resize to geographics.
1032
1033 ===find===
1034 find will have to query and include service level shapes.
1035
1036 ===map===
1037 This will be simpler if I allow services to get to the private map variables (similar to how I allow the service object to do it?). No, probably during create.
1038
1039 Can you have protected properties in a jQuery UI widget? I would like to be able to pass a reference to the map during create...I could also use .data. That worked fine. I now have this._map which will be the same as this for the map object and a reference to the map object for services. Nice! On parts that need to work the same between maps and services, (such as _refreshShapes), I can just call this._map.x and it will be correct.
1040
1041 ===shapeStyle===
1042 This should be fine for services.
1043
1044 ==2012-01-27==
1045 ===Deferred===
1046 The src function will be allowed to return a Deferred (or Promise) object. If it does, geomap will wait for the done or fail events. The src function will call resolve or fail.
1047
1048 ===service shapes===
1049 The opacity method might have to stay as a service method because it must directly manipulate image elements in some cases. However, the toggle method can operate on the new service container.
1050
1051 ===init services===
1052 So, the jQuery UI widget factory udpates non-array options fine, i.e., when I get into the _create method, this.options has whatever the user supplied merged in with the default options. However, array options are not copied so any changes to the initial service option are not maintained.
1053
1054 Not true, but it does unfortunately merge the first user supplied service with the default service, osm.
1055
1056 ===options===
1057 I forget why I have _options and options. They are supposed to be internal vs exteternal but they are equal references.
1058
1059 ==2012-01-24==
1060 ===a4===
1061 What's next for a4? static mode.
1062
1063 ===static mode===
1064 This shouldn't be too hard. Currently, any non-defined mode string will act close to static. That's different from how I want it to work. The mode "static" should be static and undefined modes should act like pan for now.
1065
1066 The switch appears to have gone well. I can set the mode to "23" and it acts like it's in pan. That's a feature I will define more fully later and document before it's official.
1067
1068 ===labels===
1069 Time to merge labels into geographics. This is a huge step toward service-level shapes. I should be able to find all $labelsContainer references and move them into sections of geographics.
1070
1071 Now that labelsContainer is part of shapesContainer, the next step is to put shapesContainer under a serviceContainer (which is inside servicesContainer). Got that?
1072
1073 ===service-level shapes===
1074 Here we go! Each serviceContainer has a div that contains all the images. The geographics widget will be a sibling of that.
1075
1076 I may need a new container :/ the extra div was the tiled service's scale container. I need a container for the service/graphics elements.
1077
1078 The map itself will have to manage this new container. I think the internal service objects will get this container and now append their functionality and elements to it. It will no longer have to return a new div for which the map will create a sub-geomap. 
1079
1080 ==2012-01-23==
1081 ===addressing===
1082 I think address parsing (cracking) will be a useful feature for geocoding to non-Google geocoders. I might want to add that to $.geo at some point. Christian has some Python code that does it already I can port.
1083
1084 ==2012-01-21==
1085 ===pinch aftermath===
1086 Adding pinch was pretty easy. The only big issue was if a second finger touched a short time after the first. To counter, I fake as if all touch has stopped and initiate a new one. There's room to consolidate code here but I'll get to that later.
1087
1088 ===drawPoint===
1089 This acted funny with pinch zoom in that when the second finger hit late, a shape event got triggered at the first finger.
1090
1091 ===draw other===
1092 Similar issue, touchstop gets triggered after pinch zoom and a segment is added to the shape. Maybe related to calling touchstop. We get in an odd state, actually. The segment shows up but the next touch causes it to disappear and a new one appear instead.
1093
1094 I'm going to put this as a bug and get back to it later. There's much more actual functionality to get into alpha 4.
1095
1096 ==2012-01-20==
1097 ===pinch===
1098 This is mostly ready for iOS. It's a little jumpy so I think I have to detect a second touch while the first one is down as long as they haven't started panning yet and move into pinch zoom.
1099
1100 If the second finger is late, we still only get the touchmove event which will work great.
1101
1102 ===android===
1103 I am going to coin "hold scroll" for android to counter their lack of multitouch. When the user holds the map in the same place for between .5 seconds and before the browser takes over, the user can move the touch point vertically to start zooming as if there's a scroll wheel.
1104
1105 I was going to have "expand zoom" (coined by Laura) where it works similar to "hold scroll" but instead of acting like a scroll wheel, it acted like the bbox was expanding from the hold position. In effect, a zoom in only fake pinch zoom. However, I like the zoom in/out ability of the fake wheel better. This will also work on iOS, I think and even desktop.
1106
1107 ===web workers===
1108 I eventually want the $.geo functions to allow the browser to use web workers but they'll have to be in a javascript file. Hopefully, I can use data URIs.
1109
1110 I could always grab the worker js from the CDN but that would require internet access. What if it's all an internal site, like for government. Or, graphics only that doesn't need servers.
1111
1112 I can use data URIs but I wasn't able to have a local variable in the function. You can, but you need all %20's instead of spaces.
1113
1114 ==2012-01-17==
1115 ===geomapshape===
1116 May be getting multiple shape events when in drawPoint mode and attached via bind("geomapshape").
1117
1118 Not just shape, all events. If you recreate a map on the same div & rebind an event to a new function, it will trigger more than once.
1119
1120 ===wkt===
1121 While not in this release, I have a need to fix WKT parsing. Finished parse LineString & (single ring) Polygons.
1122
1123 ===pinch===
1124 Next on the list is pinch zoom. I can hook this into the scroll zoom mechanics based on pinch center & ratio of initial pinch bbox to current pinch bbox to scale the tiles.
1125
1126 Initially, I'm going to jump one scale level (or scale ratio) like wheel zoom. Later, when I update the whole interactive movement engine, I'm going to transition to the next scale level.
1127
1128 This will tap into the _wheelLevel variable, which I should possibly rename later.
1129
1130 Dropping out of multitouch (lifting one finger) will end interactive zoom & call setCenterAndZoom.
1131
1132 We pick the largest ratio between x & y changes.
1133
1134 ==2012-01-16==
1135 ===zoom===
1136 Accidentally moved some code to where it didn't belong & broke interactive zoom. Fixed.
1137
1138 ==2012-01-12==
1139 ===getUrl===
1140 I would like to further have the service object's properties match html rather than css. I might rename this to just src.
1141
1142 ==2012-01-11==
1143 ===scroll & drag===
1144 I need options to disable the default behavior of scrolling and dragging.
1145
1146 ===html attr===
1147 I think my options should reflect more like HTMl attributes than css properties. Including service object options. That might make me change visibility back to visible :( At least I'm not beta yet.
1148
1149 Scratch that, it's a presentation option and all presentation options should follow CSS. However, I may move it to a style property of the service object. Are there other style properties?
1150
1151 Only opacity.
1152
1153 ===scroll===
1154 I would like to support two-finger vertical slide as zoom on mobile devices but I'm not ready to write that up yet.
1155
1156 Hmm. Can I handle scroll without an option? I can detect page scrolling and set a timeout. If the user has been scrolling the page, we don't want to scroll the map. But, what if the user's cursor just happens to be on the map when they want to scroll the page. I'm keeping scroll, the developer should have control to turn it off all together.
1157
1158 ==2012-01-2==
1159 ===service===
1160 I'm still thinking about service-level methods. I'm not going to add the *All methods right now and I'm not going to have the single methods dive into the services (other than find, which even in jQuery digs into sub-elements not in your collection). The table I wrote below won't go into the docs. 
1161
1162 Almost done with the docs for this. I wonder if I can have the jQuery UI widget method find merge results when more than one element are used in the selector. Unlikely but it would be cool. I'm going to have to assume not for now but keep that in mind.
1163
1164 ===geo-service===
1165 I am going to document that all service divs have the geo-service class. So, the default service will be both .osm and .geo-service.
1166
1167 ===find===
1168 It's quite clear to me that I should be able to call find on services. That will return shapes in that service. What does calling find on the map do? Should I have it search map and all services as planned or limit it to just map shapes? I have no idea what this would do in jQuery UI widget factory:
1169
1170 var shapes = $( "#map,#map .osm" ).geomap( "find", { type: "Point", coordinates: [ -71, 42 ] }, 4 );
1171
1172 What will be called, what's the return...just the first? Just the last?
1173
1174 For this version, I'm going to have find on the map only return shapes appended to the map. That will match how the other functions work and document that you cannot use the comma selector with the find method.
1175
1176 ===proj===
1177 I need to get the final doc changes in for the $.geo.proj auto-handling. The definition of "map coordinates" is determined by the last use of center or bbox. The "map coordinates" are used as return values for the center, bbox, and the bbox property of the view object passed to getUrl. Now, how to write that...
1178
1179 ===replace===
1180 Removing the rather extraneous label and style methods from my to do list and adding the much more useful replace method.
1181
1182 replace( existingShape, existingShape, style, label ) is the same as
1183 append( existingShape, style, label ) but that's fine. If you want to remove existingShape and add a new one, you won't need two calls (remove & append).
1184
1185 ===find===
1186 I'm not going to add a shapes method either. I want that to be part of find. The next version of the find method should take various selector strings such as * and return an array of shapes. This also makes me want to revisit whether or not find can dig into services...I'll see what Peter thinks.
1187
1188 I feel like I want users to be able to write either:
1189
1190 $("#map .osm").geomap("find", "*") or
1191 $("#map").geomap("find", ".osm *")
1192
1193 append, replace and empty are very one-item specific but find is a digging query operation. I think I just convinced myself that it should be different. It should dig into the services. That's what I think devs will expect. I already can't use find with more than one target...so I'm already breaking the convention of the other three methods.
1194
1195 I'm not going to support the service selector in find's selector argument at this point. But I documented how it will work with a service element selector and that seems pretty cool.
1196
1197 ==2012-01-01==
1198 ===offline===
1199 Responded to an email asking about offline support. I wrote a few things in my reply that should give him some ideas. I'll copy them here:
1200
1201 I have thought of offline support. While something like that likely won't be directly part of jQuery Geo itself, there are different ways to approach it depending on needs. I have plans to put up some demos to give developers ideas but here's a short list:
1202
1203 1. Using the getUrl function to cache downloaded tiles in session storage on IndexDB. Since this function in the service object can do anything you want, it's perfectly fine to check some HTML5 storage options for tiles and returning, e.g., a data URI before attempting to access the Internet. Users will get roaming charges only when the images aren't in the cache. However, the amount of images you can store in the cache is limited by what the browser sets for the cache's upper limit. Some mobile browsers allow users to increase this limit, others don't. This is an option better suited for sites that want to show large areas with many zoom levels.
1204
1205 2. Pre-caching the whole tile set in HTML5's appcache. This is suited for a site that only serves a small area and not too many zoom levels. You would have to get a copy of all the tiles and list them in a cache manifest file. If the user zooms or pans outside the site's area, they can get some "no tile" image. The huge advantage is that users can first browse to the site on WiFi, the app will cache the entire map (which will take a while) but can then walk around and map tiles will instantly come from the local cache. The disadvantage is that HTML5 appcache is usually only 5MB which won't hold too many tiles.
1206
1207 ===remove===
1208 I'm still trying to decide about whether or not remove should remove all references in all services or whether I need removeAll. There is precedent for xAll methods in jQuery. I will also need empty. This is too much for a4. Maybe beta or beyond.
1209
1210 method                   | map or service | function
1211 ==========================================================================
1212 append( shape )          | map            | appends shapes 
1213                          |                |   only to the map
1214 append( shape )          | service        | appends shapes 
1215                          |                |   only to the specific service
1216 find( Point, radius )    | map            | finds shapes appended 
1217                          |                |   only to the map
1218 find( Point, radius )    | service        | finds shapes appended 
1219                          |                |   only to the specific service
1220 findAll( Point, radius ) | map            | finds shapes appended 
1221                          |                |   to the map or any service,
1222                          |                |   will not return duplicates
1223 remove( shape )          | map            | removes shapes appended 
1224                          |                |   only to the map
1225 remove( shape )          | service        | removes shapes appended 
1226                          |                |   only to the specific service
1227 removeAll( shape )       | map            | removes shapes appended 
1228                          |                |   to the map or any service,
1229                          |                |   will remove all duplicates
1230
1231 ==2011-12-22==
1232 ===buffer===
1233 I'm going to implement buffer as an internal geo method for now & document it later. It's needed.
1234
1235 ==2011-12-21==
1236 ===two finger===
1237 So, Google has settled on two finger single tap for zoom out. Fine.
1238
1239 ==2011-12-09==
1240 ===measure===
1241 Previous measure shows up if you destroy & create map after originally double clicking to end a measure.
1242
1243 In destroy, _drawCoords and _drawPixels are both empty. Where's the data come from?
1244
1245 When back into the new control, _drawPixels has values. There isn't a _drawCoords. Ah, widget factory was using old data, I have to make sure everything is cleared during create, including these two arrays.
1246
1247 ===measure-pan===
1248 Problem when you pan the first time while drawing in axisLayout image.
1249
1250 It's not just axisLayout image. It's also not measure, it's drawPolygon as well. Ok, this is new ;) I works fine in a3. Maybe something with the implementation of axisLayout.
1251
1252 Doh! Another "don't set arrays equal to each other" issue. Does this happen to other devs?
1253
1254 ==2011-12-08==
1255 ===semver===
1256 All that chatter about what version naming to use and then the jQuery blog points to this: http://semver.org/
1257
1258 Also, here's the deal about the new plugins site: http://blog.jquery.com/2011/12/08/what-is-happening-to-the-jquery-plugins-site/
1259
1260 ==2011-12-05==
1261 ===measure area===
1262 I have to work on the measure area tool. Something's not quite right...oh yeah, I haven't implemented it yet.
1263
1264 ===length===
1265 measureDistance should be measureLength. The measureLabels object should have a length property.
1266
1267 ==2011-12-01==
1268 ===getUrl===
1269 I was going to bring our urlFormat property over from the old code but now I think I want it to be the same property on the service object. I think getUrl can be a function, but can *also* be a string for shorthand. This will obviously be a jsrender template string.
1270
1271 ==2011-11-30==
1272 ===twheat===
1273 I'm going to keep the twitter-heat demo and also leave twheat as its own app.
1274
1275 ===service-level===
1276 Finally writing some service-level shape docs for 1.0a4.
1277
1278 ===wheel===
1279 I would like to add a wheel option. We have a wheelMode property on the internal control that can be a few different things. I would like this to be simpler. Maybe just "wheel" and have it be "on" or "off". Or a boolean? But a boolean would limit future additions.
1280
1281 ==2011-11-23==
1282 ===measure===
1283 I'm going to port measure over as pretty much how it's done in our original project, in that it will have its own dedicated label.
1284
1285 ===measure-label===
1286 Trying to make the measure label look nicer than before. I'm adding a style to the document head just for the measure tool. I'm prepending it so designers can override any of the properties.
1287
1288 ===jsrender===
1289 Pulling in jsrender for the measure label. I'm going to have to do it anyway for shapeLabel, may as well do it now. Works well for my needs, I'm going to document the measureLabels option.
1290
1291 ==2011-11-22==
1292 ===jQuery 1.7.1===
1293 I'm still using 1.6.4 and will likely release that way. I'll have to test with 1.7. The notes say that .1 fixed a bug in mousewheel event. I didn't even know they had a mousewheel event. Maybe I can stop using the wheel plugin I've been using.
1294
1295 ===label-container===
1296 Judging from the layout below, I'm going to change textContainer to .geo-label-container and have it move around exactly like the shapesContainer. More like serviceContainer because it doesn't need to be the size of the frame.
1297
1298  #map .geo-map
1299    .geo-event-target.geo-content-frame
1300      .geo-services-container
1301        .geo-service*
1302      .geo-shapes-container
1303        canvas
1304      .geo-labels-container
1305        .geo-label*
1306      .geo-draw-container
1307        canvas
1308      .geo-measure-container
1309        .geo-measure-label.geo-label
1310
1311 ===refresh polygon===
1312 I'm still curious why I don't use toPixel on Polygon shapes as a whole? Why the loops? Right, I was thinking toGeodetic. geomap's toPixel function only takes up to two dimensional arrays. Updated both functions.
1313
1314 ===pan===
1315 I need to pan both shapes and labels at the same time. I think I need a new container for these because drawing might be part of this as well.
1316
1317 ===length & area===
1318 Documenting and coding these because I'll need them for the measure tools.
1319
1320 ===LineString middle===
1321 There must be something in JTS that's similar to Esri's ILine.QueryPoint function but I can't find it. This is for getting the point along the line for the label. I want to add a generic function to $.geo. Ah, LineSegment.pointAlong.
1322
1323 Documenting pointAlong. Also implementing it! Works pretty well.
1324
1325 ===line rotate===
1326 I would like to rotate the line label based on the current segment but that will have to wait.
1327
1328 ===geographics===
1329 I'm going to merge labeling into geographics so that I can move the tech as a whole to indivdual services. That'll come later when I need to do service-level shapes.
1330
1331 ==2011-11-21==
1332 ===measure===
1333 I started porting measureDistance today but merged the branch in after being able to draw a line. The rest of it depends on being able to draw labels. Our internal library has _labelShape specifically for measuring but I'm going to merge that into the labeling engine for this release.
1334
1335 ===append===
1336 I need to update the append docs to include label before I do anything. Done. Since it's needed right away, I'm going to start porting labels over.
1337
1338 ===shapesContainer===
1339 Can I re-use $shapesContainer for labels? I'd rather not keep track of a second div. However, I think $shapesContainer *is* a canvas element so that's not going to work. Yeah, it's a geographics widget which...no, geographics appends the canvas. I can re-use that element...but semantically, it isn't correct.
1340
1341 That won't work anyway, I need these to exist at the service div level so they can be targeted by CSS.
1342
1343 However, labels not associated with a service would not be in a service div and would need their own div.
1344
1345 ===layout===
1346 Currently, the layout is, e.g.:
1347
1348  #map .geo-map
1349    .geo-event-target
1350      .geo-services-container
1351        .geo-service
1352      .geo-shapes-container
1353        canvas
1354      .geo-draw-container
1355        canvas
1356      ($textContainer)
1357
1358 ==2011-11-15==
1359 ===twheat===
1360 I'm going to make this a real app with its own subdomain. I would like to use paging because the first page doesn't have enough results with a geo argument. What happens when there's no further pages. Is there a "next_page" property? Is is null?
1361
1362 The page will be more impressive if I try to geocode the location property to get more results.
1363
1364 Heh, this will blast a lot of queries at MapQuest. I'm going to have to store ids i've already processed.
1365
1366 That's soo much nicer!
1367
1368 Maybe I can get a couple old pages worth as well on the first search.
1369
1370 Twheat exists!
1371
1372 ==2011-11-14==
1373 ===a4===
1374 Time to start a4 docs. Hopefully this will be the last alpha.
1375
1376 ==2011-11-10==
1377 ===merge===
1378 I merged in the changes to support photos. It amounts to only a few hundred bytes minified and can be pretty useful. I couldn't find a good example service to use for the axisLayout demo.
1379
1380 ==2011-11-09==
1381 ===axisLayout===
1382 Peter likes axisLayout as well...sold!
1383
1384 ===first===
1385 Trying this out for the first time. I can get image tiles from an image server but the zoom is all wrong and it's not centered. wheel zoom is also pretty wrong.
1386
1387 ===bbox===
1388 bbox min values are negative. I suppose that makes sense because it's trying to put the top-left corner of the image in the center of the window. It should be tring to put the center of the image in the center of the window. 
1389
1390 ===mapbox===
1391 MapBox uses an "official" tiling spec. In that spec the origin is in the bottom left. That doesn't mean the y-axis is flipped though but it does change how I calculate the tiling scheme. Maybe it does go up. That's awful, why would they do it different than web mercator?
1392
1393 Crisis averted, maybe? It looks like V2 of the MapBox API uses top-left origin and XYZ tiling: http://mapbox.com/hosting/api/
1394
1395 Maybe not averted? Calvin is saying that TileStream itself (as in not hosted by MapBox) only has one API. That doesn't sound right.
1396
1397 ===getTiledZoom===
1398 This is wrong for image types the way we want to understand pixelSize with images. A low zoom means a low pixelSize which is opposite of maps. I seem to have fixed that. I'm getting closer.
1399
1400 ===refresh===
1401 Refresh is ignoring tiles on the bottom & right edge of the viewport.
1402
1403 ===top-left===
1404 The image still starts out in the middle of the page but you can move it around and zoom. 
1405
1406 ===getUrl===
1407 I forgot that while Peter's image server determines zoom levels backwards, I was going to handle that in the getUrl function of the service and have the pixelSizes of the tilingScheme be like normal. This works much better. Now I only have the top-left issue. That's not true, zooming bounces the new image to somewhere else, i.e., isn't smooth or correct.
1408
1409 ===center====
1410 So, I realized that at geomap zoom level 0, the image is way zoomed out and my center should be the center of the full image in pixels, so pixel width /2, etc. I changed that but my tiles are still misaligned.
1411
1412 Ha! I wasn't checking for undefined if you pass a zoom of 0. That means I wasn't setting the new center & pixelSize with updated values. All set. Now I'm only offset in the y location and I have a feeling that's because of the axisLayout.
1413
1414 ===osm===
1415 Somehow, the osm class i getting on the serviceContainer element even though I'm completely redoing the services array at init.
1416
1417 ===centerMax===
1418 I think for now I have to assume that at max zoom, the whole service fits in a tile and the center is in the center of the tile. I don't have a way yet to specify the center of a tiling scheme, only the top-left.
1419
1420 ===pan===
1421 Pan is backwards as well when it creates the new bbox.
1422
1423 Fixed pan.
1424
1425 ===zoom===
1426 Looking good! interactiveScale is last. Then maybe I should support shingled. Wait, no, that was interactivePan, when pulling in new tiles.
1427
1428 Zooming twice is a bug but that's in core jQuery Geo, not this image addition.
1429
1430 ===shingled===
1431 Here's a link to a sample shingled image: http://lib.byu.edu/mrsid/bin/image_jpeg.pl?client=sample&image=sample.sid&x=1024&y=2048&level=0&width=1024&height=480
1432
1433 Actually, there are levels so that's a tiled image. Yeah, definitely tiled because the level argument doesn't allow fractional numbers.
1434
1435 ===ie select===
1436 I think I forgot a userselect somewhere because if there are no inputs on the page and you pan, IE highlights everything in blue. Every map tile.
1437
1438 Adding any input or link to the page fixes this. Also, adding this to inside the map div seems to fix it too: 
1439
1440  <input type="hidden" autofocus />
1441
1442 That fixed nothing. The issue isn't with panning, it's with shift-zoom and happens no matter what's on the page with IE9.
1443
1444 ==2011-11-08==
1445 ===image coords===
1446 I need a new property to determine the direction of the y-axis but I want it to be more generic. The difference is a different coordinate system, the side effect is the inverted ordinate axis.
1447
1448 Maybe just "coordinateSystem". I don't want to confuse users with the difference between coordinateSystem and tilingScheme though.
1449
1450 The full, proper term would be coordinateSystemAxisDirection or coordinateSystemAxisType. There seems to be a little precedence for CoordinateSystemAxis, found in GeoTools: http://docs.geotools.org/stable/javadocs/org/opengis/referencing/cs/CoordinateSystemAxis.html
1451
1452 Nothing in JTS.
1453
1454 Hmm, axisLayout? Why not, it's short and specific. axisLayout = "map" | "image". Yes. I like it.
1455
1456 ==2011-11-07==
1457 ===gzip===
1458 I added gzip to jquerygeo.com & all subdomains. jQuery Geo (minified & gzipped) is now 17k and falling!
1459
1460 ===move===
1461 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.
1462
1463 ===drawing===
1464 Wow, geomap._refreshDrawing was terrible and geographics._drawLines needed a little tweaking.
1465
1466 ===return false===
1467 I didn't have any return falses at the end of my event handlers. I hope that plus the drawing fix makes panning better.
1468
1469 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.
1470
1471 ===chrome===
1472 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.
1473
1474 ===geolocation===
1475 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.
1476
1477 ==2011-11-01==
1478 ===shapeStyle===
1479 Time to redo the shapeStyle example in a much more awesome way.
1480
1481 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.
1482
1483 New demo is super-cool!
1484
1485 ===refreshShapes===
1486 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.
1487
1488 ==2011-11-01==
1489 ===refresh===
1490 Cleaned up the wording for append, remove & empty. Also, going to have append allow style only, refresh only, or both.
1491
1492 ===refreshShapes===
1493 Due to performance, I'm going to disable the auto refresh after interactiveScale of shapes if the number of shapes is over a certain limit, say, 255.
1494
1495 ==2011-10-31==
1496 ===tile paint===
1497 Another app I want will be tilepaint.jquerygeo.com. It won't actually use jQuery Geo but will repaint tiles on the fly for you based in an input URL and color changes.
1498
1499 ===fromGeodeticPos===
1500 There's a bug trying to convert some positions of a town near Concord in the voting demo. I wonder what's different about that geometry.
1501
1502 The shape is a multipolygon which I am not handling properly. It can be a quadArray. I also removed all the $.each calls which should speed things up a bit.
1503
1504 All set now.
1505
1506 ===ArcGIS Wrapper===
1507 agw.jquerygeo.com will take an ArcGIS Server endpoint and spit out the jQueryGeo you need to initialize a map to that service. It should handle both cached and dynamic services.
1508
1509 ==2011-10-30==
1510 ===voting===
1511 I'm working with Calvin Metcalf at MassDOT attempting to push all the data into jQuery Geo. I might want an option to turn off scaling vector data because it's rather slow. Maybe only do it if they have WebGL.
1512
1513 Disabled it for now.
1514
1515 ===refresh===
1516 The refersh property must be made public, pushing large number of features isn't useful without out.
1517
1518 ==2011-10-29==
1519 ===id/class===
1520 I'm at WhereCamp Boston 2011 and going to try to finish Alpha 3 while I'm here starting with making id optional.
1521
1522 ===initOptions===
1523 Was getting undefined when a user passed nothing as in the simplest test.
1524
1525 ===class===
1526 So, I forgot that class is a reserved word. I'm not sure what to do about that. I can make id optional for now but I'll have to decide about class as a property name. I know as an object literal, I'm supposed to enclose the word in quotes but that's not going to look right for the user who wants to use this. I might have to call it cssClass or something. I'll find out what jQuery uses.
1527
1528 Google Closure won't even minify the build with the word class used as I'm using it. When I'm creating an element using jQuery's argument that takes an object for attributes, what do they use? They require quotes.
1529
1530 ===id===
1531 I'm still storing the service state by id. Since both id and class are optional, I think I need to store it as an array. That's not true, I can store an id on the service object via $.data. The id can be $.now. I wonder if $.now actually has different values if I'm creating more than on service at the same time? I will need to test and potentially use a different means to create the id.
1532
1533 ===service create===
1534 I'm going to assume that the service doesn't already exist during create. Not sure if that's a good idea though. Maybe for now, I won't and I can make the create code smaller later after I have time to test.
1535
1536 I completely forgot that I'm going to store the entire service state via $.data. That will make things a lot easier.
1537
1538 Seems to work ok.
1539
1540 ===double click on unloaded===
1541 When a singled image hasn't loaded after pan and you double click on empty space, the zoomed area seems wrong.
1542
1543 ===fusion===
1544 Andres from Google is showing radius query using fusion tables. Seems like something I can do with jQuery Geo.
1545
1546 ===kml===
1547 I might have to support kml.
1548
1549 ===maps.jquerygeo.com===
1550 I should support typing a url to a geojson file to append all of the json.
1551
1552 ==2011-10-28==
1553 ===style===
1554 Both shapeStyle and drawStyle get and set a plain JavaScript object and should be widget "option"s. While changing them does have side effects, they perform no action themsevles.
1555
1556 ===centroid===
1557 I'm leaving centroid in a3 but removing support for GeometryCollection for now (in the docs & code). That can come later.
1558
1559 ===distance===
1560 No sense having the two lines that support arrays, they'll never hit a valid switch case and it's not in the docs.
1561
1562 ==2011-10-25==
1563 ===service state===
1564 I finally moved it to a $.data store on the services container. It was getting messed up moving between pages in jQuery Mobile when one of the pages had a map.
1565
1566 ==2011-10-21==
1567 ===resize===
1568 Shingled maps don't resize properly. I think I have to have a resize method in there & call it from geomap. All set, I had to mark the current scaleContainer as not being for the given scale any longer and re-center it.
1569
1570 ===visible===
1571 I can't decide about this property of the service object. I need an API audit from Bocoup :(
1572
1573 Since I have opacity and visibility in shapeStyle, and I know I'm not going to change them, I think I do want to have the naming synergy because I do have opacity in service properties that I'm not going to change. Ugh, but the toggle method takes a true or false value. But so does jQuery's and that changes a CSS property from one text string to another.
1574
1575 ===change service object===
1576 Unlike the shape objects, I think it's fine if I change the service object's visibility property. It's sort of awful to see the check for undefined & I change it anyway when they use the toggle method. Why not just set it to "visible" when I create the service?
1577
1578 ==2011-10-15==
1579 ===draw pan===
1580 The current version didn't get the code ported over that disables inertia while drawing. I think I need to put that in because without it, the drawing does feel too fidgety.
1581
1582 I was calling _panEnd instead of _panFinalize for the draw modes.
1583
1584 ===draw polygon===
1585 Finally ported this code over. Seems ok.
1586
1587 ==2011-10-14==
1588 ===maps===
1589 I would like to make an app that lives at maps.jquerygeo.com and has some useful functionality similar to Google maps but uses all open data.
1590
1591 ==2011-10-12==
1592 ===push it===
1593 jQuery Geo is still functional in Chrome drawing all of the census tracts of MA. That's over 55,000 points and 3,000 features. Not too bad.
1594
1595 ==2011-10-07==
1596 ===drawLineString===
1597 I've ported some initial line code and actually made it much more elegant than our internal one.
1598
1599 ===shingled===
1600 The shingled demo needs some work.
1601
1602 ==2011-10-06==
1603 ===bbox===
1604 I pushed out a great new bbox example page. It links to a live jsFiddle even so people can play with the code.
1605
1606 ===jQM buttons===
1607 I did have to make the full screen map an external page. It worked ok after that and the back button still works.
1608
1609 ===jQM===
1610 jQM has virtual buttons to handle either touch or mouse input (some devices have both at the same time): vclick, vdown, vmove & vup. However, they don't handle multi-touch so I think I'm going to have to stick with what I have at the moment. I can't require jQM just to have jQG work on mobile.
1611
1612 ===draw===
1613 Porting our shape drawing code over finally. We're getting a new geographics widget to differentiate drawing from appended shapes.
1614
1615 ===drawStyle===
1616 I forgot to write about the drawStyle method. This one might actually be a true option as it will never be service-specific. It can only apply to the map widget.
1617
1618 ===draw functions===
1619 I need to rename some things. I've been using a few old names from our internal code but they don't quite make sense with some of the newer names of public properties. Mostly, shape should mean anything added via append and draw is the actual in-process drawing.
1620
1621 Two internal method names should be: _refreshShapes (instead of _drawGraphics) & _refreshDrawing (instead of _redrawShape)
1622
1623 ===drawPoint dblclick===
1624 As the docs say, a double tap will zoom in just like in pan mode and not trigger the shape event.
1625
1626 ===geographics===
1627 Oops, my underlying geographics widget is sharing the same canvas context. Flicker city! Ah, much better.
1628
1629 ===drawPoint===
1630 Because I'm delaying before I trigger the shape event, it feels slugish. Maybe I can drop the delay down to 100ms. Too fast, I'm getting the shape event.
1631
1632 ==2011-10-04==
1633 ===jqcon===
1634 I gave a presentation to jQuery Conference Boston 2011. I didn't have much time because I was sharing a block with another speaker. So, my presentation was rushed but I still think a few people interested. I will have to get better at conveying that this is not a wrapper for Google Maps or OpenLayers. We do not host any 3rd party controls.
1635
1636 ===jQM buttons===
1637 With a jQuery Mobile controlgroup or navbar on the same page as a full screen map, I get huge performance issues on Android. iOS seems ok with it. Desktop browsers are fine. The map doesn't pan while sliding your finger but it does show up in the new location when you let go.
1638
1639 Removing the navbar completely didn't help. I think that unless it's a small in-page map, I'm going to have to make the page external.
1640
1641 ===bbox===
1642 To test these new bbox functions, I'm going to redo the bbox example page.
1643
1644 ==2011-09-30==
1645 ===json===
1646 I can store a tiling scheme in JSON but just realized that I can't store a service definition in JSON because of the getUrl function property.
1647
1648 ==2011-09-29==
1649 ===zoom===
1650 Documenting and adding the zoom method.
1651
1652 ===bbox===
1653 Made bbox public. It's also now storing projected coordinates. $.geo.proj can also accept bbox arguments now.
1654
1655 ==2011-09-28==
1656 ===disable auto-proj===
1657 Peter suggested (for actual GIS users) a way to disable $.geo.proj but keep the object where it is. The situation is: "I know I'm working in a projection, and I want $.geo.proj to match that projection, but I don't want it to attempt to auto-project coordinates I pass to $.geo functions or geomap because I'm going to send it projected coordinates, but I do want the object around for when I might want to un-project some coordinates to geodetic."
1658
1659 That's wordy but it does make sense.
1660
1661 However, instead of adding a boolean on $.geo called autoproject and telling people that they can shut it off, I'm going to test diving into arguments to determine if they are geodetic and auto-projecting myself. There will be a performance hit but I need to test if it's too much or worth the simplicity. I think I'm going to find that it's worth the simplicity. I can then remove A LOT of words from the docs about if $.geo.proj is null, blah, blah.
1662
1663 That's fine for input values, but what about auto-unprojecting output values? Maybe I do need that boolean property on $.geo? Or I can store the last way center, bbox, or bboxMax were set and return values in the same format. I would rather it not be that tricky though. If I do add a property, it would only need to be for geomap. The $.geo functions are stateless.
1664
1665 ===wkt===
1666 Working on WKT.stringify/parse. There will be a $.geo.WKT object.
1667
1668 Moving along, made the frame of a nice test page too.
1669
1670 ===destroy memory===
1671 A destroyed geomap remembers what was in _graphicShapes. This means that any other private property initialized with _prop: default, is remembered. There could be other issues...until I replace all indivdual properties with a single state objects. For now, I'm going to reset _graphicShapes to [] in createWidget.
1672
1673 ==2011-09-27==
1674 ===destroy===
1675 Somethings wrong with destroy, can't create after. One thing missing is that resize is called (by jQuery Mobile?) after the call to destroy which causes a script error. I have to make sure I unbind resize. Huh, I've never had to unbind a handler before. Heh, destroy erases any content you had inside the widget before you created a geomap.
1676
1677 ==2011-09-26==
1678 ===refactor===
1679 Found bugs in serviceType.destroy and graphics due to code refactor. The CDN, while wonderful, takes too long to update. I suppose it's not the best idea to put the test branch on the CDN. Done. I'll still occasionally copy test to the CDN but mostly I'm going to update the non-CDN'd version until I know things are ok.
1680
1681 Alpha 3 docs online & tweeted about!
1682
1683 ==2011-09-24==
1684 ===resize===
1685 My code refactoring broke auto-resize. I wonder what else I broke :)
1686
1687 ==2011-09-23==
1688 ===filename===
1689 I renamed the compiled JS files to match what code.jquery.com has for jQuery itself and jQM. jQUI isn't on there, which is odd.
1690
1691 ===widget factory syntax hack===
1692 Testing if the syntax I want is possible with the jQuery UI widget factory pattern. I only want the one widget, but I want to be able to call some functions on other child elements. I already hit a snag. Calling .geomap("toggle") on an element that has not been initialized as a geomap widget doesn't trigger _createWidget, _create or toggle.
1693
1694 ===serviceTyep files===
1695 I'm going to split out the service type objects into their own files. That'll help me make sense of the geomap.js file.
1696
1697 To do that, I had to move _serviceTypes from being an option of geomap to a propery on $.geo itself. This will help third-party service type plugins down the road.
1698
1699 ===widget vars===
1700 I think I have to move all the widget vars back into the object passed to $.widget so that they don't conflict with each other, e.g., multiple geomap widgets. As they are now, I think they're all plugin-level widgets.
1701
1702 ===sub-widgets===
1703 This is awesome. It looks like I can get the syntax I want. Now to figure out the best way to call the method in the parent geomap widget from a service widget.
1704
1705 It seems like the vars created in the closure supplied to $.widget are still used by all widgets on the page. Do I really have to store state in a data object on the element?
1706
1707 Yes, they are shared. Yes, I will have to figure something out.
1708
1709 I just had to plaster my code with this's. I don't like it but it now supports the toggle/opacity syntax I want and *I think* also supports multiple maps on the same page (I think). That's going to increase my minified size quite a bit. I'm going to have to go back and see what I can do to clean it up but I'm choosing proper functionality over code size for the moment.
1710
1711 ==2011-09-21==
1712 ===docs===
1713 I'm trying to clean up the docs and change notational $.geo to jQuery Geo, but not mess up anywhere I mean to reference $.geo the namespace.
1714
1715 ===class===
1716 I have a better plan for service id. I'm going to keep my plan for having the presense of a name property create a hidden input but I'm going to allow the service object to have a class. The class will be applied directly to the built-in service divs. I will still apply data-service-type="tiled" or data-service-type="shingled" to the divs. To apply certain methods to specific services, you will now target the service class under the map element:
1717
1718 $("#map .osm").geomap("toggle", false); // this will hide OSM.
1719
1720 ===service create===
1721 I'm going to require that the service type's create function return a jQuery collection of one item that is addressable for that service. It doesn't really HAVE to have anything in it but I'm going to store service state on it using $.data($el, "geoServiceState", {}) or something.
1722
1723 ===jqm===
1724 Upgraded to jQuery Mobile b3 & added some color to the headers of various doc pages.
1725
1726 ===service id===
1727 After talking to Peter, I'm going to allow class and id with a note that if you use id, you'll have to be careful of adding more than one map on the page. I like this plan. Also, if you do it by id, you can target it directly:
1728
1729 $("#mass-gis").geomap("toggle");
1730
1731 ===widget tricks===
1732 I'm not sure I can do the selector tricks I want with the widget factory. I may have to change my docs & design if I can't do it elegantly :(
1733
1734 ==2011-09-20==
1735 ===cache===
1736 I may be caching too aggressively. I think I should remove caching from $.geo.bbox and instead cache inside of append and clear the bbox cache in remove. I really only need it in the find method.
1737
1738 ===jquerygeo.com===
1739 It's time this project got its own nice site. Also, (mt) is faster than my previous host from places farther away than MA.
1740
1741 ==2011-09-18==
1742 ===shape===
1743 Working on the event docs.
1744
1745 ===name===
1746 I was originally going to rename id in the service objects to name so I could use it as an input name on a hidden input. However, I'm now going to require id but allow name as an optional property. If present, it will create the hidden input. This is now a future task and will not be in alpha.
1747
1748 ===append===
1749 While adding the refresh argument to append, I started thinking again how I want to implement service-level graphics. It would be very nice if I could have the map>service syntax to jQuery and call append, remove and empty on that. I think I defined the syntax a while ago...yeah, see "On shape functions" from 2011-06-02.
1750
1751 The issue I have is that a page can have two maps. The default service has id=OSM. So, if I allowed $("#map #OSM") syntax, it would cause the page to have two elements with the same id, #OSM. However, $("#map [data-geo-service='OSM']") is way to wordy. I'll have to discuss this with others later as this is not an alpha feature either.
1752
1753 ==2011-09-16==
1754 ===foss4g===
1755 FOSS4G is an inspiring conference. I gave my talk and people seemed interested. There was a question about Google. I answered that it's illegal to use them and Chris Schmidt mentioned on Twitter that it's not illegal, it's just hard. We're talking different things. jQuery Geo would use Google tiles directly, which is against license. We will never host a third party widget inside the jQuery Geo div as part of the core functionality. OpenLayers wraps the official Google widget to get around the license restriction (since it's the official Google widget, there's nothing wrong with it) & keeps it up to date (or slides it around) when the user interacts with the OL map. I might do something similar as a blog post when I open up the service types plugin system but until then, but it won't be part of jQuery Geo..."here's how to do it if you want", type of thing. The developer would have to pull in the Google maps API themselves.
1756
1757 ===centroid===
1758 I'll have to see if JTS uses Point or Coordinate as a return value & match it.
1759
1760 Centroid needs to use $.geo.proj for accuracy. The centroid should be calculated in web mercator & projected back to geodetic.
1761
1762 ===proj===
1763 The way we do projection is different than how GIS does it. Usually, when you define a projection, you work in non-geodetic coordinates because the coords have been projected to a flat plane. With jQuery Geo, you work in projected coordinates (I call them non-geodetic) when you set $.geo.proj to null. This can be a little confusing but I think it works.
1764
1765 The first thing we would have to do internally is set $.geo.proj to null because we use pro
1766
1767 ===bbox proj===
1768 bbox might be an issue. a bbox in geodetic coordinates (lon/lat) that is a rectangle, will not be a rectangle in web mercator. That's not a problem with setting the bbox property on geomap but could prove interesting for the bbox of geometry objects. For example, the bbox of a square polygon will not be a parallelagram in geodetic coordinates.
1769
1770 SUGGESTION: Calculate & cache bbox in projected coordinates
1771 SUGGESTION: Document that lon/lat bboxes will not appear to be correct?
1772
1773 ===bbox cache===
1774 Peter and I got into a talk about caching bboxes. He's worried that we will have too many floating references to objects that cannot be collected. That is a valid point. For example: a user creates a polygon as an object literal, they then call $.geo.bbox on it, then the function ends. We will have a cache of the bbox, but most importantly the cache will reference the original polygon so the browser cannot remove it from memory. I agree that this isn't a great situation. However, the performance benefit gained by the find method is hard to ignore. Also, this only becomes a problem when the developer calls bbox directly. Even though we call it during the find method (building up cache), they are all removed when the dev removes shapes from the map with the remove method. I also know I need to research more about how $.data works with objects. I may be wrong about the reference/memory leaks.
1775
1776 ===point bbox cache===
1777 Now that I know I should cache bbox as non-geodetic, I think I should revisit my jsperf regarding caching a point. Since there's going to be much more calculation involved in $.geo.bbox, I might want to cache points. However, I think I should only cache them if $.geo.proj is not null. When it's null, non-cached points will still be faster as per my original jsperf test.
1778
1779 ===events===
1780 The new shape event will need a new event type. Position event won't cover it but it's similar. I'm not 100% sure if I should merge them. The new event type will be a shape event.
1781
1782 ==2011-08-24==
1783 ===utah===
1784 While zooming in, Chrome skips zoom level 12. I wonder if that's a bug in the control. It is. It's a rounding error in _getTiledZoom. Using floor and * instead...fixed.
1785
1786 ==2011-08-19==
1787 ===contains===
1788 Contains is spatial ref agnostic and is called by distance.
1789
1790 == 2011-08-07 ==
1791 === bbox ===
1792 I think I'm missing something from my bbox description.
1793
1794 === append ===
1795 I would like to say that devs can call append again on a shape and it will replace the existing one and clear the bbox cache. That might be a good compromise for bbox cache clearing because I don't want a method specifically for that. Maybe, I'm not sold on the word append replacing something that's already there. Does jQuery have a replace function?
1796
1797 SUGGESTION: geomap - append should allow re-append of existing shapes, replacing the old one and clearing the bbox cache
1798
1799 === bbox ex ===
1800 I'm writing an odd example and I already forget if fromGeodetic can take a single position. It can, according to my docs :)
1801
1802 === from/to pos ===
1803 I keep going back and forth about coordinate vs. position in terms of words. I almost thought of changing fromGeodeticPos to fromGeodeticCoord but they /are/ called positions in the spec so I'm going to leave it. Again, it's spoken words (of which I suppose I am now including API function names) and code, which is GeoJSON object properties and arguments. Still confusing, this will never be settled so I'm dropping it.
1804
1805 === bbox cache ===
1806 Oops, I wasn't namespacing my data. I thing it has to be geoBbox because the namespaced data attribute would be data-geo-bbox.
1807
1808 == 2011-08-06 ==
1809 === alpha 2.5 ===
1810 I released a new version last week and it seems to work well. I'm happy with it. On to documenting the features of alpha3!
1811
1812 === label ===
1813 I'm going to add labels and I think I want a label argument to append, however I want both style and label to be optional. In other words, you can pass a shape and a label. The label argument will be a string of html or a jQuery collection of elements to append to a label div. The outer label div is controlled by geomap. It will have a class on it, geo-label, if devs find they need or want to control it that way, i.e., add plain text and control the label style using the class.
1814
1815 === jQuery a plain ===
1816 Is a jQuery collection a plain object? Not according to this fiddle: http://jsfiddle.net/ryanttb/4rHK5/
1817
1818 So, I will have two optional args: style and label. Style has to be a plain object. Label can be a string or jQuery object. I'll say style comes first but they can be in any order.
1819
1820 === shape props ===
1821 Even though I have args on append, I will eventually allow both style and label properties on the GeoJSON object. They're not standard but not illegal according to the spec.
1822
1823 === stored label ===
1824 For speed, I will have to build the label HTML during the call to append, whether or not I use the shapeLabel property on the map or the label supplied during append.
1825
1826 === override ===
1827 The label supplied to append will completely override the map's shapeLabel property.
1828
1829 === centroid ===
1830 While I would like a LineString's centroid to be a point along the line so I can using it for labeling, that's not the accepted definition of a centroid of a line. According to JTS, it's calculated like a polygon, except when there is a polygon as part of a GeometryCollection. In which case lines and points are ignored when calculating centroid.
1831
1832 === line label ===
1833 Checking to see if JTS has an official point-along-line function that I can add w/o creating my own name. It doesn't seem to. I just decided to not label on the centroid for lines but on the "center point" of the line. As you add more points, the label will move further along the line.
1834
1835 === envelope & bbox ===
1836 So, OGC simple features doesn't seem to define an Envelope class. The Envelope function is defined to return a Polygon, eww!
1837
1838 === ogc text align ===
1839 They do define text alignment options called HorizontalAlignment: start, center and end. Might be useful later for text label options.
1840
1841 === $.geo & proj ===
1842 Internally, I need to call the geometry ops in $.geo and I will already have a projected bbox or geometry object. I need a way to tell methods such as $.geo.expandBy to not call $.geo.proj.fromGeodetic even if $.geo.proj is not null. I think for now I will have an internal (and undocumented save for here) argument at the end called ignoreProj. If truthy, it will not call fromGeodetic. A false value or undefined will call fromGeodetic if $.geo.proj is not null.
1843
1844 The documentation will always say fromGeodetic is called if $.geo.proj is not null.
1845
1846 SUGGESTION: Add an internal ignoreProj argument to $.geo geometry functions.
1847
1848 === scaleBy ===
1849 I haven't used it yet buy my original port of the scaleBy function was wrong. I was calling expandBy which would make scaleBy(bbox, 1) actually increase the size of the bbox, however, scaleBy(bbox, 1) shouldn't change the size at all. Also, expandBy was wrong basing itself on center instead of just modifying the min/max values directly.
1850
1851 === geodetic bbox ===
1852 I forgot that from/toGeodetic don't currently support bboxes. What am I doing already in geomap? Ah, right. I only needed it once (the bbox property) so I'm converting to two positions by hand. I think I should make a conveniance method in $.geo.proj. fromGeodeticBbox or something. I'm not going to make it public. Devs shouldn't have to call it, they can work in whichever projection/non-projected state they set $.geo up as and the public functions can handle it.
1853
1854 SUGGESTION: add private _from/_toGeodeticBbox methods
1855
1856 I did remove the, "if $.geo.proj is not null X first calls fromGeodetic..." shpeal that I had in all the bbox methods because it's not accurate. I won't call from/toGeodetic, I'll call a private method.
1857
1858 Actually, I should be able to detect a bbox vs any other geometry in the *Geodetic methods. It will be an array of 4 numbers, so .length == 4 and $.isArray(value[0]) == false. Maybe I'll put bbox conversion into them after all.
1859
1860 == 2011-07-30 ==
1861 === alpha 2.5 ===
1862 It's been too long since I had a chance to work on this and I want to get an alpha 2.5 release out.
1863
1864 I need to push this back in an change my current branch name. I think it's alpha3 at the moment.
1865
1866 === jsperf ===
1867 I wrote a perf for point & linestring bbox cache testing. The test makes me think jQuery.data doesn't do what I think it's doing. When I cache the bbox in a local var, it's very fast but when I cache with data, it's not.
1868
1869 * Here's the point test: http://jsperf.com/point-vs-bbox
1870 * Here's the line test: http://jsperf.com/line-vs-bbox
1871
1872 It's always faster to test points by themselves, i.e., don't worry about checking for a cached the bbox.
1873
1874 === branch ===
1875 I was on master, so I pushed, then created & switched to alpha2-5.
1876
1877 === opacity ===
1878 When developing the heat map example, I remember running into an issue where I couldn't get the opaicty to look right between the border and center. Maybe I fixed it somewhere else because I can't seem to reproduce that.
1879
1880 I can still get it on the latest fiddle of the heat map. It's when the opacity is 1 and the strokeOpacity is 0, the stroke still shows up but it should be hidden.
1881
1882 I still can't recreate this on the shapeStyle test page :( Ah, but the twitter heat example has the issue.
1883
1884 Turns out I was or'ing the stroke/fillOpacity with regular opacity in _getGraphicStyle. That's not the right place to do anything with them, and never or.
1885
1886 === service opacity ===
1887 I'm going to pull in the service opacity method from AppGeo.Web as "opacity" on each service object, like refresh.
1888
1889 That's done. I haven't documented/implemented what happens if you don't pass a service id. It's required. I'm not sure what I want that to do yet.
1890
1891 === visible ===
1892 When starting to think about geomap.toggle, I realize I have a naming conflict so to speak. The service object has a boolean visible property while the shape style has a string visibility property. I think I want to change the service to match the shape style. I don't think there are any attributes in HTML that pertains to visibility so I'm going to match CSS even in the service object which is more internal and less graphical. That said, I don't want to start renaming things in alpha 2.5 so that'll wait until 3.
1893
1894 SUGGESTION: Rename service.visible to visibility having either "visible" or "hidden" values
1895
1896 === service props ===
1897 So, I noticed that when a service is created, I don't modify the service objects to fill all the supported properties. So, when toggle is called, there's potentially not an initial visible property set.
1898
1899 I think for now, alpha 2.5, I will have the toggle function assume that there could be an undefined service.visible. The refresh method does the same. Later, though I think I might want to set defaults during _createServices.
1900
1901 === proj ===
1902 New projection code seems to work and is awesomely 150 lines shorter!
1903
1904 === resize ===
1905 I'm going to hook into the window resize event automatically but I will still need a resize method later in case the dev changes the div size/css.
1906
1907 SUGGESTION: Add a resize method to let geomap know the div has changed size programatically
1908
1909 I'm not sure of the correct way to kill & remake graphics now that it's a jQuery UI widget. It appears that I can call distroy & re-create it.
1910
1911 Resize, is working though when getting smaller, there is a space for the scroll bars. I don't remember having that issue with the internal AppGeo.Web control. That is an issue to tackle after alpha 2.5.
1912
1913 === dbl tap ===
1914 What is a thumb? On touch devices, and other soft-dblclick devices I don't take into account that the second click/tap might be too far from the first to count as a tap. There is no move event to cancel. I'm now calculating distance between the two based on _anchor (previous) and _current ( current :). This will need testing. I'm setting it at 10px for now, line 1480 of geomap.js as of this writing.
1915
1916 == 2011-07-19 ==
1917 === wkt ===
1918 Wrote up some to-WKT code for our internal control today. WKT will also be supported by parseWKT and textify methods in $.geo.
1919
1920 SUGGESTION: Support WKT with $.geo.parseWKT (like JSON.parse or $.parseJSON) and $.geo.textify (like JSON.stringify).
1921
1922 === centroid ===
1923 Wrote up some centroid code for all but GeometryCollection as well for our internal control. Code similar to this will end up in $.geo.centroid.
1924
1925 == 2011-07-15 ==
1926 === presentation ===
1927 My first real talk about $.geo went well, I think. Next up is FOSS4G in September and, possibly, jQuery Conference Boston in October & Harvard WWW in December.
1928
1929 === alpha 2.5 ===
1930 I think I want to push out a bug-fix release of the alpha 2 tech. I'll tag it as alpha 2.5 in github but overwrite the alpha2 js file on host. Well, rename the old one as alpha2.0 in case people find a bug in the new one.
1931
1932 I need to write down exactly what to do for alpha 2.5.
1933
1934 === shape images ===
1935 People really want images on shapes, particularly points. I'm removing this feature from my TO DO list:
1936 * geomap - Document and implement passing a function to shapeStyle and append that returns a geomap style object based on feature or geometry properties
1937 because I have a much better plan that involves the label div. It will be a normal div and have a class. Each will have relative position and designers can manipulate it however they want.
1938
1939 == 2011-07-12 ==
1940 === fiddles ===
1941 Some fiddles for my demo on Wednesday:
1942
1943 # show a map:
1944 #* http://jsfiddle.net/ryanttb/A6avG/
1945 # show a map & zoom to boston
1946 #* http://jsfiddle.net/ryanttb/2qBgw/
1947 # show a map & zoom to geolocation
1948 #* http://jsfiddle.net/ryanttb/Pre4k/
1949 # add a location search
1950 #* http://jsfiddle.net/ryanttb/3LpqG/
1951 # add a twitter search: rpp=100
1952 #* http://jsfiddle.net/ryanttb/79zTk/
1953 # use map center as geocode, radius=(pixelSize * width/2 ) / 1000
1954 #* http://jsfiddle.net/ryanttb/2PCUu/
1955 # change style to heat map (16x16 size 8 border-radius)
1956 #* http://jsfiddle.net/ryanttb/PUeRc/
1957 # update on bboxchange
1958 #* http://jsfiddle.net/ryanttb/8LQLW/
1959 # show tweets in popup
1960 #* http://jsfiddle.net/ryanttb/y2gTh/
1961
1962 == 2011-07-07 ==
1963 === bbox ===
1964 I added bbox caching! I even check to see if the GeoJSON object has a bbox property, which is legal. There's no way to update the bbox but that'll come later.
1965
1966 === distance ===
1967 I almost tried to have distance support taking in a Feature but that opens a whole can of worms. I'm going to fix find to only send base geometry types to distance.
1968
1969 DOCUMENT: geometry methods will only take base geometry types (Point, LineString, Polygon & Multi*) or coordinate arrays
1970
1971 I had some weird comment on this method, it should be documented to only take base types, as I just said.
1972
1973 === form input ===
1974 I was talking to Chris last night about what geomap does that others don't and he reminded my about the idea I had of keeping a hidden input of the shapes as WKT. This would mean that I had to have a property on geomap for the map's name and also definitely change the service object to use name instead of id for when I add service-level shapes. WKT becomes a problem though when they've added features. I suppose I would dig into the features and only pull the geometry.
1975
1976 === json ===
1977 It's been a while since alpha 2. I'm working on a demo that draws the US state boundaries as graphics.
1978
1979 == 2011-06-30 ==
1980 === min ===
1981 Srsly? I wasn't using minified jQuery in my examples? Wow.
1982
1983 == 2011-06-29 ==
1984 === alpha2 ===
1985 Released alpha 2. I don't think anyone's really using it yet though.
1986
1987 == 2011-06-28 ==
1988 === on services ===
1989 I think it would be nice to deep extend service objects that come in via the services property if a service with the given id already exists in _currentServices. This way, you could set the initial opacity of OSM by simply sending {services: [{id: "OSM", opacity: .8}]} during init.
1990
1991 SUGGESTION: deep extend existing service objects when services property is set
1992
1993 === on opacity ===
1994 I was beginning to try to throw the opacity & toggle methods into alpha2 but setting the services property is too flickery. I want to do it more like the old widget but that will require adding opacity and toggle methods into the services types. That will have to wait. It will be much faster to call the opacity/toggle methods on geomap than to set the services property each time. I will have to document that.
1995
1996 SUGGESTION: require opacity and toggle functions in the service type objects
1997
1998 == 2011-06-27 ==
1999 === on events ===
2000 I almost forgot that I don't want bboxchange to fire when the developer changes a property in code. Unlike jQuery UI, my events trigger only when the user does something.
2001
2002 === on alpha 2 ===
2003 I'm trying to put this together.
2004
2005 == 2011-06-24 ==
2006
2007 === on shape methods ===
2008 I'm almost done. I need to finish empty and then I have what I wanted for an alpha 2 release!
2009
2010 === on Point vs. coordinate ===
2011 I think I'm going to settle on using Point objects everywhere except the projection functions. Which means I need to change find to accept a Point instead of an array. This should work out because the position events already send GeoJSON objects instead of position arrays.
2012
2013 === on geometry ===
2014 contains doesn't care about projections. Lon/lat values do not need to be projected.
2015
2016 I got done some of the geometry functions in $.geo but I'm leaving them private for now until I have a chance to document them and fully implement them.
2017
2018 === on proj ===
2019 Finished changing the $.geo.proj docs to explain that it will convert any GeoJSON coordinates array. I think I will also change the requirements to implement other projections by having the developer only have to override single position conversion functions (instead of worrying about the dimentionality of the passed array). Done.
2020
2021 === on find ===
2022 Now that proj is more powerful, I think I can handle find.
2023
2024 == 2011-06-18 ==
2025 Accidentally coded append differently than how I documented. Will fix the code. Documentation FTW!
2026
2027 I can't decide if the geometry functions in $.geo should only accept the base geometry types or not. Initially they will not. I don't want to even think about getting into $.geo.distance(multiPoint, geometryCollection).
2028
2029 $.proj should go up to a three dimensional array to handle the coordinates in a Polygon. Go big or go home, I'm going to support four dimensional arrays so that I can get MultiPolygons as well. That will handle all of the GeoJSON types that have the coordinates property. If you have a GeometryCollection (geometries property), a Feature (geometry property) or a FeatureCollection (features property), then you're on your own.
2030
2031 I may change every mention of "web mercator" to "spherical mercator" to be more specific.
2032
2033 == 2011-06-17 ==
2034 Attempting to change drawPoint from ovals to rounded rectangles. Shortcutting to drawArc if the width/height/borderRadius are the same.
2035
2036 Since I plan to make geographics public at some point, I thought I might make the drawPoint/Line/Polygon functions take actual GeoJSON shapes but I think that might conflict with some functionality internal to the geomap during digitization...I'll have to revisit this.
2037
2038 I seriously need to settle on the word "position" in my code when referring to an array containing an x/y. I use coordinate a bunch because that's what I used in the old project. Oh, but the property name of the GeoJSON object is coordinates. Heh, this is so confusing :) Ok, as I have been doing: coordinates in code, position in documentation.
2039
2040 I'm using cowboy's safeParse but can't tell what it's guarding against. I thought it would always give me a number but that's not the case. Guard against NaN or undefined?
2041
2042 Should drawing a bbox ignore borderRadius? I haven't decided.
2043
2044 You can fill and then stroke the same path, just sayin'.
2045
2046 Point graphics now draw as rounded rectangles. There's weirdness if your sizes are a little off though. I should probably start clamping values to each other like width & height to borderRadius. Yeah, if either is smaller than borderRadius the drawing gets weird. Maybe I should clamp borderRadius instead. Probably. Yeah, have to clamp borderRadius to min(width, height)/2.
2047
2048 I don't think you can disable fill by setting style.fill to "", but you should be allowed. It shouldn't be required to set fillOpacity to 0.
2049
2050 I just dropped a couple loops out of my graphic drawing in geographics. Should help a bit :)
2051
2052 == 2011-06-12 ==
2053 I'm finally pushing the renaming changes to the main project.
2054
2055 === On examples ===
2056 I talked to Boaz at Bocoup the other day. He suggested cleaning up the examples. I already had this in mind but I should probably do it sooner rather than later. Especially the simplest example. It will look nicer if I cut the div down to 256x256 to match the initial tile I think (done, it already feels better). I do need to keep the examples specific and don't want to add any HTML or JavaScript to them that does not directly relate to the feature I'm testing in the example.
2057
2058 He also suggested unit tests and an API audit, both of which are great ideas and much needed by $.geo.
2059
2060 === On ovals ===
2061 Peter and I discussed how points are drawn and what width and height mean in geomap styles. We both agree that ovals are not very useful or used constructs in GIS and it would be better to have rounded rectangles. Therefore, I am dropping ovals and intead supporting a borderRadius property. Circles are still possible as long as your width, height and border radius are all the same, you will have a circle. This will be the default.
2062
2063 === On double-click zoom ===
2064 Peter and I both agree that double-click zoom should operate similar to mouse-wheel zoom in that the bbox should scale according to the placement of the mouse cursor during double-click instead of completely re-centering. You will notice that mouse-wheel feels right and double-click can be confusing.
2065
2066 SUGGESTION: Double-click zoom should scale according to cursor location instead of re-centering
2067
2068 === On position events ===
2069 I cannot decide if I should officially make the geo argument passed to the position events (move, click, dblclick) a true GeoJSON Point object. The only difference would be the presense of a type property set to "Point". However, the extra pixels property that I have on the geo argument is not part of GeoJSON and will remain in memory. Also, if a developer pushes the new object to a database they are storing extra information that they don't need and will be useless later.
2070
2071 Is the pixels property even that useful? The dev can call geomap.toPixels if they need it. I added the pixels property just because I had the pixels lying around in the internal handling of the event. I think I might just not pass them. It would be more useful to a developer I think to have a true GeoJSON Point object that they can send to geomap.append or a database without worrying about having extra useless data stored with it.
2072
2073 SUGGESTION: Remove the pixels property from position events and add the type property to make the event argument a true GeoJSON Point
2074
2075 I just updated the docs and changed the implementation. I already like this a lot better and am now thinking that the bbox event type could actually send a true GeoJSON Polygon with the bbox property set. That would be totally within the GeoJSON spec and might be useful. That's a bit of extra code on the widget's side though so for now I'm going to leave it as is. I can add that feature later since the current implementation (an object with just a bbox property) is already partially in a true Polygon's spec.
2076
2077 FUTURE SUGGESTION: Send a true GeoJSON Polygon object as the geo argument of bbox events
2078
2079 === On returning jQuery collections ===
2080 I need to better design the return values of the shape methods other than find & shapeStyle. Should append, remove and emtpy return the jQuery object of the map elements that the call originated from? Probably.
2081
2082 I just tested and yes, as long as you don't issue a return statement inside a jQuery UI widget method, jQuery UI will return the original jQuery collection for you.
2083
2084 == 2011-06-10 ==
2085
2086 === On geographics ===
2087 I am going to leave drawArc in the graphics widget. The drawPoint method will draw our default point shape (rounded rectangle) but, in the future, when custom drawing is in, a developer can use the drawArc if they want.
2088
2089 === On proj ===
2090 Peter has updated web mercator <=> geodetic code for me to drop into $.geo.proj.
2091
2092 == 2011-06-06 ==
2093
2094 === On renaming shape functions ===
2095 Renamed the shape functions. That was annoying but I'm glad I only had addShape implemented.
2096
2097 === On jQuery UI widgets ===
2098 The widget factory does hide methods that start _ from being called. So much for renaming drawArc to _drawArc and still calling it from geomap.
2099
2100 DEPRECATED SUGGESTION: Turn geographics into a NON-jQuery UI plugin
2101
2102 Did I totally get the scoping wrong for the jQuery UI widget? I have local vars in my initial plugin closure. Will they conflict if there are more than one map?
2103
2104 SUGGESTION: Verify that vars local to initial closure do not conflict when multiple maps are placed
2105
2106 == 2011-06-04 ==
2107
2108 === drawArc ===
2109 I just realized that by dropping geographics.drawArc in favor of drawPoint I am losing the ability to draw the circles I need for digitization modes. I wonder if, before I turn DrawPoint into a box-like function, that I should copy it to _drawArc. Will jQueryUI.widget let me call it from geomap?
2110
2111 === shapes ===
2112 Chris and I were talking about merging append (previously addshape) and find into one call: shapes. If you pass a GeoJSON object or array of, it will add them. Otherwise, it will find them. Thinking about this today, I don't quite think that's the way to go. I mostly feel that calling geomap functions to manipulate shapes is closer to adding elements to a jQuery collection. In other words, to call the geomap functions you must have already wrapped an element with jQuery, $("#map").geomap("funcName"). When you wrap elements with jQuery normally, you have to call append, find, etc. Geomap will work the same with. Of course, I do still want the syntactic sugar later: $("#map").append(geoJsonObj);
2113
2114 == 2011-06-02 ==
2115 Who needs a blog. I feel like the best place to keep a developer journal is in the project itself so here we go.
2116
2117 === On addShape's style argument ===
2118 I showed Peter the shapeStyle demo. He expected that the shape-specific style applied via addShape would only override properties set during addShape. Further manipulation of the base shapeStyle would cascade to the shapes for any properties not explictily set. You know, like CSS. This is obviously the correct way to go and I already forget what made me code it the other way last night. Likely that I was coding at 2am and thought that if a user was passing a style to addShape they would want ALL style properties set in stone for that shape. That is not the right idea. If they want all properties set in stone, they can override all properties in the style object sent to addShape.
2119
2120 I changed the implementation before leaving work.
2121
2122 === On storing & modifying style ===
2123 My initial implementation drawing shapes in $.geo is very similar to how I did it with our internal control. I also showed Chris the shapeStyle demo and explained how you can add a style that's different from the base style on the map. He suggested that there be a way to change the style of an already added shape. I figured that I could make addShape update existing geometries instead of adding a new one but the syntax felt wrong. An updateShape method would work and could pass right through to addShape internally.
2124
2125 He also suggested allowing access to the internal GeoJSON->style map (as a return value for addShape) so they can maybe change the existing styles that way. However, something doesn't feel correctly designed about that.
2126
2127 We discussed attaching the style to the GeoJSON object. I already had supporting that in mind. If the user happens to have put a style property on the GeoJSON object before passing it to addShape, I would use that when drawing. A style passed to addShape would override that. The cascade would be: base style => GeoJSON object style => addShape style. A developer can keep the style property on the object even when it's stored, such as in GeoCouch, something that Guido wants a lot.
2128
2129 That said, I know I'm going about this wrong. As I said, my initial implementation feels too much like the old one and I want to do something much slicker in the jQuery world. On my walk home, I realized that since I am only storing a reference to the GeoJSON object and the user supplied style I can probably connect the style object to the GeoJSON object using jQuery's data method.
2130
2131 I wasn't sure if targeting a plain object is allowed in jQuery. I know it's possible but that doesn't mean I should. I remember IRC talk about it but forget the outcome. Info on ticket 8108 (http://bugs.jquery.com/ticket/8108) reveals that the DataLink plugin does this so I'm going to assume it's ok.
2132
2133 This little fiddle shows that the data properties don't show up with stringify http://jsfiddle.net/ryanttb/PetpJ/ but I'm going to do more research to see if it changes the object in a way devs will notice.
2134
2135 The data method doesn't natively support namespacing. I could do it myself using a period but I would like to follow what jQuery Mobile is doing with their data attribute stuff. They use data-jm-role which I believe equates to the call .data("jmRole") but I need to check up on that as well. So if I were to do data-geo-style, that would be .data("geoStyle"). I can live with that.
2136
2137 SUGGESTION: Store $.geo styles via $(geoJsonObj).data("geoStyle", style)
2138
2139 === On shape functions ===
2140 Again, the shape functions feel very old and were grabbed from my internal control. Tonight I was thinking about a new way to do this and it involves being able to wrap GeoJSON objects with jQuery collections and intercept $.fn calls such as .css. Also, non-jQuery UI functions can be added to the geomap widget's div to replace the old addShape method.
2141
2142 For example: $("#map").geomap("addShape", geoJson) could be $("#map").append(geoJson).
2143
2144 How would I add shapes to specific services in the future? $("#map [data-geo-service='OSM']").append(geoJson) maybe.
2145
2146 This might be going too far. Perhaps the old way is fine but use newer names (without the Shape suffix): $("#map").geomap("append", geoJsonObj), $("#map").geomap("append", "OSM", geoJsonObj), $("#map").geomap("remove", geoJsonObj) and $("#map").geomap("empty").
2147
2148 SUGGESTION: Rename the shape manipulation methods
2149
2150 The methods also need to take arrays of GeoJSON objects as returned by databases and jQuery collections of GeoJSON objects as possibly returned by the find method.
2151
2152 SUGGESTION: Shape manipulation methods should handle arrays
2153
2154 Looking back at the above code, I feel like maybe if I really can get the selector-based way to work, e.g., intercept the append call on the geomap widget, I could target the services using a class. They are divs inside the map, I should be able to trap them:
2155
2156 $("#map .OSM").append(geoJsonObj);
2157
2158 That does look really nice.
2159
2160 SUGGESTION: (future) Trap existing jQuery calls: append, remove and emtpy, on both the widget element and the service elements as syntactic sugar, forward them to geomap calls
2161
2162 However, using the class selector feels wrong. Especially if I'm telling them to use the id property when creating the service objects. I could switch it to name when creating the service objects, then:
2163
2164 $("#map [name='OSM']").append(geoJsonObj);
2165
2166 I need to find out if any of this is possible as soon as possible. It's still shorter than calling geomap. I would have to warn users to make sure the space is there, this needs to be a descendant selector.
2167
2168 SUGGESTION: Use name instead of id in the service objects.
2169
2170 === On finding shapes ===
2171 So you can append and remove shapes. Fine. But I also want a better way to search for shapes. Chris and I mulled over a selector-based way. I think I still want the simplicity of $("#map").geomap("find", position, pixelTol). That will cover a lot of use cases, users click maps a lot.
2172
2173 However, there should be other ways to get at your shapes in a UI widget way:
2174 $("#map").geomap("find", [-67, 43], 8); // find all shapes within 8px of the map position (special case)
2175 $("#map").geomap("find", "[type='Point']"); // Finds all points
2176 $("#map").geomap("find", "[name='OSM'] *"); // all shapes in the OSM service (future)
2177 $("#map").geomap("find", ":intersects(wkt(POINT(-67 43)))"); // Advanced spatial filter, OGC selector names (way future)
2178
2179 Here's how they would look with the future jQuery syntactic sugar:
2180 $("#map").find([-67, 43], 8); // find all shapes within 8px of the map position (special case)
2181 $("#map").find("[type='Point']"); // Finds all points
2182 $("#map [name='OSM']").find(); // all shapes in the OSM service (future)
2183 $("#map").find(":intersects(wkt(POINT(-67 43)))"); // Advanced spatial filter, OGC selector names (way future)
2184