simpler-tiles 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +2 -0
  3. data/LICENSE +19 -0
  4. data/README +22 -0
  5. data/Rakefile +71 -0
  6. data/doc/SimplerTiles/Bounds.html +506 -0
  7. data/doc/SimplerTiles/Layer.html +593 -0
  8. data/doc/SimplerTiles/Map.html +2081 -0
  9. data/doc/SimplerTiles/PP.html +204 -0
  10. data/doc/SimplerTiles/Query.html +521 -0
  11. data/doc/SimplerTiles/Style.html +577 -0
  12. data/doc/SimplerTiles.html +167 -0
  13. data/doc/_index.html +188 -0
  14. data/doc/class_list.html +47 -0
  15. data/doc/css/common.css +1 -0
  16. data/doc/css/full_list.css +55 -0
  17. data/doc/css/style.css +322 -0
  18. data/doc/file.README.html +89 -0
  19. data/doc/file_list.html +49 -0
  20. data/doc/frames.html +13 -0
  21. data/doc/index.html +89 -0
  22. data/doc/js/app.js +205 -0
  23. data/doc/js/full_list.js +173 -0
  24. data/doc/js/jquery.js +16 -0
  25. data/doc/method_list.html +390 -0
  26. data/doc/top-level-namespace.html +105 -0
  27. data/ext/simpler_tiles/bounds.c +90 -0
  28. data/ext/simpler_tiles/bounds.h +17 -0
  29. data/ext/simpler_tiles/depend +7 -0
  30. data/ext/simpler_tiles/extconf.rb +42 -0
  31. data/ext/simpler_tiles/layer.c +93 -0
  32. data/ext/simpler_tiles/layer.h +16 -0
  33. data/ext/simpler_tiles/map.c +338 -0
  34. data/ext/simpler_tiles/map.h +17 -0
  35. data/ext/simpler_tiles/query.c +87 -0
  36. data/ext/simpler_tiles/query.h +17 -0
  37. data/ext/simpler_tiles/simpler_tiles.c +16 -0
  38. data/ext/simpler_tiles/simpler_tiles.h +25 -0
  39. data/ext/simpler_tiles/style.c +106 -0
  40. data/ext/simpler_tiles/style.h +17 -0
  41. data/index.erb +459 -0
  42. data/index.html +439 -0
  43. data/lib/simpler_tiles/bounds.rb +19 -0
  44. data/lib/simpler_tiles/layer.rb +25 -0
  45. data/lib/simpler_tiles/map.rb +55 -0
  46. data/lib/simpler_tiles/mixins/pp.rb +13 -0
  47. data/lib/simpler_tiles/query.rb +28 -0
  48. data/lib/simpler_tiles/style.rb +19 -0
  49. data/lib/simpler_tiles/version.rb +4 -0
  50. data/lib/simpler_tiles.rb +13 -0
  51. data/simpler-tiles-logo.png +0 -0
  52. data/simpler-tiles.gemspec +30 -0
  53. data/test/helper.rb +8 -0
  54. data/test/test_map.rb +67 -0
  55. data/test/test_simpler_tiles.rb +26 -0
  56. metadata +199 -0
@@ -0,0 +1,593 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: SimplerTiles::Layer
8
+
9
+ &mdash; Documentation by YARD 0.7.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../_index.html">Index (L)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../SimplerTiles.html" title="SimplerTiles (module)">SimplerTiles</a></span></span>
38
+ &raquo;
39
+ <span class="title">Layer</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Class: SimplerTiles::Layer
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+ <dt class="r1">Inherits:</dt>
68
+ <dd class="r1">
69
+ <span class="inheritName">Object</span>
70
+
71
+ <ul class="fullTree">
72
+ <li>Object</li>
73
+
74
+ <li class="next">SimplerTiles::Layer</li>
75
+
76
+ </ul>
77
+ <a href="#" class="inheritanceTree">show all</a>
78
+
79
+ </dd>
80
+
81
+
82
+
83
+
84
+
85
+
86
+ <dt class="r2">Includes:</dt>
87
+ <dd class="r2"><span class='object_link'><a href="PP.html" title="SimplerTiles::PP (module)">PP</a></span></dd>
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r1 last">Defined in:</dt>
94
+ <dd class="r1 last">lib/simpler_tiles/layer.rb<span class="defines">,<br />
95
+ ext/simpler_tiles/layer.c</span>
96
+ </dd>
97
+
98
+ </dl>
99
+ <div class="clear"></div>
100
+
101
+ <h2>Overview</h2><div class="docstring">
102
+ <div class="discussion">
103
+ <p>
104
+ The Layer object contains connection info for a particular datasource and
105
+ tracks a list of <span class='object_link'><a href="Query.html" title="SimplerTiles::Query (class)">Query</a></span>s.
106
+ </p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>
123
+ Instance Method Summary
124
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
125
+ </h2>
126
+
127
+ <ul class="summary">
128
+
129
+ <li class="public ">
130
+ <span class="summary_signature">
131
+
132
+ <a href="#add_query-instance_method" title="#add_query (instance method)">- (Query) <strong>add_query</strong> </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'><p>
146
+ Add a query object to this Layer&#8217;s list of queries.
147
+ </p>
148
+ </div></span>
149
+
150
+ </li>
151
+
152
+
153
+ <li class="public ">
154
+ <span class="summary_signature">
155
+
156
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Layer) <strong>initialize</strong>(source) {|_self| ... }</a>
157
+
158
+
159
+
160
+ </span>
161
+
162
+ <span class="note title constructor">constructor</span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'><p>
172
+ Initialize a Layer.
173
+ </p>
174
+ </div></span>
175
+
176
+ </li>
177
+
178
+
179
+ <li class="public ">
180
+ <span class="summary_signature">
181
+
182
+ <a href="#query-instance_method" title="#query (instance method)">- (Object) <strong>query</strong>(sql, &amp;blk) </a>
183
+
184
+
185
+
186
+ </span>
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ <span class="summary_desc"><div class='inline'><p>
196
+ Add a query to this Layer&#8217;s c list.
197
+ </p>
198
+ </div></span>
199
+
200
+ </li>
201
+
202
+
203
+ <li class="public ">
204
+ <span class="summary_signature">
205
+
206
+ <a href="#source-instance_method" title="#source (instance method)">- (String) <strong>source</strong> </a>
207
+
208
+
209
+
210
+ </span>
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ <span class="summary_desc"><div class='inline'><p>
220
+ Get a copy of the Layer&#8217;s source.
221
+ </p>
222
+ </div></span>
223
+
224
+ </li>
225
+
226
+
227
+ <li class="public ">
228
+ <span class="summary_signature">
229
+
230
+ <a href="#source%3D-instance_method" title="#source= (instance method)">- (String) <strong>source=</strong> </a>
231
+
232
+
233
+
234
+ </span>
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ <span class="summary_desc"><div class='inline'><p>
244
+ Set the source attribute for the Layer.
245
+ </p>
246
+ </div></span>
247
+
248
+ </li>
249
+
250
+
251
+ </ul>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="PP.html" title="SimplerTiles::PP (module)">PP</a></span></h3>
263
+ <p class="inherited"><span class='object_link'><a href="PP.html#inspect-instance_method" title="SimplerTiles::PP#inspect (method)">#inspect</a></span></p>
264
+ <div id="constructor_details" class="method_details_list">
265
+ <h2>Constructor Details</h2>
266
+
267
+ <div class="method_details first">
268
+ <p class="signature first" id="initialize-instance_method">
269
+
270
+ - (<tt><span class='object_link'><a href="" title="SimplerTiles::Layer (class)">Layer</a></span></tt>) <strong>initialize</strong>(source) {|_self| ... }
271
+
272
+
273
+
274
+ </p><div class="docstring">
275
+ <div class="discussion">
276
+ <p>
277
+ Initialize a Layer
278
+ </p>
279
+
280
+
281
+ </div>
282
+ </div>
283
+ <div class="tags">
284
+
285
+ <h3>Yields:</h3>
286
+ <ul class="yield">
287
+
288
+ <li>
289
+
290
+
291
+ <span class='type'>(<tt>_self</tt>)</span>
292
+
293
+
294
+
295
+ </li>
296
+
297
+ </ul>
298
+ <h3>Yield Parameters:</h3>
299
+ <ul class="yieldparam">
300
+
301
+ <li>
302
+
303
+ <span class='name'>_self</span>
304
+
305
+
306
+ <span class='type'>(<tt><span class='object_link'><a href="" title="SimplerTiles::Layer (class)">SimplerTiles::Layer</a></span></tt>)</span>
307
+
308
+
309
+
310
+ &mdash;
311
+ <div class='inline'><p>
312
+ the object that the method was called on
313
+ </p>
314
+ </div>
315
+
316
+ </li>
317
+
318
+ </ul>
319
+
320
+ </div><table class="source_code">
321
+ <tr>
322
+ <td>
323
+ <pre class="lines">
324
+
325
+
326
+ 8
327
+ 9
328
+ 10
329
+ 11</pre>
330
+ </td>
331
+ <td>
332
+ <pre class="code"><span class="info file"># File 'lib/simpler_tiles/layer.rb', line 8</span>
333
+
334
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_source identifier id'>source</span><span class='rparen token'>)</span>
335
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_source identifier id'>source</span> <span class='assign token'>=</span> <span class='rubyid_source identifier id'>source</span>
336
+ <span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_self self kw'>self</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span>
337
+ <span class='rubyid_end end kw'>end</span>
338
+ </pre>
339
+ </td>
340
+ </tr>
341
+ </table>
342
+ </div>
343
+
344
+ </div>
345
+
346
+
347
+ <div id="instance_method_details" class="method_details_list">
348
+ <h2>Instance Method Details</h2>
349
+
350
+
351
+ <div class="method_details first">
352
+ <p class="signature first" id="add_query-instance_method">
353
+
354
+ - (<tt><span class='object_link'><a href="Query.html" title="SimplerTiles::Query (class)">Query</a></span></tt>) <strong>add_query</strong>
355
+
356
+
357
+
358
+ </p><div class="docstring">
359
+ <div class="discussion">
360
+ <p>
361
+ Add a query object to this Layer&#8217;s list of queries.
362
+ </p>
363
+
364
+
365
+ </div>
366
+ </div>
367
+ <div class="tags">
368
+ <h3>Parameters:</h3>
369
+ <ul class="param">
370
+
371
+ <li>
372
+
373
+ <span class='name'></span>
374
+
375
+
376
+ <span class='type'>(<tt>String</tt>)</span>
377
+
378
+
379
+
380
+ </li>
381
+
382
+ </ul>
383
+
384
+ <h3>Returns:</h3>
385
+ <ul class="return">
386
+
387
+ <li>
388
+
389
+
390
+ <span class='type'>(<tt><span class='object_link'><a href="Query.html" title="SimplerTiles::Query (class)">Query</a></span></tt>)</span>
391
+
392
+
393
+
394
+ </li>
395
+
396
+ </ul>
397
+
398
+ </div><table class="source_code">
399
+ <tr>
400
+ <td>
401
+ <pre class="lines">
402
+
403
+
404
+ </pre>
405
+ </td>
406
+ <td>
407
+ <pre class="code"><span class="info file"># File 'ext/simpler_tiles/layer.c'</span>
408
+
409
+ <span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
410
+ <span class='rubyid_add_query identifier id'>add_query</span><span class='lparen token'>(</span><span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_self self kw'>self</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_query identifier id'>query</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
411
+ </pre>
412
+ </td>
413
+ </tr>
414
+ </table>
415
+ </div>
416
+
417
+ <div class="method_details ">
418
+ <p class="signature " id="query-instance_method">
419
+
420
+ - (<tt>Object</tt>) <strong>query</strong>(sql, &amp;blk)
421
+
422
+
423
+
424
+ </p><div class="docstring">
425
+ <div class="discussion">
426
+ <p>
427
+ Add a query to this Layer&#8217;s c list.
428
+ </p>
429
+
430
+
431
+ </div>
432
+ </div>
433
+ <div class="tags">
434
+
435
+
436
+ </div><table class="source_code">
437
+ <tr>
438
+ <td>
439
+ <pre class="lines">
440
+
441
+
442
+ 14
443
+ 15
444
+ 16
445
+ 17</pre>
446
+ </td>
447
+ <td>
448
+ <pre class="code"><span class="info file"># File 'lib/simpler_tiles/layer.rb', line 14</span>
449
+
450
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_query identifier id'>query</span><span class='lparen token'>(</span><span class='rubyid_sql identifier id'>sql</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_blk identifier id'>blk</span><span class='rparen token'>)</span>
451
+ <span class='rubyid_layer identifier id'>layer</span> <span class='assign token'>=</span> <span class='rubyid_SimplerTiles constant id'>SimplerTiles</span><span class='colon2 op'>::</span><span class='rubyid_Query constant id'>Query</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_sql identifier id'>sql</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_blk identifier id'>blk</span><span class='rparen token'>)</span>
452
+ <span class='rubyid_add_query identifier id'>add_query</span> <span class='rubyid_layer identifier id'>layer</span>
453
+ <span class='rubyid_end end kw'>end</span>
454
+ </pre>
455
+ </td>
456
+ </tr>
457
+ </table>
458
+ </div>
459
+
460
+ <div class="method_details ">
461
+ <p class="signature " id="source-instance_method">
462
+
463
+ - (<tt>String</tt>) <strong>source</strong>
464
+
465
+
466
+
467
+ </p><div class="docstring">
468
+ <div class="discussion">
469
+ <p>
470
+ Get a copy of the Layer&#8217;s source.
471
+ </p>
472
+
473
+
474
+ </div>
475
+ </div>
476
+ <div class="tags">
477
+
478
+ <h3>Returns:</h3>
479
+ <ul class="return">
480
+
481
+ <li>
482
+
483
+
484
+ <span class='type'>(<tt>String</tt>)</span>
485
+
486
+
487
+
488
+ </li>
489
+
490
+ </ul>
491
+
492
+ </div><table class="source_code">
493
+ <tr>
494
+ <td>
495
+ <pre class="lines">
496
+
497
+
498
+ </pre>
499
+ </td>
500
+ <td>
501
+ <pre class="code"><span class="info file"># File 'ext/simpler_tiles/layer.c'</span>
502
+
503
+ <span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
504
+ <span class='rubyid_get_source identifier id'>get_source</span><span class='lparen token'>(</span><span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
505
+ <span class='rubyid_simplet_layer_t identifier id'>simplet_layer_t</span> <span class='mult op'>*</span><span class='rubyid_layer identifier id'>layer</span> <span class='assign token'>=</span> <span class='rubyid_get_layer identifier id'>get_layer</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span><span class='semicolon token'>;</span>
506
+ <span class='rubyid_char identifier id'>char</span> <span class='mult op'>*</span><span class='rubyid_source identifier id'>source</span><span class='semicolon token'>;</span>
507
+ <span class='rubyid_simplet_layer_get_source identifier id'>simplet_layer_get_source</span><span class='lparen token'>(</span><span class='rubyid_layer identifier id'>layer</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_source identifier id'>source</span><span class='rparen token'>)</span><span class='semicolon token'>;</span>
508
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_rb_str_new2 identifier id'>rb_str_new2</span><span class='lparen token'>(</span><span class='rubyid_source identifier id'>source</span><span class='rparen token'>)</span><span class='semicolon token'>;</span>
509
+ <span class='rbrace token'>}</span>
510
+ </pre>
511
+ </td>
512
+ </tr>
513
+ </table>
514
+ </div>
515
+
516
+ <div class="method_details ">
517
+ <p class="signature " id="source=-instance_method">
518
+
519
+ - (<tt>String</tt>) <strong>source=</strong>
520
+
521
+
522
+
523
+ </p><div class="docstring">
524
+ <div class="discussion">
525
+ <p>
526
+ Set the source attribute for the Layer.
527
+ </p>
528
+
529
+
530
+ </div>
531
+ </div>
532
+ <div class="tags">
533
+ <h3>Parameters:</h3>
534
+ <ul class="param">
535
+
536
+ <li>
537
+
538
+ <span class='name'></span>
539
+
540
+
541
+ <span class='type'>(<tt>String</tt>)</span>
542
+
543
+
544
+
545
+ </li>
546
+
547
+ </ul>
548
+
549
+ <h3>Returns:</h3>
550
+ <ul class="return">
551
+
552
+ <li>
553
+
554
+
555
+ <span class='type'>(<tt>String</tt>)</span>
556
+
557
+
558
+
559
+ </li>
560
+
561
+ </ul>
562
+
563
+ </div><table class="source_code">
564
+ <tr>
565
+ <td>
566
+ <pre class="lines">
567
+
568
+
569
+ </pre>
570
+ </td>
571
+ <td>
572
+ <pre class="code"><span class="info file"># File 'ext/simpler_tiles/layer.c'</span>
573
+
574
+ <span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
575
+ <span class='rubyid_set_source identifier id'>set_source</span><span class='lparen token'>(</span><span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_self self kw'>self</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_source identifier id'>source</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
576
+ </pre>
577
+ </td>
578
+ </tr>
579
+ </table>
580
+ </div>
581
+
582
+ </div>
583
+
584
+ </div>
585
+
586
+ <div id="footer">
587
+ Generated on Wed Mar 7 20:33:23 2012 by
588
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
589
+ 0.7.5 (ruby-1.8.7).
590
+ </div>
591
+
592
+ </body>
593
+ </html>