Releases: JaWeilBaum/pyqtlet2
Version 0.9.3
At multiple places in the library the multiple map feature was not yet implemented. This should hopefully be resolved with this release.
What's Changed
- Fix popup and tooltip binding by @Baljak in #50
- Adjust structure to work with multiple maps by @Baljak in #54
New Contributors
Full Changelog: 0.9.1...0.9.3
Version 0.9.1
What's Changed
- Bug fix when Draw is created and Control added to Map by @ericj974 in #49
- Adjusted the event body which is sent from
_onMove
and_onMoveend
to have the same body structure. Thanks for pointing that out @ericj974
New Contributors
Full Changelog: 0.9.0...0.9.1
Version 0.9.0
Changes
pyqtlet2 in version 0.9.0
now supports multiple maps in one application!
Closed issues:
Sample Code:
import sys
from PyQt5.QtWidgets import QApplication, QHBoxLayout, QWidget
from pyqtlet2 import L, MapWidget
import pyqtlet2.leaflet.core
class MapWindow(QWidget):
def __init__(self):
# Setting up the widgets and layout
super().__init__()
self.mapWidget1 = MapWidget()
self.mapWidget2 = MapWidget()
self.layout = QHBoxLayout()
self.layout.addWidget(self.mapWidget1)
self.layout.addWidget(self.mapWidget2)
self.setLayout(self.layout)
# Working with the maps with pyqtlet
self.map1 = L.map(self.mapWidget1)
self.map1.setView([12.97, 77.59], 10)
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(self.map1)
self.map2 = L.map(self.mapWidget2)
self.map2.setView([12.97, 77.59], 10)
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(self.map2)
self.marker1 = L.marker([12.934056, 77.610029], options={'draggable': True}).addTo(self.map1)
self.marker1.bindPopup('Maps are a treasure.')
self.marker1.moveend.connect(print)
self.marker2 = L.marker([12.934056, 77.610029]).addTo(self.map2)
self.marker2.setDragging(True)
self.marker2.bindPopup('Maps are a treasure.')
self.marker2.moveend.connect(print)
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
widget = MapWindow()
sys.exit(app.exec_())
Download via PyPi
Version 0.8.3
In the realese the version was leaflet version was updated from 1.7.1
to 1.9.3
Version 0.8.1
Minor changes
Version 0.8.0
What's Changed
- feature: implement qtpy by @danielhrisca in #28
What's New
You can now use QtPy as general interface to work with all kind of python Qt bindings. Have a look into the README.md to findout how to use it.
During the install you can pass the Qt binding framework of your choice
pip3 install "pyqtlet2[PyQt5]"
# or
pip3 install "pyqtlet2[PySide6]"
After the install you need to specify the framework to use by an environment variable.
import os
os.environ['QT_API'] = 'pyqt5'
from qtpy import QtGui
Full Changelog: 0.7.0...0.8.0
Version 0.7.0
What's Changed
- add PySide6 support by @danielhrisca in #25
- Added
install_requires
to setup.py to install required packages on the fly - Added
long_description
to setup.py to show description on pypi.org
New Contributors
- @danielhrisca made their first contribution in #25
Full Changelog: 0.6.0...0.7.0
Version 0.6.0
What's Changed
- Feature: rotated marker by @JaWeilBaum in #17
- Featuer: Disable right-click context menu by @TomFryers in #19
- Fix: Make library compatible with Python versions < 3.9 by @JuanPotato in #22
- Feature: Dependency fixes and cleanup by @JuanPotato in #23
You are now able to install pyqtlet2 via pypi and have full support of all map components. Earlier there had been issues where html or js files where missing. Thanks again to @JuanPotato !
New Contributors
- @TomFryers made their first contribution in #19
- @JuanPotato made their first contribution in #22
Full Changelog: 0.5.0...0.6.0
Version 0.5.0
Version 0.5.0
What's Changed
- feature: Added Parser + Unit tests by @JaWeilBaum in #9
- feature: Implement wrapper for
L.icon()
by @JaWeilBaum in #12 - feature: add
return self
wherever sensible by @mcondarelli in #15
Code snipets
Chained calls
Before:
arrow = L.polygon([c, a], {'color': color})
arrow.addTo(self.map)
tag = arrow._ayerName
After:
tag = L.polygon([c, a], {'color': color}).addTo(self.map).layerName
L.Icon
icon_url_website = "https://leafletjs.com/examples/custom-icons/leaf-red.png"
self.red_icon = L.icon(iconUrl=icon_url_website, options={
"iconSize": [38, 95],
"iconAnchor": [22, 94],
})
self.marker1 = L.marker([12.934056, 77.610029], options={"draggable": "true"})
self.marker1.setIcon(self.red_icon)
New Contributors
- @mcondarelli made their first contribution in #15
Full Changelog: 0.4.9...0.5.0
Version 0.4.9
Full Changelog: 0.4.8...0.4.9