From: sangho park <gouache95@gmail.com>
Subject: [E-devel] [Patch] elm_map_marker_region_get This is a patch for elm_map_marker. I added one api to get the coordinates of the marker. because marker->longitude and marker->latitude are private data, app can't access the coordinates of the marker. SVN revision: 57665
This commit is contained in:
parent
749c4f2c12
commit
1bcb936306
|
@ -2106,6 +2106,7 @@ extern "C" {
|
|||
EAPI Elm_Map_Marker *elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Class *clas, Elm_Map_Group_Class *clas_group, void *data) EINA_ARG_NONNULL(1, 4, 5);
|
||||
EAPI void elm_map_max_marker_per_group_set(Evas_Object *obj, int max) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_map_marker_remove(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_map_marker_region_get(const Elm_Map_Marker *marker, double *lon, double *lat) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_map_marker_bring_in(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_map_marker_show(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_map_markers_list_show(Eina_List *markers) EINA_ARG_NONNULL(1);
|
||||
|
|
|
@ -3043,6 +3043,23 @@ elm_map_marker_remove(Elm_Map_Marker *marker)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current coordinates of the marker.
|
||||
*
|
||||
* @param marker marker.
|
||||
* @param lat The latitude.
|
||||
* @param lon The longitude.
|
||||
*
|
||||
* @ingroup Map
|
||||
*/
|
||||
EAPI void
|
||||
elm_map_marker_region_get(const Elm_Map_Marker *marker, double *lon, double *lat)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(marker);
|
||||
if (lon) *lon = marker->longitude;
|
||||
if (lat) *lat = marker->latitude;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move the map to the coordinate of the marker.
|
||||
*
|
||||
|
@ -3057,7 +3074,6 @@ elm_map_marker_bring_in(Elm_Map_Marker *marker)
|
|||
elm_map_geo_region_bring_in(marker->wd->obj, marker->longitude, marker->latitude);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Move the map to the coordinate of the marker.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue