NAME

Firefox::Marionette::GeoLocation - Represents a GeoLocation for Firefox

VERSION

Version 1.61

SYNOPSIS

use Firefox::Marionette();

my $firefox = Firefox::Marionette->new(geo => { lat => -37.814, lng => 144.96332 };
...

DESCRIPTION

This module provides an easy interface for the GeoLocationCoordinates object in Firefox

SUBROUTINES/METHODS

accuracy

returns the accuracy of the latitude and longitude properties, expressed in meters.

altitude

returns the position's altitude in meters, relative to nominal sea level. This value may not be defined.

altitude_accuracy

returns the accuracy of the altitude expressed in meters. This value may not be defined.

country_code

returns the country_code (ISO 3166-1 alpha-2) of the location. This value may not be defined.

heading

returns the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees). This value may not be defined.

latitude

returns the position's latitude in decimal degrees.

longitude

returns the position's longitude in decimal degrees.

new

accepts an optional hash as a parameter. Allowed keys are below;

  • accuracy - the accuracy of the latitude and longitude properties, expressed in meters.

  • altitude - the accuracy of the altitude expressed in meters.

  • altitude_accuracy - accuracy of the altitude expressed in meters.

  • heading - the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees).

  • lat - see latitude.

  • latitude - the position's latitude in decimal degrees.

  • lon - see longitude.

  • long - see longitude.

  • longitude - the position's longitude in decimal degrees.

  • lng - see longitude.

  • speed - the velocity of the device in meters per second.

  • tz - the timezone as an Olson TZ identifier.

This method returns a new Firefox::Marionette::GeoLocation object.

speed

returns the velocity of the device in meters per second. This value may not be defined.

timezone_offset

returns the timezone offset in minutes from GMT. This value may not be defined.

tz

returns the timezone as an Olson TZ identifier. This value may not be defined.

TO_JSON

required to allow JSON serialisation to work correctly. This method should not need to be called directly.

uri

This method returns the object encoded as a new URI.

DIAGNOSTICS

None.

CONFIGURATION AND ENVIRONMENT

Firefox::Marionette::GeoLocation requires no configuration files or environment variables.

DEPENDENCIES

None.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

To report a bug, or view the current list of bugs, please visit https://github.com/david-dick/firefox-marionette/issues

AUTHOR

David Dick <ddick@cpan.org>

LICENSE AND COPYRIGHT

Copyright (c) 2024, David Dick <ddick@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.