Map

../_images/map-preview.png

Widget description

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)

Emitted signals

  • 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.

Scrollable Interface

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)

Enumerations

Map overlay types

efl.elementary.ELM_MAP_OVERLAY_TYPE_NONE

None

efl.elementary.ELM_MAP_OVERLAY_TYPE_DEFAULT

The default overlay type.

efl.elementary.ELM_MAP_OVERLAY_TYPE_CLASS

The Class overlay is used to group marker together.

efl.elementary.ELM_MAP_OVERLAY_TYPE_GROUP

A group of overlays.

efl.elementary.ELM_MAP_OVERLAY_TYPE_BUBBLE

This class can follow another overlay.

efl.elementary.ELM_MAP_OVERLAY_TYPE_ROUTE

This is used to draw a route result on the map.

efl.elementary.ELM_MAP_OVERLAY_TYPE_LINE

Simply draw a line on the map.

efl.elementary.ELM_MAP_OVERLAY_TYPE_POLYGON

Simply draw a polygon on the map.

efl.elementary.ELM_MAP_OVERLAY_TYPE_CIRCLE

Simply draw a circle on the map.

efl.elementary.ELM_MAP_OVERLAY_TYPE_SCALE

This will draw a dinamic scale on the map.

Map route methods

efl.elementary.ELM_MAP_ROUTE_METHOD_FASTEST

Route should prioritize time

efl.elementary.ELM_MAP_ROUTE_METHOD_SHORTEST

Route should prioritize distance

Map route types

efl.elementary.ELM_MAP_ROUTE_TYPE_MOTOCAR

Route should consider an automobile will be used.

efl.elementary.ELM_MAP_ROUTE_TYPE_BICYCLE

Route should consider a bicycle will be used by the user.

efl.elementary.ELM_MAP_ROUTE_TYPE_FOOT

Route should consider user will be walking.

Map source types

efl.elementary.ELM_MAP_SOURCE_TYPE_TILE

Map tile provider

efl.elementary.ELM_MAP_SOURCE_TYPE_ROUTE

Route service provider

efl.elementary.ELM_MAP_SOURCE_TYPE_NAME

Name service provider

Map zoom modes

efl.elementary.ELM_MAP_ZOOM_MODE_MANUAL

Zoom controlled manually by zoom

It’s set by default.

efl.elementary.ELM_MAP_ZOOM_MODE_AUTO_FIT

Zoom until map fits inside the scroll frame with no pixels outside this area.

efl.elementary.ELM_MAP_ZOOM_MODE_AUTO_FILL

Zoom until map fills scroll, ensuring no pixels are left unfilled.

Inheritance diagram

Inheritance diagram of Map

class efl.elementary.Map(Object parent, *args, **kwargs)

Bases: efl.elementary.__init__.Object

Parameters:
  • parent (efl.evas.Object) – The parent object
  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance
bounce

Deprecated since version 1.8: You should combine with Scrollable class instead.

bounce_get()

Deprecated since version 1.8: You should combine with Scrollable class instead.

bounce_set(h, v)

Deprecated since version 1.8: You should combine with Scrollable class instead.

callback_clicked_add(func, *args, **kwargs)

Add a callback to be called on the “clicked” signal.

callback_clicked_del(func)

Delete a previously attached callback

callback_clicked_double_add(func, *args, **kwargs)

Add a callback to be called on the “clicked,double” signal.

callback_clicked_double_del(func)

Delete a previously attached callback

callback_loaded_add(func, *args, **kwargs)

Add a callback to be called on the “loaded” signal.

callback_loaded_del(func)

Delete a previously attached callback

callback_longpressed_add(func, *args, **kwargs)

Add a callback to be called on the “longpressed” signal.

callback_longpressed_del(func)

Delete a previously attached callback

callback_name_load_add(func, *args, **kwargs)

Add a callback to be called on the “name,load” signal.

callback_name_load_del(func)

Delete a previously attached callback

callback_name_loaded_add(func, *args, **kwargs)

Add a callback to be called on the “name,loaded” signal.

callback_name_loaded_del(func)

Delete a previously attached callback

callback_name_loaded_fail_add(func, *args, **kwargs)

Add a callback to be called on the “name,loaded,fail” signal.

callback_name_loaded_fail_del(func)

Delete a previously attached callback

callback_overlay_clicked_add(func, *args, **kwargs)

Add a callback to be called on the “overlay,clicked” signal.

callback_overlay_clicked_del(func)

Delete a previously attached callback

callback_overlay_del_add(func, *args, **kwargs)

Add a callback to be called on the “overlay,del” signal.

callback_overlay_del_del(func)

Delete a previously attached callback

callback_press_add(func, *args, **kwargs)

Add a callback to be called on the “press” signal.

callback_press_del(func)

Delete a previously attached callback

callback_route_load_add(func, *args, **kwargs)

Add a callback to be called on the “route,load” signal.

callback_route_load_del(func)

Delete a previously attached callback

callback_route_loaded_add(func, *args, **kwargs)

Add a callback to be called on the “route,loaded” signal.

callback_route_loaded_del(func)

Delete a previously attached callback

callback_route_loaded_fail_add(func, *args, **kwargs)

Add a callback to be called on the “route,loaded,fail” signal.

callback_route_loaded_fail_del(func)

Delete a previously attached callback

callback_scroll_add(func, *args, **kwargs)

Add a callback to be called on the “scroll” signal.

callback_scroll_anim_start_add(func, *args, **kwargs)

Add a callback to be called on the “scroll,anim,start” signal.

callback_scroll_anim_start_del(func)

Delete a previously attached callback

callback_scroll_anim_stop_add(func, *args, **kwargs)

Add a callback to be called on the “scroll,anim,stop” signal.

callback_scroll_anim_stop_del(func)

Delete a previously attached callback

callback_scroll_del(func)

Delete a previously attached callback

callback_scroll_drag_start_add(func, *args, **kwargs)

Add a callback to be called on the “scroll,drag,start” signal.

callback_scroll_drag_start_del(func)

Delete a previously attached callback

callback_scroll_drag_stop_add(func, *args, **kwargs)

Add a callback to be called on the “scroll,drag,stop” signal.

callback_scroll_drag_stop_del(func)

Delete a previously attached callback

callback_tile_load_add(func, *args, **kwargs)

Add a callback to be called on the “tile,load” signal.

callback_tile_load_del(func)

Delete a previously attached callback

callback_tile_loaded_add(func, *args, **kwargs)

Add a callback to be called on the “tile,loaded” signal.

callback_tile_loaded_del(func)

Delete a previously attached callback

callback_tile_loaded_fail_add(func, *args, **kwargs)

Add a callback to be called on the “tile,loaded,fail” signal.

callback_tile_loaded_fail_del(func)

Delete a previously attached callback

callback_zoom_change_add(func, *args, **kwargs)

Add a callback to be called on the “zoom,change” signal.

callback_zoom_change_del(func)

Delete a previously attached callback

callback_zoom_start_add(func, *args, **kwargs)

Add a callback to be called on the “zoom,start” signal.

callback_zoom_start_del(func)

Delete a previously attached callback

callback_zoom_stop_add(func, *args, **kwargs)

Add a callback to be called on the “zoom,stop” signal.

callback_zoom_stop_del(func)

Delete a previously attached callback

canvas_to_region_convert(x, y)

Convert canvas coordinates into geographic coordinates.

This gets longitude and latitude from canvas x, y coordinates. The canvas coordinates mean x, y coordinate from current viewport.

Parameters:
  • x (int) – horizontal coordinate of the point to convert.
  • y (int) – vertical coordinate of the point to convert.
Returns:

(lon, lat)

Return type:

tuple of float

name_add(address, lon, lat, name_cb, *args, **kwargs)

Request an address or geographic coordinates (longitude, latitude) from a given address or geographic coordinate(longitude, latitude).

If you want to get address from geographic coordinates, set param address to None and set lon and lat as you want to query.

Instead if you want to query the geographic coordinates for a given address set address to something different than None.

To get the string for this address, MapName.address_get() should be used after the name_cb callback or “name,loaded” signal is called.

In the same way to get the longitude and latitude, MapName.region_get() should be used.

Parameters:
  • address (string) – The address to query, or None to query by coordinates
  • lon (float) – The longitude of the point to query.
  • lat (float) – The latitude of the point to query.
  • name_cb (callable) – A function to be called when the calculation end.
Returns:

a new name object

Return type:

MapName

Note

Any other arguments (positional or named) passed to the function will be passed back in the name_cb function

overlay_add(lon, lat)

Add a new overlay to the map object. This overlay has a default type.

An overlay will be created and shown in a specific point of the map, defined by lon and lat.

The created overlay has a default style layout before content or icon is set. If content or icon is set, those are displayed instead of default style layout.

Parameters:
  • lon (float) – The longitude of the overlay.
  • lat (float) – The latitude of the overlay.
Returns:

a newly created overlay

Return type:

MapOverlay

overlay_bubble_add()

Add a new bubble overlay to the map object.

A bubble will not be displayed before geographic coordinates are set or any other overlays are followed.

This overlay has a bubble style layout and icon or content can not be set.

Returns:a new bubble style overlay
Return type:MapOverlayBubble

See also

overlay_add()

overlay_circle_add(lon, lat, radius)

Add a new circle overlay to the map object.

This overlay has a circle type.

Parameters:
  • lon (float) – The circle center longitude.
  • lat (float) – The circle center latitude.
  • radius (int) – The radius of the overlay, in pixels.
Returns:

a new circle style overlay

Return type:

MapOverlayCircle

See also

overlay_add()

overlay_class_add()

Add a new class overlay to the map object.

This overlay has a class type. This overlay is not shown before overlay members are appended. If overlay members in the same class are close, group overlays are created. If they are far away, group overlays are hidden. When group overlays are shown, they have default style layouts at first.

You can change the state (hidden, paused, etc.) or set the content or icon of the group overlays by changing the state of the class overlay. Do not modify the group overlay itself. Also these changes have an influence on the overlays in the same class even if each overlay is alone and is not grouped.

Returns:a new class style overlay
Return type:MapOverlayClass

See also

overlay_add()

overlay_line_add(flon, flat, tlon, tlat)

Add a new line overlay to the map object.

This overlay has a line type.

Parameters:
  • flon (float) – The start longitude.
  • flat (float) – The start latitude.
  • tlon (float) – The end longitude.
  • tlat (float) – The end latitude.
Returns:

a new line style overlay

Return type:

MapOverlayLine

See also

overlay_add()

overlay_polygon_add()

Add a new polygon overlay to the map object.

This overlay has a polygon type. At least 3 regions should be added to show the polygon overlay.

Returns:a new polygon style overlay
Return type:MapOverlayPolygon

See also

overlay_add()

overlay_route_add(route)

Add a new route overlay to the map object.

This overlay has a route type. This overlay has a route style layout and icon or content can not be set.

Parameters:route (efl.elementary.map.MapRoute) – The route object to make an overlay from.
Returns:a new route style overlay
Return type:MapOverlayRoute

See also

overlay_add()

overlay_scale_add(x, y)

Add a new scale overlay to the map object.

This overlay has a scale type. The scale overlay shows the ratio of a distance on the map to the corresponding distance.

Parameters:
  • x (int) – horizontal pixel coordinate.
  • y (int) – vertical pixel coordinate
Returns:

a new scale style overlay

Return type:

MapOverlayScale

See also

overlay_add()

overlays

The list of all the overlays in the map object.

This list includes group overlays also. So this can change dynamically while zooming and panning.

Returns:a list of all overlays
Return type:list of MapOverlay objects
overlays_get()
overlays_show(overlays)

Move and zoom the map to display a list of overlays.

The map will be centered on the center point of the overlays in the list. Then the map will be zoomed in order to fit the overlays using the maximum zoom which allows display of all the overlays provided.

Parameters:overlays (list of MapOverlay) – the list of overlays to show

Warning

All the overlays in the list should belong to the same map object.

paused

The paused state of the map object.

This set/get the paused state to on (True) or off (False) for the map.

The default is off.

This will stop zooming using animation, changing zoom levels will change instantly. This will stop any existing animations that are running.

Type:bool
paused_get()
paused_set(paused)
region

The current geographic coordinates of the map.

This gets the current center coordinates of the map object. It can be set by region_bring_in() and region_show().

Type:tuple of float (lon, lat)
region_bring_in(lon, lat)

Animatedly bring in given coordinates to the center of the map.

This causes the map to jump to the given lon and lat coordinates and show it (by scrolling) in the center of the viewport, if it is not already centered. This will use animation to do so and take a period of time to complete.

Parameters:
  • lon (float) – The longitude to center at
  • lat (float) – The latitude to center at

See also

region_show()

region_get()
region_show(lon, lat)

Show the given coordinates at the center of the map, immediately.

This causes the map to redraw its viewport’s contents to the region containing the given lat and lon, that will be moved to the center of the map.

Parameters:
  • lon (float) – The longitude to center at
  • lat (float) – The latitude to center at
region_to_canvas_convert(lon, lat)

Convert geographic coordinates into canvas coordinates.

This gets canvas x, y coordinates from longitude and latitude. The canvas coordinates mean x, y coordinate from current viewport.

Parameters:
  • lon (float) – The longitude to convert.
  • lat (float) – The latitude to convert.
Returns:

(x, y)

Return type:

tuple of int

region_zoom_bring_in(zoom, lon, lat)

Animatedly set the zoom level of the map and bring in given coordinates to the center of the map.

This causes map to zoom into specific zoom level and also move to the given lat and lon coordinates and show it (by scrolling) in the center of the viewport concurrently.

Parameters:
  • zoom (int) – The zoom level to set
  • lon (float) – The longitude to center at
  • lat (float) – The latitude to center at

New in version 1.11.

rotate

The rotation of the map.

Rotate (or get the rotation) of the map around the Z axis. The rotation is expressed using the tuple: (degree, cx, cy), where degree is an angle that range from 0.0 to 360.0, while cx and cy are the center of rotation expressed in canvas units.

Type:a tuple (float, int, int)
rotate_get()
rotate_set(degree, cx, cy)
route_add(type, method, flon, flat, tlon, tlat, route_cb, *args, **kwargs)

Add a new route to the map object.

A route will be traced by point on coordinates (flat, flon) to point on coordinates (tlat, tlon), using the route service set with source_set().

It will take type on consideration to define the route, depending if the user will be walking or driving, the route may vary. One of ELM_MAP_ROUTE_TYPE_MOTOCAR, ELM_MAP_ROUTE_TYPE_BICYCLE, or ELM_MAP_ROUTE_TYPE_FOOT need to be used.

Another parameter is what the route should prioritize, the minor distance or the less time to be spend on the route. So method should be one of ELM_MAP_ROUTE_METHOD_SHORTEST or ELM_MAP_ROUTE_METHOD_FASTEST.

Parameters:
  • type (Map route types) – one of ELM_MAP_ROUTE_TYPE_MOTOCAR, ELM_MAP_ROUTE_TYPE_BICYCLE or ELM_MAP_ROUTE_TYPE_FOOT
  • method (Map route methods) – ELM_MAP_ROUTE_METHOD_SHORTEST or ELM_MAP_ROUTE_METHOD_FASTEST
  • flon (float) – The start longitude.
  • flat (float) – The start latitude.
  • tlon (float) – The destination longitude.
  • tlat (float) – The destination latitude.
  • route_cb (callable) – A function to be called when the calculation end.
Returns:

a new route object

Return type:

MapRoute

Note

Any other arguments (positional or named) passed to the function will be passed back in the route_cb function

scroller_policy

Deprecated since version 1.8: You should combine with Scrollable class instead.

scroller_policy_get()

Deprecated since version 1.8: You should combine with Scrollable class instead.

scroller_policy_set(policy_h, policy_v)

Deprecated since version 1.8: You should combine with Scrollable class instead.

source_get(source_type)

Get the name of currently used source for a specific type.

Parameters:source_type (Map source types) – the type of the source. Must be one of: ELM_MAP_SOURCE_TYPE_TILE, ELM_MAP_SOURCE_TYPE_ROUTE or ELM_MAP_SOURCE_TYPE_NAME
source_set(source_type, source_name)

Set the current source of the map for a specific type.

Map widget retrieves tile images that composes the map from a web service. This web service can be set with this method for ELM_MAP_SOURCE_TYPE_TILE type. A different service can return a different maps with different information and it can use different zoom values.

Map widget provides route data based on a external web service. This web service can be set with this method for ELM_MAP_SOURCE_TYPE_ROUTE type.

Map widget also provide geoname data based on a external web service. This web service can be set with this method for ELM_MAP_SOURCE_TYPE_NAME type.

The current source can be get using elm_map_source_get().

Parameters:
  • source_type (Map source types) – the type of the source. Must be one of: ELM_MAP_SOURCE_TYPE_TILE, ELM_MAP_SOURCE_TYPE_ROUTE or ELM_MAP_SOURCE_TYPE_NAME
  • source_name (string) – The source to be used. Need to match one of the names provided by sources_get().
sources_get(type)

Get the names of available sources for a specific type.

This will provide a list with all available sources for the given type.

Default available sources of tile type:

  • “Mapnik”
  • “Osmarender”
  • “CycleMap”
  • “Maplint”

Default available sources of route type:

  • “Yours”

Default available sources of name type:

  • “Nominatim”
Parameters:type (Map source types) – the type of the source. Must be one of: ELM_MAP_SOURCE_TYPE_TILE, ELM_MAP_SOURCE_TYPE_ROUTE or ELM_MAP_SOURCE_TYPE_NAME
tile_load_status

Get the information of tile load status.

This gets the current tiles requested and the count of the loaded ones.

Returns:the number of requested and completed tiles
Return type:tuple of 2 int
tile_load_status_get()
user_agent

The user agent used by the map object to access routing services.

User agent is a client application implementing a network protocol used in communications within a client–server distributed computing system.

The user_agent identification string will be transmitted in a header field User-Agent.

Type:string
user_agent_get()
user_agent_set(user_agent)
wheel_disabled

Mouse wheel can be used by the user to zoom in / out the map.

This property disable the mouse wheel usage.

Type:bool
wheel_disabled_get()
wheel_disabled_set(disabled)
zoom

The zoom level of the map.

This property will respect the limits defined by zoom_min and zoom_max. By default these values are 0 (world map) and 18 (maximum zoom).

This property should be used when zoom mode is set to ELM_MAP_ZOOM_MODE_MANUAL. That is the default mode, and can be set with zoom_mode.

Type:int
zoom_get()
zoom_max

The maximum zoom of the source.

zoom_max_get()
zoom_max_set(zoom)
zoom_min

The minimum zoom of the source.

zoom_min_get()
zoom_min_set(zoom)
zoom_mode

The zoom mode used by the map object.

