Coder Social home page Coder Social logo

profff / python-qgmap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vokimon/python-qgmap

0.0 2.0 0.0 289 KB

Qt Google Maps widget for PySide/PyQt4

License: GNU General Public License v3.0

Shell 0.71% Python 75.97% HTML 4.40% JavaScript 18.92%

python-qgmap's Introduction

python-qgmap

Qt Google Map widget for PySide/PyQt4

Features:

  • Specify locations either by latitude, longitude pairs or street addresses by means of GeoCoding
  • Programatically centering, zooming and manipulate markers
  • Flexible marker properties (ie. draggable, icon, title...)
  • Emits signals on user actions: dragged markers, pans or zooms
  • Easy to extend, thanks to the painless python-qt-javascript interface

Usage Example

Installation

By using pip:

$ pip3 install qgmap

From source:

python3 setup.py --install

Usage

Two main classes are provided:

  • qgmap.GeoCoder: Retrieves geo-coordinates (latitude, longitude) from street addresses
  • qgmap.QGoogleMap: A WebView widget containing a GoogleMap, with some convenience accessors to manage center, zoom, markers...

See the main example code at qgmap-example.py

Using it with PyQt4

By default the classes use PySide, but the code works for PyQt4 if you set to False the usePySide module variable by hand.

Any suggestion to make this less hacky is welcome.

Acknoledgements

This Python code has been inspired in Henrik Hartz's C++ example code:

https://blog.qt.digia.com/blog/2008/07/03/putting-qtwebkit-to-use-with-google-maps/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.