The Map is a widget specifically for displaying a geographic map. It uses OpenStreetMap as map tile provider, YOURS for routing calculation and Nominatim to convert geographic coordinates to/from address names. But custom providers can be added.
It supports some basic but yet nice features:
zooming and scrolling
markers with content to be displayed when user clicks over them
automatic grouping of markers based on zoom level
routes calculation
names/coordinates conversion (and viceversa)
clicked - Called when a user has clicked the map without dragging around.
clicked,double - Called when a user has double-clicked the map.
press - This is called when a user has pressed down on the map.
longpressed - This is called when a user has pressed down on the map
for a long time without dragging around.
scroll - the content has been scrolled (moved).
scroll,drag,start - dragging the contents around has started.
scroll,drag,stop - dragging the contents around has stopped.
scroll,anim,start - scrolling animation has started.
scroll,anim,stop - scrolling animation has stopped.
zoom,start - Zoom animation started.
zoom,stop - Zoom animation stopped.
zoom,change - Zoom changed when using an auto zoom mode.
tile,load - A map tile image load begins.
tile,loaded - A map tile image load ends.
tile,loaded,fail - A map tile image load fails.
route,load - Route request begins.
route,loaded - Route request ends.
route,loaded,fail - Route request fails.
name,load - Name request begins.
name,loaded - Name request ends.
name,loaded,fail - Name request fails.
overlay,clicked - A overlay is clicked.
loaded - when a map is finally loaded.
This widget supports the scrollable interface.
If you wish to control the scolling behaviour using these functions,
inherit both the widget class and the
Scrollable class
using multiple inheritance, for example:
class ScrollableGenlist(Genlist, Scrollable):
def __init__(self, canvas, *args, **kwargs):
Genlist.__init__(self, canvas)
None
The default overlay type.
The Class overlay is used to group marker together.
A group of overlays.
This class can follow another overlay.
This is used to draw a route result on the map.
Simply draw a line on the map.
Simply draw a polygon on the map.
Simply draw a circle on the map.
This will draw a dinamic scale on the map.
Route should prioritize time
Route should prioritize distance
Route should consider an automobile will be used.
Route should consider a bicycle will be used by the user.
Route should consider user will be walking.
Map tile provider
Route service provider
Name service provider
Zoom controlled manually by zoom
It’s set by default.
Zoom until map fits inside the scroll frame with no pixels outside this area.
Zoom until map fills scroll, ensuring no pixels are left unfilled.
parent (efl.evas.Object) – The parent object
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
A route will be traced by point on coordinates to point on coordinates
, using the route service set with Map.source_set().
See also
Map.route_add()
be used to extract the needed information from the results.
See also
Map.overlay_add()
grouped together.
See also
Map.overlay_class_add()
Note
This overlay has a bubble style layout and icon or content can not be set.
See also
Map.overlay_bubble_add()
See also
Map.overlay_line_add()
by the points added using the region_add() method.
At least 3 regions should be added to show the polygon overlay.
See also
Map.overlay_polygon_add()
See also
Map.overlay_circle_add()
the corresponding distance.
See also
Map.overlay_scale_add()
See also
Map.overlay_route_add()