This sets the zoom mode to manual or one of the automatic levels. Manual (ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by the zoom property and will stay at that level until changed by code or until zoom_mode is changed. This is the default mode.

The Automatic modes will allow the map object to automatically adjust zoom mode based on properties. ELM_MAP_ZOOM_MODE_AUTO_FIT will adjust zoom so the map fits inside the scroll frame with no pixels outside this area. ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but ensure no pixels within the frame are left unfilled. Do not forget that the valid sizes are 2^zoom, consequently the map may be smaller than the scroller view.

Type:int
zoom_mode_get()
zoom_mode_set(mode)
zoom_set(zoom)
class efl.elementary.MapRoute(Object map, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat, func, *args, **kwargs)

Bases: object

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()

delete()

Remove a route from the map.

distance

The route distance in kilometers.

Type:float
distance_get()
node

Get the informational text of the route nodes.

Type:string
node_get()
waypoint

Get the informational text of the route waypoints.

Type:string
waypoint_get()
class efl.elementary.MapName(Object map, address, double lon, double lat, func, *args, **kwargs)

Bases: object

be used to extract the needed information from the results.

address

The address of the name object.

Type:string
address_get()
delete()

Remove a name from the map.

region

Get the coordinates of the name.

Type:tuple of float (lon, lat)
region_get()
class efl.elementary.MapOverlay(Object Map, double lon, double lat)

Bases: object

callback_clicked_set(func, *args, **kwargs)

Set a callback to be called when the overlay is clicked.

If the overlay is clicked, the callback func will be called. The clicked overlay is returned by callback.

You can add callback to the class overlay. If one of the group overlays in this class is clicked, func will be called and return a virtual group overlays.

Parameters:func (callable) – the callback to be called

Note

Any extra argument (positional or named) passed to this function will be passed back in the callback.

callback_clicked_unset(func)

Unset the callback previously attached to this overlay.

color

The color of the overlay.

It uses an additive color model, so each color channel represents how much of each primary colors must to be used. 0 represents absence of this color, so if all of the three are set to 0, the color will be black.

These component values should be integers in the range 0 to 255, (single 8-bit byte).

By default is set to solid red (r = 255, g = 0, b = 0, a = 255).

For alpha channel, 0 represents completely transparent, and 255, opaque.

Type:tuple of 4 int (red, green, blue, alpha)

Note

Only default, class and route type overlay support this function.

color_get()
color_set(r, g, b, a)
content

The content object of the overlay.

The content should be resized or set size hints before set to the overlay.

This content is what will be inside the overlay that will be displayed. If a content is set, icon and default style layout are no more used before the content is deleted.

Type:efl.evas.Object

Note

Only default and class type overlay support this function.

Warning

Do not modify this object (move, show, hide, del, etc.) after set.

content_get()
content_set(content)
delete()

Delete the overlay and remove it from the map

displayed_zoom_min

The minimum zoom from where the overlay is displayed.

The overlay only will be displayed when the map is displayed at this value or bigger.

Type:int
displayed_zoom_min_get()
displayed_zoom_min_set(zoom)
hide

If the overlay is hidden or not.

Type:bool
hide_get()
hide_set(hide)
icon

The icon that is used to display the overlay.

Type:efl.evas.Object

Note

Only default and class type overlay support this function.

Warning

Do not modify this object (move, show, hide, del, etc.) after set.

icon_get()
icon_set(icon)
paused

Pause or unpause the overlay.

This sets the paused state to on (True) or off (False) for the overlay.

The default is off.

This will stop moving the overlay coordinates instantly. even if map being scrolled or zoomed.

Type:bool
paused_get()
paused_set(paused)
region

The geographic coordinates of the overlay.

This represent the center coordinates of the overlay.

Type:tuple of float (lon, lat)

Note

Only default and bubble type overlay support this function.

region_get()
region_set(lon, lat)
show()

Center the map on this overlay, immediately.

This causes the map to redraw its viewport’s contents to the region containing the given overlay’s coordinates, that will be moved to the center of the map.

See also

Map.overlays_show() if more than one overlay need to be displayed

type

Get the type of the overlay

Type:Map overlay types
type_get()
visible

Whether the overlay is visible or not.

The visible of the overlay can not be set. This value can only change dynamically while zooming and panning.

Type:bool
visible_get()
class efl.elementary.MapOverlayClass(Object Map)

Bases: efl.elementary.__init__.MapOverlay

grouped together.

append(overlay)

Add a new overlay member to the class overlay.

Parameters:overlay (MapOverlay) – the overlay to be added as a member.
members

The overlay members of the class overlay.

The group overlays are virtually overlays. Those are shown and hidden dynamically. You can add callback to the class overlay. If one of the group overlays in this class is clicked, callback will be called and return a virtual group overlays.

You can change the state (hidden, paused, etc.) or set the content or icon of the group overlays by changing the state of the class overlay.

Type:list of MapOverlay

Warning

Do not modify the group overlay itself.

members_get()
remove(overlay)

Remove the given overlay to the overlay class.

Parameters:overlay (MapOverlay) – the overlay to add as member
zoom_max

the maximum zoom from where the overlay members in the class can be grouped.

Overlay members in the class only will be grouped when the map is displayed at less than zoom_max.

Type:int
zoom_max_get()
zoom_max_set(zoom)
class efl.elementary.MapOverlayBubble(Object Map)

Bases: efl.elementary.__init__.MapOverlay

Note

This overlay has a bubble style layout and icon or content can not be set.

content_append(content)

Add a content object to the bubble overlay.

Added contents will be displayed inside the bubble overlay.

Parameters:content (efl.evas.Object) – The content to be added to the bubble overlay.
content_clear()

Clear all contents inside the bubble overlay.

This will delete all contents inside the bubble overlay.

follow(overlay)

Follow another overlay.

Bubble overlay will follow the parent overlay’s movement (hide, show, move).

Parameters:overlay (MapOverlay) – another overlay to follow.
class efl.elementary.MapOverlayLine(Object Map, flon, flat, tlot, tlat)

Bases: efl.elementary.__init__.MapOverlay

class efl.elementary.MapOverlayPolygon(Object Map)

Bases: efl.elementary.__init__.MapOverlay

by the points added using the region_add() method.

At least 3 regions should be added to show the polygon overlay.

region_add(lon, lat)

Add a geographic coordinates to the polygon overlay.

Parameters:
  • lon (float) – The longitude.
  • lat (float) – The latitude.
class efl.elementary.MapOverlayCircle(Object Map, lon, lat, radius)

Bases: efl.elementary.__init__.MapOverlay

class efl.elementary.MapOverlayScale(Object Map, x, y)

Bases: efl.elementary.__init__.MapOverlay

the corresponding distance.

class efl.elementary.MapOverlayRoute(Object Map, MapRoute route)

Bases: efl.elementary.__init__.MapOverlay