File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ This module provides a thin object-style wrapper around *osm_tile* module method
6
6
``` lua
7
7
osm_tile = require ' osm.tileobj'
8
8
9
- local tile = osm_tile .new_from_uri (' /mystyle1/18/233816/100256.png' )
9
+ local tile , err = osm_tile .new_from_uri (' /mystyle1/18/233816/100256.png' )
10
+ if err then
11
+ ngx .log (ngx .ERR , ' unable to create tile object: ' .. err )
12
+ end
13
+
10
14
if tile :is_inside_maps ({' mystyle1' , ' mystyle2' }) then
11
15
ngx .log (ngx .ERR , ' tile' .. tile .. ' belongs to selected styles' )
12
16
end
22
26
new_from_uri
23
27
------------
24
28
25
- ** syntax:** * tile = new_from_uri(uri, metatiles_dir?)*
29
+ ** syntax:** * tile, err = new_from_uri(uri, metatiles_dir?)*
26
30
27
31
Returns new tile object with attributes:
28
32
@@ -32,6 +36,8 @@ Returns new tile object with attributes:
32
36
* content_type (string): content_type (based on ext)
33
37
* is_vector (bool): true if given uri ends with '.mvt'
34
38
39
+ If something goes wrong, returns nil and error message.
40
+
35
41
* metatiles_dir* is the optional argument ('/var/lib/mod_tile' if not set)
36
42
37
43
is_inside_maps
You can’t perform that action at this time.
0 commit comments