After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698143 - API to check if location is currently under the view
API to check if location is currently under the view
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-16 16:03 UTC by Zeeshan Ali
Modified: 2013-04-16 21:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add champlain_view_get_bounding_box() (2.19 KB, patch)
2013-04-16 16:03 UTC, Zeeshan Ali
committed Details | Review
Add champlain_bounding_box_covers() (1.99 KB, patch)
2013-04-16 16:03 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2013-04-16 16:03:37 UTC
See patches
Comment 1 Zeeshan Ali 2013-04-16 16:03:39 UTC
Created attachment 241659 [details] [review]
Add champlain_view_get_bounding_box()

Add method to get bounding box of the view.
Comment 2 Zeeshan Ali 2013-04-16 16:03:43 UTC
Created attachment 241660 [details] [review]
Add champlain_bounding_box_covers()

Add a method to check if a particular location is covered by a bounding
box.
Comment 3 Jiri Techet 2013-04-16 21:34:22 UTC
Review of attachment 241659 [details] [review]:

Committed.
Comment 4 Jiri Techet 2013-04-16 21:34:34 UTC
Review of attachment 241660 [details] [review]:

Committed.
Comment 5 Jiri Techet 2013-04-16 21:37:47 UTC
Looks useful, thanks. In the future we could actually remove champlain_view_get_center_latitude() and champlain_view_get_center_latitude() from the API since they can be obtained from the bounding box.

I've just updated the Since from 0.12 to 0.12.4.
Comment 6 Zeeshan Ali 2013-04-16 21:43:28 UTC
(In reply to comment #5)
> Looks useful, thanks. In the future we could actually remove
> champlain_view_get_center_latitude() and champlain_view_get_center_latitude()
> from the API since they can be obtained from the bounding box.

That won't be very convenient so I'd say these api should be kept. One thing i noticed though is that getter names are not following the usual convention of matching respective proprerty names. Either we should deprecate these in favor of champlain_view_get_latitude/longitude() or do the vice versa on the props.
 
> I've just updated the Since from 0.12 to 0.12.4.

Thanks!