Using Osm-Gps-Map Widget With Vala

By | April 16, 2016

These steps apply for Debian based Linux systems. For Arch linux, you can use pacman -S osm-gps-map however at this point it contains a bug which has been reported here.

  1. Download and extract the latest source from github
  2. Make sure you’ve got libgirepository-dev with sudo apt-get install libgirepository-dev. If you’re on Arch try pacman -S gobject-introspection
  3. Run ./autogen.sh
  4. Run ./configure –prefix /usr
  5. Run make & sudo make install
  6. cd into the src folder
  7. Run ‘vapigen –pkg gtk+-3.0 –library OsmGpsMap OsmGpsMap-1.0.gir’. This produces the OsmGpsMap.vapi VAPI file needed to use OsmGpsMap with Vala.
  8. Go to /usr/lib/pkgconfig and rename osmgpsmap-1.0.pc to OsmGpsMap-1.0.pc

You’re now all set to write Vala code using OsmGpsMap widgets!

Here’s a demo project.

Leave a Reply

Your email address will not be published. Required fields are marked *