simpler-tiles 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +2 -0
- data/LICENSE +19 -0
- data/README +22 -0
- data/Rakefile +71 -0
- data/doc/SimplerTiles/Bounds.html +506 -0
- data/doc/SimplerTiles/Layer.html +593 -0
- data/doc/SimplerTiles/Map.html +2081 -0
- data/doc/SimplerTiles/PP.html +204 -0
- data/doc/SimplerTiles/Query.html +521 -0
- data/doc/SimplerTiles/Style.html +577 -0
- data/doc/SimplerTiles.html +167 -0
- data/doc/_index.html +188 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +89 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +89 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +390 -0
- data/doc/top-level-namespace.html +105 -0
- data/ext/simpler_tiles/bounds.c +90 -0
- data/ext/simpler_tiles/bounds.h +17 -0
- data/ext/simpler_tiles/depend +7 -0
- data/ext/simpler_tiles/extconf.rb +42 -0
- data/ext/simpler_tiles/layer.c +93 -0
- data/ext/simpler_tiles/layer.h +16 -0
- data/ext/simpler_tiles/map.c +338 -0
- data/ext/simpler_tiles/map.h +17 -0
- data/ext/simpler_tiles/query.c +87 -0
- data/ext/simpler_tiles/query.h +17 -0
- data/ext/simpler_tiles/simpler_tiles.c +16 -0
- data/ext/simpler_tiles/simpler_tiles.h +25 -0
- data/ext/simpler_tiles/style.c +106 -0
- data/ext/simpler_tiles/style.h +17 -0
- data/index.erb +459 -0
- data/index.html +439 -0
- data/lib/simpler_tiles/bounds.rb +19 -0
- data/lib/simpler_tiles/layer.rb +25 -0
- data/lib/simpler_tiles/map.rb +55 -0
- data/lib/simpler_tiles/mixins/pp.rb +13 -0
- data/lib/simpler_tiles/query.rb +28 -0
- data/lib/simpler_tiles/style.rb +19 -0
- data/lib/simpler_tiles/version.rb +4 -0
- data/lib/simpler_tiles.rb +13 -0
- data/simpler-tiles-logo.png +0 -0
- data/simpler-tiles.gemspec +30 -0
- data/test/helper.rb +8 -0
- data/test/test_map.rb +67 -0
- data/test/test_simpler_tiles.rb +26 -0
- metadata +199 -0
@@ -0,0 +1,2081 @@
|
|
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::Map
|
8
|
+
|
9
|
+
— 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 (M)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../SimplerTiles.html" title="SimplerTiles (module)">SimplerTiles</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Map</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::Map
|
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::Map</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/map.rb<span class="defines">,<br />
|
95
|
+
ext/simpler_tiles/map.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 Map object is the root of the style declaration for SimplerTiles. It
|
105
|
+
wraps the methods in Simple Tiles and tracks projection, width, height and
|
106
|
+
contains a list of Layer objects.
|
107
|
+
</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>
|
124
|
+
Instance Method Summary
|
125
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
126
|
+
</h2>
|
127
|
+
|
128
|
+
<ul class="summary">
|
129
|
+
|
130
|
+
<li class="public ">
|
131
|
+
<span class="summary_signature">
|
132
|
+
|
133
|
+
<a href="#add_layer-instance_method" title="#add_layer (instance method)">- (Layer) <strong>add_layer</strong> </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'><p>
|
147
|
+
Create and return a <span class='object_link'><a href="Layer.html" title="SimplerTiles::Layer (class)">Layer</a></span> based on the passed in string.
|
148
|
+
</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#ar_layer-instance_method" title="#ar_layer (instance method)">- (Object) <strong>ar_layer</strong> </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<span class="summary_desc"><div class='inline'><p>
|
171
|
+
A convienence method to use Active Record configuration and add a new
|
172
|
+
layer.
|
173
|
+
</p>
|
174
|
+
</div></span>
|
175
|
+
|
176
|
+
</li>
|
177
|
+
|
178
|
+
|
179
|
+
<li class="public ">
|
180
|
+
<span class="summary_signature">
|
181
|
+
|
182
|
+
<a href="#bgcolor-instance_method" title="#bgcolor (instance method)">- (String) <strong>bgcolor</strong> </a>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
</span>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<span class="summary_desc"><div class='inline'><p>
|
196
|
+
Return a copy of the background color of the map.
|
197
|
+
</p>
|
198
|
+
</div></span>
|
199
|
+
|
200
|
+
</li>
|
201
|
+
|
202
|
+
|
203
|
+
<li class="public ">
|
204
|
+
<span class="summary_signature">
|
205
|
+
|
206
|
+
<a href="#bgcolor%3D-instance_method" title="#bgcolor= (instance method)">- (nil) <strong>bgcolor=</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
|
+
Set the background color of the map.
|
221
|
+
</p>
|
222
|
+
</div></span>
|
223
|
+
|
224
|
+
</li>
|
225
|
+
|
226
|
+
|
227
|
+
<li class="public ">
|
228
|
+
<span class="summary_signature">
|
229
|
+
|
230
|
+
<a href="#bounds-instance_method" title="#bounds (instance method)">- (Bounds) <strong>bounds</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
|
+
Return the bounds of this map.
|
245
|
+
</p>
|
246
|
+
</div></span>
|
247
|
+
|
248
|
+
</li>
|
249
|
+
|
250
|
+
|
251
|
+
<li class="public ">
|
252
|
+
<span class="summary_signature">
|
253
|
+
|
254
|
+
<a href="#buffer-instance_method" title="#buffer (instance method)">- (Number) <strong>buffer</strong> </a>
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
</span>
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<span class="summary_desc"><div class='inline'><p>
|
268
|
+
Get the Map’s buffer.
|
269
|
+
</p>
|
270
|
+
</div></span>
|
271
|
+
|
272
|
+
</li>
|
273
|
+
|
274
|
+
|
275
|
+
<li class="public ">
|
276
|
+
<span class="summary_signature">
|
277
|
+
|
278
|
+
<a href="#buffer%3D-instance_method" title="#buffer= (instance method)">- (Number) <strong>buffer=</strong> </a>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
</span>
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<span class="summary_desc"><div class='inline'><p>
|
292
|
+
Set the buffer on the Map.
|
293
|
+
</p>
|
294
|
+
</div></span>
|
295
|
+
|
296
|
+
</li>
|
297
|
+
|
298
|
+
|
299
|
+
<li class="public ">
|
300
|
+
<span class="summary_signature">
|
301
|
+
|
302
|
+
<a href="#buffered_bounds-instance_method" title="#buffered_bounds (instance method)">- (Bounds) <strong>buffered_bounds</strong> </a>
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
</span>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<span class="summary_desc"><div class='inline'><p>
|
316
|
+
Return the bounds of this map sized according to it’s buffer
|
317
|
+
attribute.
|
318
|
+
</p>
|
319
|
+
</div></span>
|
320
|
+
|
321
|
+
</li>
|
322
|
+
|
323
|
+
|
324
|
+
<li class="public ">
|
325
|
+
<span class="summary_signature">
|
326
|
+
|
327
|
+
<a href="#height-instance_method" title="#height (instance method)">- (Number) <strong>height</strong> </a>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</span>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
<span class="summary_desc"><div class='inline'><p>
|
341
|
+
Get the height of the map.
|
342
|
+
</p>
|
343
|
+
</div></span>
|
344
|
+
|
345
|
+
</li>
|
346
|
+
|
347
|
+
|
348
|
+
<li class="public ">
|
349
|
+
<span class="summary_signature">
|
350
|
+
|
351
|
+
<a href="#height%3D-instance_method" title="#height= (instance method)">- (Number) <strong>height=</strong> </a>
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
</span>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
<span class="summary_desc"><div class='inline'><p>
|
365
|
+
Set the height of the Map.
|
366
|
+
</p>
|
367
|
+
</div></span>
|
368
|
+
|
369
|
+
</li>
|
370
|
+
|
371
|
+
|
372
|
+
<li class="public ">
|
373
|
+
<span class="summary_signature">
|
374
|
+
|
375
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Map) <strong>initialize</strong> {|_self| ... }</a>
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
</span>
|
380
|
+
|
381
|
+
<span class="note title constructor">constructor</span>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
<span class="summary_desc"><div class='inline'><p>
|
391
|
+
Initialize a map with Mercator Projection and a tile square by default.
|
392
|
+
</p>
|
393
|
+
</div></span>
|
394
|
+
|
395
|
+
</li>
|
396
|
+
|
397
|
+
|
398
|
+
<li class="public ">
|
399
|
+
<span class="summary_signature">
|
400
|
+
|
401
|
+
<a href="#layer-instance_method" title="#layer (instance method)">- (Object) <strong>layer</strong>(source, &blk) </a>
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
</span>
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
<span class="summary_desc"><div class='inline'><p>
|
415
|
+
Add a layer to the c list of layers and yield the new layer.
|
416
|
+
</p>
|
417
|
+
</div></span>
|
418
|
+
|
419
|
+
</li>
|
420
|
+
|
421
|
+
|
422
|
+
<li class="public ">
|
423
|
+
<span class="summary_signature">
|
424
|
+
|
425
|
+
<a href="#save-instance_method" title="#save (instance method)">- (Boolean) <strong>save</strong> </a>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
</span>
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
<span class="summary_desc"><div class='inline'><p>
|
439
|
+
Render the Map to the filesystem.
|
440
|
+
</p>
|
441
|
+
</div></span>
|
442
|
+
|
443
|
+
</li>
|
444
|
+
|
445
|
+
|
446
|
+
<li class="public ">
|
447
|
+
<span class="summary_signature">
|
448
|
+
|
449
|
+
<a href="#set_bounds-instance_method" title="#set_bounds (instance method)">- (nil) <strong>set_bounds</strong> </a>
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
</span>
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
<span class="summary_desc"><div class='inline'><p>
|
463
|
+
Set the bounds on the map.
|
464
|
+
</p>
|
465
|
+
</div></span>
|
466
|
+
|
467
|
+
</li>
|
468
|
+
|
469
|
+
|
470
|
+
<li class="public ">
|
471
|
+
<span class="summary_signature">
|
472
|
+
|
473
|
+
<a href="#set_size-instance_method" title="#set_size (instance method)">- (nil) <strong>set_size</strong> </a>
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
</span>
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
<span class="summary_desc"><div class='inline'><p>
|
487
|
+
Set the size in pixels of the final map.
|
488
|
+
</p>
|
489
|
+
</div></span>
|
490
|
+
|
491
|
+
</li>
|
492
|
+
|
493
|
+
|
494
|
+
<li class="public ">
|
495
|
+
<span class="summary_signature">
|
496
|
+
|
497
|
+
<a href="#slippy-instance_method" title="#slippy (instance method)">- (nil) <strong>slippy</strong> </a>
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
</span>
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
<span class="summary_desc"><div class='inline'><p>
|
511
|
+
Set the map to be slippy via passed in parameters.
|
512
|
+
</p>
|
513
|
+
</div></span>
|
514
|
+
|
515
|
+
</li>
|
516
|
+
|
517
|
+
|
518
|
+
<li class="public ">
|
519
|
+
<span class="summary_signature">
|
520
|
+
|
521
|
+
<a href="#srs-instance_method" title="#srs (instance method)">- (String) <strong>srs</strong> </a>
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
</span>
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
<span class="summary_desc"><div class='inline'><p>
|
535
|
+
Return the projection for the map in string representation.
|
536
|
+
</p>
|
537
|
+
</div></span>
|
538
|
+
|
539
|
+
</li>
|
540
|
+
|
541
|
+
|
542
|
+
<li class="public ">
|
543
|
+
<span class="summary_signature">
|
544
|
+
|
545
|
+
<a href="#srs%3D-instance_method" title="#srs= (instance method)">- (String) <strong>srs=</strong> </a>
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
</span>
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
<span class="summary_desc"><div class='inline'><p>
|
559
|
+
Set the projection from an Proj.4 readable string.
|
560
|
+
</p>
|
561
|
+
</div></span>
|
562
|
+
|
563
|
+
</li>
|
564
|
+
|
565
|
+
|
566
|
+
<li class="public ">
|
567
|
+
<span class="summary_signature">
|
568
|
+
|
569
|
+
<a href="#to_png-instance_method" title="#to_png (instance method)">- (Object) <strong>to_png</strong> {|data| ... }</a>
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
</span>
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
<span class="summary_desc"><div class='inline'><p>
|
583
|
+
Render the data to a blob of png data.
|
584
|
+
</p>
|
585
|
+
</div></span>
|
586
|
+
|
587
|
+
</li>
|
588
|
+
|
589
|
+
|
590
|
+
<li class="public ">
|
591
|
+
<span class="summary_signature">
|
592
|
+
|
593
|
+
<a href="#to_png_stream-instance_method" title="#to_png_stream (instance method)">- (nil) <strong>to_png_stream</strong> {|chunk| ... }</a>
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
</span>
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
<span class="summary_desc"><div class='inline'><p>
|
607
|
+
Render the map to a png stream and yield values to the passed in block.
|
608
|
+
</p>
|
609
|
+
</div></span>
|
610
|
+
|
611
|
+
</li>
|
612
|
+
|
613
|
+
|
614
|
+
<li class="public ">
|
615
|
+
<span class="summary_signature">
|
616
|
+
|
617
|
+
<a href="#valid%3F-instance_method" title="#valid? (instance method)">- (Boolean) <strong>valid?</strong> </a>
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
</span>
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
<span class="summary_desc"><div class='inline'><p>
|
631
|
+
Test to see if the Map has fulfilled the requirements for rendering.
|
632
|
+
</p>
|
633
|
+
</div></span>
|
634
|
+
|
635
|
+
</li>
|
636
|
+
|
637
|
+
|
638
|
+
<li class="public ">
|
639
|
+
<span class="summary_signature">
|
640
|
+
|
641
|
+
<a href="#width-instance_method" title="#width (instance method)">- (Number) <strong>width</strong> </a>
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
</span>
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
<span class="summary_desc"><div class='inline'><p>
|
655
|
+
Get the width of the map.
|
656
|
+
</p>
|
657
|
+
</div></span>
|
658
|
+
|
659
|
+
</li>
|
660
|
+
|
661
|
+
|
662
|
+
<li class="public ">
|
663
|
+
<span class="summary_signature">
|
664
|
+
|
665
|
+
<a href="#width%3D-instance_method" title="#width= (instance method)">- (Number) <strong>width=</strong> </a>
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
</span>
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
<span class="summary_desc"><div class='inline'><p>
|
679
|
+
Set the width of the Map.
|
680
|
+
</p>
|
681
|
+
</div></span>
|
682
|
+
|
683
|
+
</li>
|
684
|
+
|
685
|
+
|
686
|
+
</ul>
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="PP.html" title="SimplerTiles::PP (module)">PP</a></span></h3>
|
698
|
+
<p class="inherited"><span class='object_link'><a href="PP.html#inspect-instance_method" title="SimplerTiles::PP#inspect (method)">#inspect</a></span></p>
|
699
|
+
<div id="constructor_details" class="method_details_list">
|
700
|
+
<h2>Constructor Details</h2>
|
701
|
+
|
702
|
+
<div class="method_details first">
|
703
|
+
<p class="signature first" id="initialize-instance_method">
|
704
|
+
|
705
|
+
- (<tt><span class='object_link'><a href="" title="SimplerTiles::Map (class)">Map</a></span></tt>) <strong>initialize</strong> {|_self| ... }
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
</p><div class="docstring">
|
710
|
+
<div class="discussion">
|
711
|
+
<p>
|
712
|
+
Initialize a map with Mercator Projection and a tile square by default
|
713
|
+
</p>
|
714
|
+
|
715
|
+
|
716
|
+
</div>
|
717
|
+
</div>
|
718
|
+
<div class="tags">
|
719
|
+
|
720
|
+
<h3>Yields:</h3>
|
721
|
+
<ul class="yield">
|
722
|
+
|
723
|
+
<li>
|
724
|
+
|
725
|
+
|
726
|
+
<span class='type'>(<tt>_self</tt>)</span>
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
</li>
|
731
|
+
|
732
|
+
</ul>
|
733
|
+
<h3>Yield Parameters:</h3>
|
734
|
+
<ul class="yieldparam">
|
735
|
+
|
736
|
+
<li>
|
737
|
+
|
738
|
+
<span class='name'>_self</span>
|
739
|
+
|
740
|
+
|
741
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="SimplerTiles::Map (class)">SimplerTiles::Map</a></span></tt>)</span>
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
—
|
746
|
+
<div class='inline'><p>
|
747
|
+
the object that the method was called on
|
748
|
+
</p>
|
749
|
+
</div>
|
750
|
+
|
751
|
+
</li>
|
752
|
+
|
753
|
+
</ul>
|
754
|
+
|
755
|
+
</div><table class="source_code">
|
756
|
+
<tr>
|
757
|
+
<td>
|
758
|
+
<pre class="lines">
|
759
|
+
|
760
|
+
|
761
|
+
9
|
762
|
+
10
|
763
|
+
11
|
764
|
+
12
|
765
|
+
13
|
766
|
+
14</pre>
|
767
|
+
</td>
|
768
|
+
<td>
|
769
|
+
<pre class="code"><span class="info file"># File 'lib/simpler_tiles/map.rb', line 9</span>
|
770
|
+
|
771
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span>
|
772
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_srs identifier id'>srs</span> <span class='assign token'>=</span> <span class='string val'>"epsg:3785"</span>
|
773
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_width identifier id'>width</span> <span class='assign token'>=</span> <span class='integer val'>256</span>
|
774
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_height identifier id'>height</span> <span class='assign token'>=</span> <span class='integer val'>256</span>
|
775
|
+
<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>
|
776
|
+
<span class='rubyid_end end kw'>end</span>
|
777
|
+
</pre>
|
778
|
+
</td>
|
779
|
+
</tr>
|
780
|
+
</table>
|
781
|
+
</div>
|
782
|
+
|
783
|
+
</div>
|
784
|
+
|
785
|
+
|
786
|
+
<div id="instance_method_details" class="method_details_list">
|
787
|
+
<h2>Instance Method Details</h2>
|
788
|
+
|
789
|
+
|
790
|
+
<div class="method_details first">
|
791
|
+
<p class="signature first" id="add_layer-instance_method">
|
792
|
+
|
793
|
+
- (<tt><span class='object_link'><a href="Layer.html" title="SimplerTiles::Layer (class)">Layer</a></span></tt>) <strong>add_layer</strong>
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
</p><div class="docstring">
|
798
|
+
<div class="discussion">
|
799
|
+
<p>
|
800
|
+
Create and return a <span class='object_link'><a href="Layer.html" title="SimplerTiles::Layer (class)">Layer</a></span> based on the passed in string.
|
801
|
+
</p>
|
802
|
+
|
803
|
+
|
804
|
+
</div>
|
805
|
+
</div>
|
806
|
+
<div class="tags">
|
807
|
+
<h3>Parameters:</h3>
|
808
|
+
<ul class="param">
|
809
|
+
|
810
|
+
<li>
|
811
|
+
|
812
|
+
<span class='name'></span>
|
813
|
+
|
814
|
+
|
815
|
+
<span class='type'>(<tt>String</tt>)</span>
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
</li>
|
820
|
+
|
821
|
+
</ul>
|
822
|
+
|
823
|
+
<h3>Returns:</h3>
|
824
|
+
<ul class="return">
|
825
|
+
|
826
|
+
<li>
|
827
|
+
|
828
|
+
|
829
|
+
<span class='type'>(<tt><span class='object_link'><a href="Layer.html" title="SimplerTiles::Layer (class)">Layer</a></span></tt>)</span>
|
830
|
+
|
831
|
+
|
832
|
+
|
833
|
+
</li>
|
834
|
+
|
835
|
+
</ul>
|
836
|
+
|
837
|
+
</div><table class="source_code">
|
838
|
+
<tr>
|
839
|
+
<td>
|
840
|
+
<pre class="lines">
|
841
|
+
|
842
|
+
|
843
|
+
</pre>
|
844
|
+
</td>
|
845
|
+
<td>
|
846
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
847
|
+
|
848
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
849
|
+
<span class='rubyid_add_layer identifier id'>add_layer</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_layer identifier id'>layer</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
850
|
+
</pre>
|
851
|
+
</td>
|
852
|
+
</tr>
|
853
|
+
</table>
|
854
|
+
</div>
|
855
|
+
|
856
|
+
<div class="method_details ">
|
857
|
+
<p class="signature " id="ar_layer-instance_method">
|
858
|
+
|
859
|
+
- (<tt>Object</tt>) <strong>ar_layer</strong>
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
</p><div class="docstring">
|
864
|
+
<div class="discussion">
|
865
|
+
<p>
|
866
|
+
A convienence method to use Active Record configuration and add a new
|
867
|
+
layer.
|
868
|
+
</p>
|
869
|
+
|
870
|
+
|
871
|
+
</div>
|
872
|
+
</div>
|
873
|
+
<div class="tags">
|
874
|
+
|
875
|
+
|
876
|
+
</div><table class="source_code">
|
877
|
+
<tr>
|
878
|
+
<td>
|
879
|
+
<pre class="lines">
|
880
|
+
|
881
|
+
|
882
|
+
24
|
883
|
+
25
|
884
|
+
26
|
885
|
+
27
|
886
|
+
28
|
887
|
+
29
|
888
|
+
30
|
889
|
+
31
|
890
|
+
32
|
891
|
+
33
|
892
|
+
34
|
893
|
+
35
|
894
|
+
36
|
895
|
+
37
|
896
|
+
38
|
897
|
+
39</pre>
|
898
|
+
</td>
|
899
|
+
<td>
|
900
|
+
<pre class="code"><span class="info file"># File 'lib/simpler_tiles/map.rb', line 24</span>
|
901
|
+
|
902
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_ar_layer identifier id'>ar_layer</span>
|
903
|
+
<span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_defined? defined kw'>defined?</span><span class='lparen token'>(</span><span class='rubyid_ActiveRecord constant id'>ActiveRecord</span><span class='rparen token'>)</span>
|
904
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='string val'>"ActiveRecord not available"</span>
|
905
|
+
<span class='rubyid_end end kw'>end</span>
|
906
|
+
|
907
|
+
<span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='rubyid_Base constant id'>Base</span><span class='dot token'>.</span><span class='rubyid_connection identifier id'>connection</span><span class='dot token'>.</span><span class='rubyid_instance_variable_get identifier id'>instance_variable_get</span><span class='lparen token'>(</span><span class='string val'>"@config"</span><span class='rparen token'>)</span>
|
908
|
+
<span class='rubyid_params identifier id'>params</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
|
909
|
+
<span class='symbol val'>:dbname</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='symbol val'>:database</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
|
910
|
+
<span class='symbol val'>:user</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='symbol val'>:username</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
|
911
|
+
<span class='symbol val'>:host</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='symbol val'>:host</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
|
912
|
+
<span class='symbol val'>:port</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='symbol val'>:port</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
|
913
|
+
<span class='symbol val'>:password</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='symbol val'>:password</span><span class='rbrack token'>]</span>
|
914
|
+
<span class='rbrace token'>}</span>
|
915
|
+
|
916
|
+
<span class='rubyid_layer identifier id'>layer</span> <span class='dstring node'>"PG:#{params.map {|k,v| "#{k}='#{v}' "}}"</span>
|
917
|
+
<span class='rubyid_end end kw'>end</span>
|
918
|
+
</pre>
|
919
|
+
</td>
|
920
|
+
</tr>
|
921
|
+
</table>
|
922
|
+
</div>
|
923
|
+
|
924
|
+
<div class="method_details ">
|
925
|
+
<p class="signature " id="bgcolor-instance_method">
|
926
|
+
|
927
|
+
- (<tt>String</tt>) <strong>bgcolor</strong>
|
928
|
+
|
929
|
+
|
930
|
+
|
931
|
+
</p><div class="docstring">
|
932
|
+
<div class="discussion">
|
933
|
+
<p>
|
934
|
+
Return a copy of the background color of the map.
|
935
|
+
</p>
|
936
|
+
|
937
|
+
|
938
|
+
</div>
|
939
|
+
</div>
|
940
|
+
<div class="tags">
|
941
|
+
|
942
|
+
<h3>Returns:</h3>
|
943
|
+
<ul class="return">
|
944
|
+
|
945
|
+
<li>
|
946
|
+
|
947
|
+
|
948
|
+
<span class='type'>(<tt>String</tt>)</span>
|
949
|
+
|
950
|
+
|
951
|
+
|
952
|
+
</li>
|
953
|
+
|
954
|
+
</ul>
|
955
|
+
|
956
|
+
</div><table class="source_code">
|
957
|
+
<tr>
|
958
|
+
<td>
|
959
|
+
<pre class="lines">
|
960
|
+
|
961
|
+
|
962
|
+
</pre>
|
963
|
+
</td>
|
964
|
+
<td>
|
965
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
966
|
+
|
967
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
968
|
+
<span class='rubyid_get_bgcolor identifier id'>get_bgcolor</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>
|
969
|
+
</pre>
|
970
|
+
</td>
|
971
|
+
</tr>
|
972
|
+
</table>
|
973
|
+
</div>
|
974
|
+
|
975
|
+
<div class="method_details ">
|
976
|
+
<p class="signature " id="bgcolor=-instance_method">
|
977
|
+
|
978
|
+
- (<tt>nil</tt>) <strong>bgcolor=</strong>
|
979
|
+
|
980
|
+
|
981
|
+
|
982
|
+
</p><div class="docstring">
|
983
|
+
<div class="discussion">
|
984
|
+
<p>
|
985
|
+
Set the background color of the map.
|
986
|
+
</p>
|
987
|
+
|
988
|
+
|
989
|
+
</div>
|
990
|
+
</div>
|
991
|
+
<div class="tags">
|
992
|
+
<h3>Parameters:</h3>
|
993
|
+
<ul class="param">
|
994
|
+
|
995
|
+
<li>
|
996
|
+
|
997
|
+
<span class='name'></span>
|
998
|
+
|
999
|
+
|
1000
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
</li>
|
1005
|
+
|
1006
|
+
</ul>
|
1007
|
+
|
1008
|
+
<h3>Returns:</h3>
|
1009
|
+
<ul class="return">
|
1010
|
+
|
1011
|
+
<li>
|
1012
|
+
|
1013
|
+
|
1014
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
</li>
|
1019
|
+
|
1020
|
+
</ul>
|
1021
|
+
|
1022
|
+
</div><table class="source_code">
|
1023
|
+
<tr>
|
1024
|
+
<td>
|
1025
|
+
<pre class="lines">
|
1026
|
+
|
1027
|
+
|
1028
|
+
</pre>
|
1029
|
+
</td>
|
1030
|
+
<td>
|
1031
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1032
|
+
|
1033
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1034
|
+
<span class='rubyid_set_bgcolor identifier id'>set_bgcolor</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_bgcolor identifier id'>bgcolor</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1035
|
+
</pre>
|
1036
|
+
</td>
|
1037
|
+
</tr>
|
1038
|
+
</table>
|
1039
|
+
</div>
|
1040
|
+
|
1041
|
+
<div class="method_details ">
|
1042
|
+
<p class="signature " id="bounds-instance_method">
|
1043
|
+
|
1044
|
+
- (<tt><span class='object_link'><a href="Bounds.html" title="SimplerTiles::Bounds (class)">Bounds</a></span></tt>) <strong>bounds</strong>
|
1045
|
+
|
1046
|
+
|
1047
|
+
|
1048
|
+
</p><div class="docstring">
|
1049
|
+
<div class="discussion">
|
1050
|
+
<p>
|
1051
|
+
Return the bounds of this map.
|
1052
|
+
</p>
|
1053
|
+
|
1054
|
+
|
1055
|
+
</div>
|
1056
|
+
</div>
|
1057
|
+
<div class="tags">
|
1058
|
+
|
1059
|
+
<h3>Returns:</h3>
|
1060
|
+
<ul class="return">
|
1061
|
+
|
1062
|
+
<li>
|
1063
|
+
|
1064
|
+
|
1065
|
+
<span class='type'>(<tt><span class='object_link'><a href="Bounds.html" title="SimplerTiles::Bounds (class)">Bounds</a></span></tt>)</span>
|
1066
|
+
|
1067
|
+
|
1068
|
+
|
1069
|
+
</li>
|
1070
|
+
|
1071
|
+
</ul>
|
1072
|
+
|
1073
|
+
</div><table class="source_code">
|
1074
|
+
<tr>
|
1075
|
+
<td>
|
1076
|
+
<pre class="lines">
|
1077
|
+
|
1078
|
+
|
1079
|
+
</pre>
|
1080
|
+
</td>
|
1081
|
+
<td>
|
1082
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1083
|
+
|
1084
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1085
|
+
<span class='rubyid_bounds identifier id'>bounds</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>
|
1086
|
+
</pre>
|
1087
|
+
</td>
|
1088
|
+
</tr>
|
1089
|
+
</table>
|
1090
|
+
</div>
|
1091
|
+
|
1092
|
+
<div class="method_details ">
|
1093
|
+
<p class="signature " id="buffer-instance_method">
|
1094
|
+
|
1095
|
+
- (<tt>Number</tt>) <strong>buffer</strong>
|
1096
|
+
|
1097
|
+
|
1098
|
+
|
1099
|
+
</p><div class="docstring">
|
1100
|
+
<div class="discussion">
|
1101
|
+
<p>
|
1102
|
+
Get the Map’s buffer.
|
1103
|
+
</p>
|
1104
|
+
|
1105
|
+
|
1106
|
+
</div>
|
1107
|
+
</div>
|
1108
|
+
<div class="tags">
|
1109
|
+
|
1110
|
+
<h3>Returns:</h3>
|
1111
|
+
<ul class="return">
|
1112
|
+
|
1113
|
+
<li>
|
1114
|
+
|
1115
|
+
|
1116
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
</li>
|
1121
|
+
|
1122
|
+
</ul>
|
1123
|
+
|
1124
|
+
</div><table class="source_code">
|
1125
|
+
<tr>
|
1126
|
+
<td>
|
1127
|
+
<pre class="lines">
|
1128
|
+
|
1129
|
+
|
1130
|
+
</pre>
|
1131
|
+
</td>
|
1132
|
+
<td>
|
1133
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1134
|
+
|
1135
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1136
|
+
<span class='rubyid_get_buffer identifier id'>get_buffer</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>
|
1137
|
+
</pre>
|
1138
|
+
</td>
|
1139
|
+
</tr>
|
1140
|
+
</table>
|
1141
|
+
</div>
|
1142
|
+
|
1143
|
+
<div class="method_details ">
|
1144
|
+
<p class="signature " id="buffer=-instance_method">
|
1145
|
+
|
1146
|
+
- (<tt>Number</tt>) <strong>buffer=</strong>
|
1147
|
+
|
1148
|
+
|
1149
|
+
|
1150
|
+
</p><div class="docstring">
|
1151
|
+
<div class="discussion">
|
1152
|
+
<p>
|
1153
|
+
Set the buffer on the Map.
|
1154
|
+
</p>
|
1155
|
+
|
1156
|
+
|
1157
|
+
</div>
|
1158
|
+
</div>
|
1159
|
+
<div class="tags">
|
1160
|
+
<h3>Parameters:</h3>
|
1161
|
+
<ul class="param">
|
1162
|
+
|
1163
|
+
<li>
|
1164
|
+
|
1165
|
+
<span class='name'></span>
|
1166
|
+
|
1167
|
+
|
1168
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
1169
|
+
|
1170
|
+
|
1171
|
+
|
1172
|
+
</li>
|
1173
|
+
|
1174
|
+
</ul>
|
1175
|
+
|
1176
|
+
<h3>Returns:</h3>
|
1177
|
+
<ul class="return">
|
1178
|
+
|
1179
|
+
<li>
|
1180
|
+
|
1181
|
+
|
1182
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
1183
|
+
|
1184
|
+
|
1185
|
+
|
1186
|
+
</li>
|
1187
|
+
|
1188
|
+
</ul>
|
1189
|
+
|
1190
|
+
</div><table class="source_code">
|
1191
|
+
<tr>
|
1192
|
+
<td>
|
1193
|
+
<pre class="lines">
|
1194
|
+
|
1195
|
+
|
1196
|
+
</pre>
|
1197
|
+
</td>
|
1198
|
+
<td>
|
1199
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1200
|
+
|
1201
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1202
|
+
<span class='rubyid_set_buffer identifier id'>set_buffer</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_buffer identifier id'>buffer</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1203
|
+
</pre>
|
1204
|
+
</td>
|
1205
|
+
</tr>
|
1206
|
+
</table>
|
1207
|
+
</div>
|
1208
|
+
|
1209
|
+
<div class="method_details ">
|
1210
|
+
<p class="signature " id="buffered_bounds-instance_method">
|
1211
|
+
|
1212
|
+
- (<tt><span class='object_link'><a href="Bounds.html" title="SimplerTiles::Bounds (class)">Bounds</a></span></tt>) <strong>buffered_bounds</strong>
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
</p><div class="docstring">
|
1217
|
+
<div class="discussion">
|
1218
|
+
<p>
|
1219
|
+
Return the bounds of this map sized according to it’s buffer
|
1220
|
+
attribute.
|
1221
|
+
</p>
|
1222
|
+
|
1223
|
+
|
1224
|
+
</div>
|
1225
|
+
</div>
|
1226
|
+
<div class="tags">
|
1227
|
+
|
1228
|
+
<h3>Returns:</h3>
|
1229
|
+
<ul class="return">
|
1230
|
+
|
1231
|
+
<li>
|
1232
|
+
|
1233
|
+
|
1234
|
+
<span class='type'>(<tt><span class='object_link'><a href="Bounds.html" title="SimplerTiles::Bounds (class)">Bounds</a></span></tt>)</span>
|
1235
|
+
|
1236
|
+
|
1237
|
+
|
1238
|
+
</li>
|
1239
|
+
|
1240
|
+
</ul>
|
1241
|
+
|
1242
|
+
</div><table class="source_code">
|
1243
|
+
<tr>
|
1244
|
+
<td>
|
1245
|
+
<pre class="lines">
|
1246
|
+
|
1247
|
+
|
1248
|
+
</pre>
|
1249
|
+
</td>
|
1250
|
+
<td>
|
1251
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1252
|
+
|
1253
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1254
|
+
<span class='rubyid_buffered_bounds identifier id'>buffered_bounds</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>
|
1255
|
+
</pre>
|
1256
|
+
</td>
|
1257
|
+
</tr>
|
1258
|
+
</table>
|
1259
|
+
</div>
|
1260
|
+
|
1261
|
+
<div class="method_details ">
|
1262
|
+
<p class="signature " id="height-instance_method">
|
1263
|
+
|
1264
|
+
- (<tt>Number</tt>) <strong>height</strong>
|
1265
|
+
|
1266
|
+
|
1267
|
+
|
1268
|
+
</p><div class="docstring">
|
1269
|
+
<div class="discussion">
|
1270
|
+
<p>
|
1271
|
+
Get the height of the map.
|
1272
|
+
</p>
|
1273
|
+
|
1274
|
+
|
1275
|
+
</div>
|
1276
|
+
</div>
|
1277
|
+
<div class="tags">
|
1278
|
+
|
1279
|
+
<h3>Returns:</h3>
|
1280
|
+
<ul class="return">
|
1281
|
+
|
1282
|
+
<li>
|
1283
|
+
|
1284
|
+
|
1285
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
1286
|
+
|
1287
|
+
|
1288
|
+
|
1289
|
+
</li>
|
1290
|
+
|
1291
|
+
</ul>
|
1292
|
+
|
1293
|
+
</div><table class="source_code">
|
1294
|
+
<tr>
|
1295
|
+
<td>
|
1296
|
+
<pre class="lines">
|
1297
|
+
|
1298
|
+
|
1299
|
+
</pre>
|
1300
|
+
</td>
|
1301
|
+
<td>
|
1302
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1303
|
+
|
1304
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1305
|
+
<span class='rubyid_get_height identifier id'>get_height</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>
|
1306
|
+
</pre>
|
1307
|
+
</td>
|
1308
|
+
</tr>
|
1309
|
+
</table>
|
1310
|
+
</div>
|
1311
|
+
|
1312
|
+
<div class="method_details ">
|
1313
|
+
<p class="signature " id="height=-instance_method">
|
1314
|
+
|
1315
|
+
- (<tt>Number</tt>) <strong>height=</strong>
|
1316
|
+
|
1317
|
+
|
1318
|
+
|
1319
|
+
</p><div class="docstring">
|
1320
|
+
<div class="discussion">
|
1321
|
+
<p>
|
1322
|
+
Set the height of the Map.
|
1323
|
+
</p>
|
1324
|
+
|
1325
|
+
|
1326
|
+
</div>
|
1327
|
+
</div>
|
1328
|
+
<div class="tags">
|
1329
|
+
|
1330
|
+
<h3>Returns:</h3>
|
1331
|
+
<ul class="return">
|
1332
|
+
|
1333
|
+
<li>
|
1334
|
+
|
1335
|
+
|
1336
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
1337
|
+
|
1338
|
+
|
1339
|
+
|
1340
|
+
</li>
|
1341
|
+
|
1342
|
+
</ul>
|
1343
|
+
|
1344
|
+
</div><table class="source_code">
|
1345
|
+
<tr>
|
1346
|
+
<td>
|
1347
|
+
<pre class="lines">
|
1348
|
+
|
1349
|
+
|
1350
|
+
</pre>
|
1351
|
+
</td>
|
1352
|
+
<td>
|
1353
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1354
|
+
|
1355
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1356
|
+
<span class='rubyid_set_height identifier id'>set_height</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_height identifier id'>height</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1357
|
+
</pre>
|
1358
|
+
</td>
|
1359
|
+
</tr>
|
1360
|
+
</table>
|
1361
|
+
</div>
|
1362
|
+
|
1363
|
+
<div class="method_details ">
|
1364
|
+
<p class="signature " id="layer-instance_method">
|
1365
|
+
|
1366
|
+
- (<tt>Object</tt>) <strong>layer</strong>(source, &blk)
|
1367
|
+
|
1368
|
+
|
1369
|
+
|
1370
|
+
</p><div class="docstring">
|
1371
|
+
<div class="discussion">
|
1372
|
+
<p>
|
1373
|
+
Add a layer to the c list of layers and yield the new layer.
|
1374
|
+
</p>
|
1375
|
+
|
1376
|
+
|
1377
|
+
</div>
|
1378
|
+
</div>
|
1379
|
+
<div class="tags">
|
1380
|
+
|
1381
|
+
|
1382
|
+
</div><table class="source_code">
|
1383
|
+
<tr>
|
1384
|
+
<td>
|
1385
|
+
<pre class="lines">
|
1386
|
+
|
1387
|
+
|
1388
|
+
17
|
1389
|
+
18
|
1390
|
+
19
|
1391
|
+
20</pre>
|
1392
|
+
</td>
|
1393
|
+
<td>
|
1394
|
+
<pre class="code"><span class="info file"># File 'lib/simpler_tiles/map.rb', line 17</span>
|
1395
|
+
|
1396
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_layer identifier id'>layer</span><span class='lparen token'>(</span><span class='rubyid_source identifier id'>source</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_blk identifier id'>blk</span><span class='rparen token'>)</span>
|
1397
|
+
<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_Layer constant id'>Layer</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_source identifier id'>source</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_blk identifier id'>blk</span><span class='rparen token'>)</span>
|
1398
|
+
<span class='rubyid_add_layer identifier id'>add_layer</span> <span class='rubyid_layer identifier id'>layer</span>
|
1399
|
+
<span class='rubyid_end end kw'>end</span>
|
1400
|
+
</pre>
|
1401
|
+
</td>
|
1402
|
+
</tr>
|
1403
|
+
</table>
|
1404
|
+
</div>
|
1405
|
+
|
1406
|
+
<div class="method_details ">
|
1407
|
+
<p class="signature " id="save-instance_method">
|
1408
|
+
|
1409
|
+
- (<tt>Boolean</tt>) <strong>save</strong>
|
1410
|
+
|
1411
|
+
|
1412
|
+
|
1413
|
+
</p><div class="docstring">
|
1414
|
+
<div class="discussion">
|
1415
|
+
<p>
|
1416
|
+
Render the Map to the filesystem.
|
1417
|
+
</p>
|
1418
|
+
|
1419
|
+
|
1420
|
+
</div>
|
1421
|
+
</div>
|
1422
|
+
<div class="tags">
|
1423
|
+
<h3>Parameters:</h3>
|
1424
|
+
<ul class="param">
|
1425
|
+
|
1426
|
+
<li>
|
1427
|
+
|
1428
|
+
<span class='name'></span>
|
1429
|
+
|
1430
|
+
|
1431
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1432
|
+
|
1433
|
+
|
1434
|
+
|
1435
|
+
</li>
|
1436
|
+
|
1437
|
+
</ul>
|
1438
|
+
|
1439
|
+
<h3>Returns:</h3>
|
1440
|
+
<ul class="return">
|
1441
|
+
|
1442
|
+
<li>
|
1443
|
+
|
1444
|
+
|
1445
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
</li>
|
1450
|
+
|
1451
|
+
</ul>
|
1452
|
+
|
1453
|
+
</div><table class="source_code">
|
1454
|
+
<tr>
|
1455
|
+
<td>
|
1456
|
+
<pre class="lines">
|
1457
|
+
|
1458
|
+
|
1459
|
+
</pre>
|
1460
|
+
</td>
|
1461
|
+
<td>
|
1462
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1463
|
+
|
1464
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1465
|
+
<span class='rubyid_save identifier id'>save</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_path identifier id'>path</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1466
|
+
</pre>
|
1467
|
+
</td>
|
1468
|
+
</tr>
|
1469
|
+
</table>
|
1470
|
+
</div>
|
1471
|
+
|
1472
|
+
<div class="method_details ">
|
1473
|
+
<p class="signature " id="set_bounds-instance_method">
|
1474
|
+
|
1475
|
+
- (<tt>nil</tt>) <strong>set_bounds</strong>
|
1476
|
+
|
1477
|
+
|
1478
|
+
|
1479
|
+
</p><div class="docstring">
|
1480
|
+
<div class="discussion">
|
1481
|
+
<p>
|
1482
|
+
Set the bounds on the map.
|
1483
|
+
</p>
|
1484
|
+
|
1485
|
+
|
1486
|
+
</div>
|
1487
|
+
</div>
|
1488
|
+
<div class="tags">
|
1489
|
+
<h3>Parameters:</h3>
|
1490
|
+
<ul class="param">
|
1491
|
+
|
1492
|
+
<li>
|
1493
|
+
|
1494
|
+
<span class='name'></span>
|
1495
|
+
|
1496
|
+
|
1497
|
+
<span class='type'>(<tt>Number</tt>, <tt>Number</tt>, <tt>Number</tt>, <tt>Number</tt>)</span>
|
1498
|
+
|
1499
|
+
|
1500
|
+
|
1501
|
+
</li>
|
1502
|
+
|
1503
|
+
</ul>
|
1504
|
+
|
1505
|
+
<h3>Returns:</h3>
|
1506
|
+
<ul class="return">
|
1507
|
+
|
1508
|
+
<li>
|
1509
|
+
|
1510
|
+
|
1511
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
1512
|
+
|
1513
|
+
|
1514
|
+
|
1515
|
+
</li>
|
1516
|
+
|
1517
|
+
</ul>
|
1518
|
+
|
1519
|
+
</div><table class="source_code">
|
1520
|
+
<tr>
|
1521
|
+
<td>
|
1522
|
+
<pre class="lines">
|
1523
|
+
|
1524
|
+
|
1525
|
+
</pre>
|
1526
|
+
</td>
|
1527
|
+
<td>
|
1528
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1529
|
+
|
1530
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1531
|
+
<span class='rubyid_set_bounds identifier id'>set_bounds</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_maxx identifier id'>maxx</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_maxy identifier id'>maxy</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_minx identifier id'>minx</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_miny identifier id'>miny</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1532
|
+
</pre>
|
1533
|
+
</td>
|
1534
|
+
</tr>
|
1535
|
+
</table>
|
1536
|
+
</div>
|
1537
|
+
|
1538
|
+
<div class="method_details ">
|
1539
|
+
<p class="signature " id="set_size-instance_method">
|
1540
|
+
|
1541
|
+
- (<tt>nil</tt>) <strong>set_size</strong>
|
1542
|
+
|
1543
|
+
|
1544
|
+
|
1545
|
+
</p><div class="docstring">
|
1546
|
+
<div class="discussion">
|
1547
|
+
<p>
|
1548
|
+
Set the size in pixels of the final map.
|
1549
|
+
</p>
|
1550
|
+
|
1551
|
+
|
1552
|
+
</div>
|
1553
|
+
</div>
|
1554
|
+
<div class="tags">
|
1555
|
+
<h3>Parameters:</h3>
|
1556
|
+
<ul class="param">
|
1557
|
+
|
1558
|
+
<li>
|
1559
|
+
|
1560
|
+
<span class='name'></span>
|
1561
|
+
|
1562
|
+
|
1563
|
+
<span class='type'>(<tt>Number</tt>, <tt>Number</tt>)</span>
|
1564
|
+
|
1565
|
+
|
1566
|
+
|
1567
|
+
</li>
|
1568
|
+
|
1569
|
+
</ul>
|
1570
|
+
|
1571
|
+
<h3>Returns:</h3>
|
1572
|
+
<ul class="return">
|
1573
|
+
|
1574
|
+
<li>
|
1575
|
+
|
1576
|
+
|
1577
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
1578
|
+
|
1579
|
+
|
1580
|
+
|
1581
|
+
</li>
|
1582
|
+
|
1583
|
+
</ul>
|
1584
|
+
|
1585
|
+
</div><table class="source_code">
|
1586
|
+
<tr>
|
1587
|
+
<td>
|
1588
|
+
<pre class="lines">
|
1589
|
+
|
1590
|
+
|
1591
|
+
</pre>
|
1592
|
+
</td>
|
1593
|
+
<td>
|
1594
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1595
|
+
|
1596
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1597
|
+
<span class='rubyid_set_size identifier id'>set_size</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_width identifier id'>width</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_height identifier id'>height</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1598
|
+
</pre>
|
1599
|
+
</td>
|
1600
|
+
</tr>
|
1601
|
+
</table>
|
1602
|
+
</div>
|
1603
|
+
|
1604
|
+
<div class="method_details ">
|
1605
|
+
<p class="signature " id="slippy-instance_method">
|
1606
|
+
|
1607
|
+
- (<tt>nil</tt>) <strong>slippy</strong>
|
1608
|
+
|
1609
|
+
|
1610
|
+
|
1611
|
+
</p><div class="docstring">
|
1612
|
+
<div class="discussion">
|
1613
|
+
<p>
|
1614
|
+
Set the map to be slippy via passed in parameters.
|
1615
|
+
</p>
|
1616
|
+
|
1617
|
+
|
1618
|
+
</div>
|
1619
|
+
</div>
|
1620
|
+
<div class="tags">
|
1621
|
+
<h3>Parameters:</h3>
|
1622
|
+
<ul class="param">
|
1623
|
+
|
1624
|
+
<li>
|
1625
|
+
|
1626
|
+
<span class='name'></span>
|
1627
|
+
|
1628
|
+
|
1629
|
+
<span class='type'>(<tt>Number</tt>, <tt>Number</tt>, <tt>Number</tt>)</span>
|
1630
|
+
|
1631
|
+
|
1632
|
+
|
1633
|
+
</li>
|
1634
|
+
|
1635
|
+
</ul>
|
1636
|
+
|
1637
|
+
<h3>Returns:</h3>
|
1638
|
+
<ul class="return">
|
1639
|
+
|
1640
|
+
<li>
|
1641
|
+
|
1642
|
+
|
1643
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
1644
|
+
|
1645
|
+
|
1646
|
+
|
1647
|
+
</li>
|
1648
|
+
|
1649
|
+
</ul>
|
1650
|
+
|
1651
|
+
</div><table class="source_code">
|
1652
|
+
<tr>
|
1653
|
+
<td>
|
1654
|
+
<pre class="lines">
|
1655
|
+
|
1656
|
+
|
1657
|
+
</pre>
|
1658
|
+
</td>
|
1659
|
+
<td>
|
1660
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1661
|
+
|
1662
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1663
|
+
<span class='rubyid_slippy identifier id'>slippy</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_x identifier id'>x</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_y identifier id'>y</span><span class='comma token'>,</span> <span class='rubyid_VALUE constant id'>VALUE</span> <span class='rubyid_z identifier id'>z</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1664
|
+
</pre>
|
1665
|
+
</td>
|
1666
|
+
</tr>
|
1667
|
+
</table>
|
1668
|
+
</div>
|
1669
|
+
|
1670
|
+
<div class="method_details ">
|
1671
|
+
<p class="signature " id="srs-instance_method">
|
1672
|
+
|
1673
|
+
- (<tt>String</tt>) <strong>srs</strong>
|
1674
|
+
|
1675
|
+
|
1676
|
+
|
1677
|
+
</p><div class="docstring">
|
1678
|
+
<div class="discussion">
|
1679
|
+
<p>
|
1680
|
+
Return the projection for the map in string representation.
|
1681
|
+
</p>
|
1682
|
+
|
1683
|
+
|
1684
|
+
</div>
|
1685
|
+
</div>
|
1686
|
+
<div class="tags">
|
1687
|
+
|
1688
|
+
<h3>Returns:</h3>
|
1689
|
+
<ul class="return">
|
1690
|
+
|
1691
|
+
<li>
|
1692
|
+
|
1693
|
+
|
1694
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1695
|
+
|
1696
|
+
|
1697
|
+
|
1698
|
+
</li>
|
1699
|
+
|
1700
|
+
</ul>
|
1701
|
+
|
1702
|
+
</div><table class="source_code">
|
1703
|
+
<tr>
|
1704
|
+
<td>
|
1705
|
+
<pre class="lines">
|
1706
|
+
|
1707
|
+
|
1708
|
+
</pre>
|
1709
|
+
</td>
|
1710
|
+
<td>
|
1711
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1712
|
+
|
1713
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1714
|
+
<span class='rubyid_get_srs identifier id'>get_srs</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>
|
1715
|
+
</pre>
|
1716
|
+
</td>
|
1717
|
+
</tr>
|
1718
|
+
</table>
|
1719
|
+
</div>
|
1720
|
+
|
1721
|
+
<div class="method_details ">
|
1722
|
+
<p class="signature " id="srs=-instance_method">
|
1723
|
+
|
1724
|
+
- (<tt>String</tt>) <strong>srs=</strong>
|
1725
|
+
|
1726
|
+
|
1727
|
+
|
1728
|
+
</p><div class="docstring">
|
1729
|
+
<div class="discussion">
|
1730
|
+
<p>
|
1731
|
+
Set the projection from an Proj.4 readable string.
|
1732
|
+
</p>
|
1733
|
+
|
1734
|
+
|
1735
|
+
</div>
|
1736
|
+
</div>
|
1737
|
+
<div class="tags">
|
1738
|
+
<h3>Parameters:</h3>
|
1739
|
+
<ul class="param">
|
1740
|
+
|
1741
|
+
<li>
|
1742
|
+
|
1743
|
+
<span class='name'></span>
|
1744
|
+
|
1745
|
+
|
1746
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1747
|
+
|
1748
|
+
|
1749
|
+
|
1750
|
+
</li>
|
1751
|
+
|
1752
|
+
</ul>
|
1753
|
+
|
1754
|
+
<h3>Returns:</h3>
|
1755
|
+
<ul class="return">
|
1756
|
+
|
1757
|
+
<li>
|
1758
|
+
|
1759
|
+
|
1760
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1761
|
+
|
1762
|
+
|
1763
|
+
|
1764
|
+
</li>
|
1765
|
+
|
1766
|
+
</ul>
|
1767
|
+
|
1768
|
+
</div><table class="source_code">
|
1769
|
+
<tr>
|
1770
|
+
<td>
|
1771
|
+
<pre class="lines">
|
1772
|
+
|
1773
|
+
|
1774
|
+
</pre>
|
1775
|
+
</td>
|
1776
|
+
<td>
|
1777
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1778
|
+
|
1779
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1780
|
+
<span class='rubyid_set_srs identifier id'>set_srs</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_srs identifier id'>srs</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1781
|
+
</pre>
|
1782
|
+
</td>
|
1783
|
+
</tr>
|
1784
|
+
</table>
|
1785
|
+
</div>
|
1786
|
+
|
1787
|
+
<div class="method_details ">
|
1788
|
+
<p class="signature " id="to_png-instance_method">
|
1789
|
+
|
1790
|
+
- (<tt>Object</tt>) <strong>to_png</strong> {|data| ... }
|
1791
|
+
|
1792
|
+
|
1793
|
+
|
1794
|
+
</p><div class="docstring">
|
1795
|
+
<div class="discussion">
|
1796
|
+
<p>
|
1797
|
+
Render the data to a blob of png data.
|
1798
|
+
</p>
|
1799
|
+
|
1800
|
+
|
1801
|
+
</div>
|
1802
|
+
</div>
|
1803
|
+
<div class="tags">
|
1804
|
+
|
1805
|
+
<h3>Yields:</h3>
|
1806
|
+
<ul class="yield">
|
1807
|
+
|
1808
|
+
<li>
|
1809
|
+
|
1810
|
+
|
1811
|
+
<span class='type'>(<tt>data</tt>)</span>
|
1812
|
+
|
1813
|
+
|
1814
|
+
|
1815
|
+
</li>
|
1816
|
+
|
1817
|
+
</ul>
|
1818
|
+
|
1819
|
+
</div><table class="source_code">
|
1820
|
+
<tr>
|
1821
|
+
<td>
|
1822
|
+
<pre class="lines">
|
1823
|
+
|
1824
|
+
|
1825
|
+
42
|
1826
|
+
43
|
1827
|
+
44
|
1828
|
+
45
|
1829
|
+
46
|
1830
|
+
47</pre>
|
1831
|
+
</td>
|
1832
|
+
<td>
|
1833
|
+
<pre class="code"><span class="info file"># File 'lib/simpler_tiles/map.rb', line 42</span>
|
1834
|
+
|
1835
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_png identifier id'>to_png</span>
|
1836
|
+
<span class='rubyid_data identifier id'>data</span> <span class='assign token'>=</span> <span class='string val'>""</span>
|
1837
|
+
<span class='rubyid_to_png_stream identifier id'>to_png_stream</span> <span class='rubyid_Proc constant id'>Proc</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_chunk identifier id'>chunk</span><span class='bitor op'>|</span> <span class='rubyid_data identifier id'>data</span> <span class='opasgn op'>+=</span> <span class='rubyid_chunk identifier id'>chunk</span> <span class='rbrace token'>}</span>
|
1838
|
+
<span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_data identifier id'>data</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span>
|
1839
|
+
<span class='rubyid_data identifier id'>data</span>
|
1840
|
+
<span class='rubyid_end end kw'>end</span>
|
1841
|
+
</pre>
|
1842
|
+
</td>
|
1843
|
+
</tr>
|
1844
|
+
</table>
|
1845
|
+
</div>
|
1846
|
+
|
1847
|
+
<div class="method_details ">
|
1848
|
+
<p class="signature " id="to_png_stream-instance_method">
|
1849
|
+
|
1850
|
+
- (<tt>nil</tt>) <strong>to_png_stream</strong> {|chunk| ... }
|
1851
|
+
|
1852
|
+
|
1853
|
+
|
1854
|
+
</p><div class="docstring">
|
1855
|
+
<div class="discussion">
|
1856
|
+
<p>
|
1857
|
+
Render the map to a png stream and yield values to the passed in block.
|
1858
|
+
</p>
|
1859
|
+
|
1860
|
+
|
1861
|
+
</div>
|
1862
|
+
</div>
|
1863
|
+
<div class="tags">
|
1864
|
+
|
1865
|
+
<h3>Yields:</h3>
|
1866
|
+
<ul class="yield">
|
1867
|
+
|
1868
|
+
<li>
|
1869
|
+
|
1870
|
+
|
1871
|
+
<span class='type'>(<tt>chunk</tt>)</span>
|
1872
|
+
|
1873
|
+
|
1874
|
+
|
1875
|
+
—
|
1876
|
+
<div class='inline'><p>
|
1877
|
+
Block that takes chunks of data
|
1878
|
+
</p>
|
1879
|
+
</div>
|
1880
|
+
|
1881
|
+
</li>
|
1882
|
+
|
1883
|
+
</ul>
|
1884
|
+
<h3>Returns:</h3>
|
1885
|
+
<ul class="return">
|
1886
|
+
|
1887
|
+
<li>
|
1888
|
+
|
1889
|
+
|
1890
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
1891
|
+
|
1892
|
+
|
1893
|
+
|
1894
|
+
</li>
|
1895
|
+
|
1896
|
+
</ul>
|
1897
|
+
|
1898
|
+
</div><table class="source_code">
|
1899
|
+
<tr>
|
1900
|
+
<td>
|
1901
|
+
<pre class="lines">
|
1902
|
+
|
1903
|
+
|
1904
|
+
</pre>
|
1905
|
+
</td>
|
1906
|
+
<td>
|
1907
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1908
|
+
|
1909
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1910
|
+
<span class='rubyid_to_png_stream identifier id'>to_png_stream</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_block identifier id'>block</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
1911
|
+
</pre>
|
1912
|
+
</td>
|
1913
|
+
</tr>
|
1914
|
+
</table>
|
1915
|
+
</div>
|
1916
|
+
|
1917
|
+
<div class="method_details ">
|
1918
|
+
<p class="signature " id="valid?-instance_method">
|
1919
|
+
|
1920
|
+
- (<tt>Boolean</tt>) <strong>valid?</strong>
|
1921
|
+
|
1922
|
+
|
1923
|
+
|
1924
|
+
</p><div class="docstring">
|
1925
|
+
<div class="discussion">
|
1926
|
+
<p>
|
1927
|
+
Test to see if the Map has fulfilled the requirements for rendering
|
1928
|
+
</p>
|
1929
|
+
|
1930
|
+
|
1931
|
+
</div>
|
1932
|
+
</div>
|
1933
|
+
<div class="tags">
|
1934
|
+
|
1935
|
+
<h3>Returns:</h3>
|
1936
|
+
<ul class="return">
|
1937
|
+
|
1938
|
+
<li>
|
1939
|
+
|
1940
|
+
|
1941
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1942
|
+
|
1943
|
+
|
1944
|
+
|
1945
|
+
</li>
|
1946
|
+
|
1947
|
+
</ul>
|
1948
|
+
|
1949
|
+
</div><table class="source_code">
|
1950
|
+
<tr>
|
1951
|
+
<td>
|
1952
|
+
<pre class="lines">
|
1953
|
+
|
1954
|
+
|
1955
|
+
</pre>
|
1956
|
+
</td>
|
1957
|
+
<td>
|
1958
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
1959
|
+
|
1960
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
1961
|
+
<span class='rubyid_is_valid identifier id'>is_valid</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>
|
1962
|
+
</pre>
|
1963
|
+
</td>
|
1964
|
+
</tr>
|
1965
|
+
</table>
|
1966
|
+
</div>
|
1967
|
+
|
1968
|
+
<div class="method_details ">
|
1969
|
+
<p class="signature " id="width-instance_method">
|
1970
|
+
|
1971
|
+
- (<tt>Number</tt>) <strong>width</strong>
|
1972
|
+
|
1973
|
+
|
1974
|
+
|
1975
|
+
</p><div class="docstring">
|
1976
|
+
<div class="discussion">
|
1977
|
+
<p>
|
1978
|
+
Get the width of the map.
|
1979
|
+
</p>
|
1980
|
+
|
1981
|
+
|
1982
|
+
</div>
|
1983
|
+
</div>
|
1984
|
+
<div class="tags">
|
1985
|
+
|
1986
|
+
<h3>Returns:</h3>
|
1987
|
+
<ul class="return">
|
1988
|
+
|
1989
|
+
<li>
|
1990
|
+
|
1991
|
+
|
1992
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
1993
|
+
|
1994
|
+
|
1995
|
+
|
1996
|
+
</li>
|
1997
|
+
|
1998
|
+
</ul>
|
1999
|
+
|
2000
|
+
</div><table class="source_code">
|
2001
|
+
<tr>
|
2002
|
+
<td>
|
2003
|
+
<pre class="lines">
|
2004
|
+
|
2005
|
+
|
2006
|
+
</pre>
|
2007
|
+
</td>
|
2008
|
+
<td>
|
2009
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
2010
|
+
|
2011
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
2012
|
+
<span class='rubyid_get_width identifier id'>get_width</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>
|
2013
|
+
</pre>
|
2014
|
+
</td>
|
2015
|
+
</tr>
|
2016
|
+
</table>
|
2017
|
+
</div>
|
2018
|
+
|
2019
|
+
<div class="method_details ">
|
2020
|
+
<p class="signature " id="width=-instance_method">
|
2021
|
+
|
2022
|
+
- (<tt>Number</tt>) <strong>width=</strong>
|
2023
|
+
|
2024
|
+
|
2025
|
+
|
2026
|
+
</p><div class="docstring">
|
2027
|
+
<div class="discussion">
|
2028
|
+
<p>
|
2029
|
+
Set the width of the Map.
|
2030
|
+
</p>
|
2031
|
+
|
2032
|
+
|
2033
|
+
</div>
|
2034
|
+
</div>
|
2035
|
+
<div class="tags">
|
2036
|
+
|
2037
|
+
<h3>Returns:</h3>
|
2038
|
+
<ul class="return">
|
2039
|
+
|
2040
|
+
<li>
|
2041
|
+
|
2042
|
+
|
2043
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
2044
|
+
|
2045
|
+
|
2046
|
+
|
2047
|
+
</li>
|
2048
|
+
|
2049
|
+
</ul>
|
2050
|
+
|
2051
|
+
</div><table class="source_code">
|
2052
|
+
<tr>
|
2053
|
+
<td>
|
2054
|
+
<pre class="lines">
|
2055
|
+
|
2056
|
+
|
2057
|
+
</pre>
|
2058
|
+
</td>
|
2059
|
+
<td>
|
2060
|
+
<pre class="code"><span class="info file"># File 'ext/simpler_tiles/map.c'</span>
|
2061
|
+
|
2062
|
+
<span class='rubyid_static identifier id'>static</span> <span class='rubyid_VALUE constant id'>VALUE</span>
|
2063
|
+
<span class='rubyid_set_width identifier id'>set_width</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_width identifier id'>width</span><span class='rparen token'>)</span><span class='lbrace token'>{</span>
|
2064
|
+
</pre>
|
2065
|
+
</td>
|
2066
|
+
</tr>
|
2067
|
+
</table>
|
2068
|
+
</div>
|
2069
|
+
|
2070
|
+
</div>
|
2071
|
+
|
2072
|
+
</div>
|
2073
|
+
|
2074
|
+
<div id="footer">
|
2075
|
+
Generated on Wed Mar 7 20:33:22 2012 by
|
2076
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2077
|
+
0.7.5 (ruby-1.8.7).
|
2078
|
+
</div>
|
2079
|
+
|
2080
|
+
</body>
|
2081
|
+
</html>
|