Skip to content

scooterw/ffi-mapnik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ffi-mapnik

... mapnik from Ruby

NOTE: Mapnik must be installed to /usr/local/lib/libmapnik.*

NOTE: Uses https://github.com/springmeyer/mapnik-c-api (libmapnik_c.dylib compiled on OSX 10.10.3 included in repository)

NOTE: All development has been on Mac, and no testing has been done on other OSes to this point

To open IRB session with ffi-mapnik already loaded: bin/mapnik_console

require './lib/ffi-mapnik' # not necessary if using bin/mapnik_console
# => true
map = Mapnik::Map.new 256, 256
# => #<Mapnik::Map:0x007f825aaac4c0 @width=256, @height=256, @ptr=#<FFI::AutoPointer address=0x007f8259f07ea0>>
Mapnik.register_datasources '/usr/local/lib/mapnik/input'
# => 0
map.load '/path/to/stylesheet.xml'
# => 0
map.zoom_all
# => 0
map.to_file '~/Desktop/sample_output.png'
# => 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages