`
`for Java™ 2 Micro Edition
`
`Version 1.0
`Proposed Final Draft 0.6
`
`JSR 179 Expert Group
`jsr-179-comments@jcp.org
`
`Java Community Process
`
`1
`
`AMC 1019
`AMERICAN MULTI-CINEMA v. Fall Line Patents
`IPR2019-00610
`
`
`
`iiii
`
`2
`
`
`
`Copyright Notice and Disclaimers
`Copyright © 2003 Nokia Corporation. All rights reserved.
`NOTICE
`The Specification is protected by copyright and the information described therein may be protected by one or
`more U.S. patents, foreign patents, or pending applications. Except as provided under the following license, no
`part of the Specification may be reproduced in any form by any means without the prior written authorization of
`the Specification Lead and its licensors, if any. Any use of the Specification and the information described
`therein will be governed by the terms and conditions of this license and the Export Control and General Terms
`as set forth in the Specification Lead website Legal Terms. By viewing, downloading or otherwise copying the
`Specification, you agree that you have read, understood, and will comply with all of the terms and conditions set
`forth herein.
`Subject to the terms and conditions of this license, the Specification Lead hereby grants you a fully-paid, non-
`exclusive, non-transferable, worldwide, limited license (without the right to sublicense) under Specification
`Lead intellectual property rights to review the Specification internally for the purposes of evaluation only. Other
`than this limited license, you acquire no right, title or interest in or to the Specification or any other intellectual
`property of the Specification Lead. The Specification contains the proprietary and confidential information of
`Specification Lead and may only be used in accordance with the license terms set forth herein. This license will
`expire ninety (90) days from the date of Release listed above and will terminate immediately without notice
`from Specification Lead if you fail to comply with any provision of this license. Upon termination, you must
`cease use of or destroy the Specification.
`TRADEMARKS
`No right, title, or interest in or to any trademarks, service marks, or trade names of Sun or Sun’s licensors, the
`Specification Lead or the Specification Lead’s licensors is granted hereunder. Sun, Sun Microsystems, the Sun
`logo, Java, J2ME, and the Java Coffee Cup logo are trademarks or registered trademarks of Sun Microsystems,
`Inc. in the U.S. and other countries.
`Nokia is a registered trademark of Nokia Corporation.
`DISCLAIMER OF WARRANTIES
`THE SPECIFICATION IS PROVIDED “AS IS” AND IS EXPERIMENTAL AND MAY CONTAIN DEFECTS
`OR DEFICIENCIES WHICH CANNOT OR WILL NOT BE CORRECTED BY THE SPECIFICATION
`LEAD. THE SPECIFICATION LEAD MAKES NO REPRESENTATIONS OR WARRANTIES, EITHER
`EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
`MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT THAT
`THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE OR THAT ANY
`PRACTICE OR IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY
`PATENTS, COPYRIGHTS, TRADE SECRETS OR OTHER RIGHTS. This document does not represent any
`commitment to release or implement any portion of the Specification in any product.
`THE SPECIFICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL
`ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION THEREIN; THESE
`CHANGES WILL BE INCORPORATED INTO NEW VERSIONS OF THE SPECIFICATION, IF ANY. THE
`SPECIFICATION LEAD MAY MAKE IMPROVEMENTS AND/OR CHANGES TO THE PRODUCT(S)
`AND/OR THE PROGRAM(S) DESCRIBED IN THE SPECIFICATION AT ANY TIME. Any use of such
`changes in the Specification will be governed by the then-current license for the applicable version of the
`Specification.
`LIMITATION OF LIABILITY
`TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL THE SPECIFICATION LEAD OR
`ITS LICENSORS BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST
`REVENUE, PROFITS OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR
`
`iii
`
`3
`
`
`
`PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
`ARISING OUT OF OR RELATED TO ANY FURNISHING, PRACTICING, MODIFYING OR ANY USE
`OF THE SPECIFICATION, EVEN IF THE SPECIFICATION LEAD AND/OR ITS LICENSORS HAVE
`BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
`You will indemnify, hold harmless, and defend the Specification Lead and its licensors from any claims based
`on your use of the Specification for any purposes other than those of internal evaluation, and from any claims
`that later versions or releases of any Specification furnished to you are incompatible with the Specification
`provided to you under this license.
`RESTRICTED RIGHTS LEGEND
`If this Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime
`contractor or subcontractor (at any tier), then the Government’s rights in the Software and accompanying
`documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through
`227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD
`acquisitions).
`REPORT
`You may wish to report any ambiguities, inconsistencies or inaccuracies you may find in connection with your
`evaluation of the Specification (“Feedback”). To the extent that you provide the Specification Lead with any
`Feedback, you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis,
`and (ii) grant the Specification Lead a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license,
`with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without
`limitation the Feedback for any purpose related to the Specification and future versions, implementations, and
`test suites thereof.
`
`iv
`
`4
`
`
`
`Contents
`
`Overview ......................................................................................................... 1
`javax.microedition.location ........................................................................... 5
`AddressInfo ............................................................................................................................................... 10
`Coordinates ............................................................................................................................................... 16
`Criteria ...................................................................................................................................................... 22
`Landmark .................................................................................................................................................. 29
`LandmarkException .................................................................................................................................. 33
`LandmarkStore .......................................................................................................................................... 35
`Location .................................................................................................................................................... 43
`LocationException .................................................................................................................................... 49
`LocationListener ....................................................................................................................................... 51
`LocationProvider ....................................................................................................................................... 53
`Orientation ................................................................................................................................................ 60
`ProximityListener ...................................................................................................................................... 63
`QualifiedCoordinates ................................................................................................................................ 65
`Constant Field Values .................................................................................. 69
`Almanac ........................................................................................................ 73
`Index ............................................................................................................. 79
`
`v
`
`5
`
`
`
`Contents
`Contents
`
`Vi
`vi
`
`6
`
`
`
`C H A P T E R 1
`
`Overview
`
`Description
`This javadoc documentation contains the Proposed Final Draft version 0.6 of the JSR179 Location API for
`J2ME.
`
`Preface
`This specification defines the JSR179 Location API for J2ME. This specification is a work in progress and is
`subject to changes before the final specification. The Proposed Final Draft specification is intended to be close
`to the final specification. However, the expert group reserves the right to make any technical and editorial
`changes before the final release.
`
`This document and all associated documents are subject to the terms of the JCP agreements (i.e. JSPA and/or
`IEPA).
`
`Overview
`This specification defines a J2ME Optional Package that enables mobile location-based applications for
`resource limited devices (referred to as ’terminals’ in the following). The API is designed to be a compact and
`generic API that produces information about the present geographic location of the terminal to Java
`applications.This API covers obtaining information about the present geographic location and orientation of the
`terminal and accessing a database of known landmarks stored in the terminal.
`
`The Location API for J2ME is designed as an Optional Package that can be used with many J2ME Profiles. The
`minimum platform required by this API is the J2ME Connected, Limited Device Configuration (CLDC) v1.1.
`The API can also be used with the J2ME Connected Device Configuration (CDC). (Note that due to using the
`floating point datatypes in this API, it can’t be used with CLDC v1.0.)
`
`Notation used
`This specification uses the following terms as they are defined in the table below:
`
`Term
`
`MUST
`
`Definition
`
`The associated definition is an absolute requirement of this specification.
`
`MUST NOT
`
`The definition is an absolute prohibition of this specification.
`
`SHOULD
`
`Indicates a recommended practice. There may exist valid reasons in
`particular circumstances to ignore this recommendation, but the full
`implications must be understood and carefully weighed before choosing a
`different course.
`
`SHOULD NOT Indicates a non-recommended practice. There may exist valid reasons in
`particular circumstances when the particular behavior is acceptable or
`even useful, but the full implications should be understood and the case
`carefully weighed before implementing any behavior described with this
`label.
`
`MAY
`
`Indicates that an item is truly optional.
`
`1
`
`7
`
`
`
`Overview
`
`Mathematical notation for defining ranges of floating point numbers is used as defined below:
`
`[a,b]
`
`(a,b)
`
`[a,b)
`
`(a,b]
`
`a closed range from value a to value b with the end-points a and b
`included in the range
`
`an open range from value a to value b with the end-points a and b not
`included in the range
`
`a half-open range from value a to value b with the end-point a included
`and end-point b not included in the range
`
`a half-open range from value a to value b with the end-point a not
`included and end-point b included in the range
`
`Where BNF notation is used to define syntax elements, the BNF notation is used as defined in section 2.1 of
`RFC2616.
`
`Glossary
`This section defines some terms used in the specification.
`
`Assisted
`
`Category
`
`Coordinates
`
`Course
`
`Landmark
`
`Location
`
`Implies that the other party provides some information assisting
`determining the location to the party that does the final calculation. For
`example, for a terminal based method ’assisted’ means that the network
`provides some assistance information. See ’terminal based’ and ’network
`based’.
`
`Category is used to group Landmarks that are of similar type to the end
`user, e.g. restaurants, museums, etc. Category has an identifying unique
`name that identifies the category to the end user.
`
`The geographical coordinates (latitude, longitude, altitude) that identify a
`exact location point. In this API, these are encapsulated in instances of
`the Coordinates class.
`
`Course made good, i.e. direction of the velocity vector, relative to true
`north.
`
`A known geographical location that has a name and a category associated
`with it. The name is a textual name that identifies that location for the end
`user and the category provides a grouping of similar landmarks based on
`some property that is meaningful to the end user. In this API, often refers
`to the class Landmark. The landmarks are usually stored in a local
`database in the terminal that is represented by the LandmarkStore
`class in this API.
`
`Geographical location. In this API, often refers to the class Location
`that encodes the geographical coordinates, their accuracy, the current
`course and speed of the terminal (if available), textual address
`information for the location (if available) and the timestamp when the
`location measurement was made.
`
`2
`
`8
`
`
`
`Overview
`
`Qualified Coordinates The geographical coordinates (latitude, longitude, altitude) that identify a
`location combined with their accuracy information. These identify a
`geographical location with some uncertainty of the measurement
`represented by the accuracy values. In this API, these are encapsulated in
`instances of the QualifiedCoordinates class.
`
`Network based
`
`Terminal based
`
`A location method is network based if the final calculation that gives the
`location result is performed in the network.
`
`A location method is terminal based if the final calculation that gives the
`location result is performed in the terminal.
`
`References
`
`[1] NIMA TR8350.2 World Geodetic System 1984, It’s definition and
`Relationships with Local Geodetic Systems. U.S. Department of Defense
`
`[2] NMEA 0183 Interface Standard, v3.01. National Marine Electronics
`Association, January 2002
`
`[3]
`
`[4]
`
`[5]
`
`TS 101, Mobile Location Protocol Specification, v3.0.0. Location
`Interoperability Forum, 2002
`
`JSR139 Connected Limited Device Configuration v1.1 (CLDC 1.1). Sun
`Microsystems, 2002
`
`ISO 3166-1 Codes for the representation of names of countries and their
`subdivisions —- Part 1: Country codes. International Organization for
`Standardization
`
`Package Summary
`
`Location Interfaces
`
`javax.microedition.loc
`ation5
`
`The javax.microedition.location package contains the basic classes needed
`to request and get a location result.
`
`3
`
`9
`
`
`
`Overview
`Overview
`
`4
`
`10
`
`10
`
`
`
`C H A P T E R 2
`
`Package
`javax.microedition.location
`
`Description
`The javax.microedition.location package contains the basic classes needed to request and get a
`location result.
`
`The LocationProvider class represents a module that is able to determine the location of the terminal.
`This may be implemented using any possible location methods, for example, satellite based methods like GPS,
`cellular network based methods, short-range positioning methods like Bluetooth Local Positioning, etc. The
`implementation may also combine the methods in various ways to get the optimal result.
`The application can specify criteria for selecting the location provider and obtain a LocationProvider
`instance that is able to fulfil these criteria as closely as possible. By using the LocationProvider, the
`application can get Location objects representing the location of the terminal at the time of the measurement.
`The application can either request a single Location object or be periodically updated with new Location
`objects via a LocationListener implemented by the application.
`The location is represented by the Location object that contains a QualifiedCoordinates object
`representing the geographical coordinates (latitude, longitude and altitude) and information about the their
`accuracy, a timestamp and possibly information about speed and course of the terminal. For some location
`methods, the Location object may also contain an AddressInfo object that includes textual address
`information, e.g. a street address.
`The Location gives the accuracy of the coordinates as the radius of a circular area indicating the 1-sigma
`confidence level. The 1-sigma confidence refers to the standard deviation of the distribution. Assuming a normal
`distribution (which is not necessarily the case), this implies that the actual location is within the circle defined
`by the returned point and radius at a probability of approximately 68%. The actual location may thus be also
`outside of the circle, which has to be taken into account when using the location information in applications.
`This package also includes a database of landmarks. A landmark is a known physical location that is associated
`with a name representing that location for the end user. The user can store commonly used locations in the
`database. Examples of landmarks could be e.g. the user’s home, office, etc. The landmark database must be
`shared between all Java applications and may be shared with other applications in the terminal, including native
`applications, so that the end user has a consistent user experience across all location based applications on the
`terminal.
`
`Mandatory and optional features
`This API contains some options whose availability depends on the used location methods. These features are
`not optional in order to allow for differences in the implementations and to cause unnecessary fragmentation,
`but they are unavoidable due to the differences in the underlying location methods. Implementations should
`support all features that are possible with the locations methods that are used.
`
`Mandatory features for all location methods are:
`• Provide latitude and longitude coordinates and their accuracy
`
`• Provide timestamp of the location measurement
`
`Mandatory other API features for the terminal are:
`
`5
`
`11
`
`
`
`javax.microedition.location
`
`• Support one (default) LandmarkStore for storing landmarks
`
`Features whose availability depend on the used location method:
`
`• Provide altitude information
`
`• Provide accuracy of altitude
`
`• Provide course and speed information
`
`• Provide textual address information related to the location
`
`• Provide landmark proximity events
`
`Optional features whose availability depend on the landmark store implementation of the terminal and its
`possible relation to landmark stores shared with native applications:
`
`• Creating and deleting landmark stores
`
`• Adding and removing landmark categories
`
`Additionally, depending on the hardware capabilities of the terminal, the following features are optionally
`supported:
`
`• Provide the compass azimuth of the terminal orientation
`
`• Provide the pitch and roll 3D terminal orientation information
`
`In general, every implementation MUST contain all the classes, interfaces and methods as defined in this
`specification. Those features that are optional to implement have a defined behaviour in the case the feature is
`not supported by the implementation.
`
`Security of this API
`Some methods in this API are defined to throw a SecurityException if the caller does not have the
`permissions needed to perform the action. This MUST be enforced by an appropriate security framework in the
`platform.
`
`Using the MIDP 2.0 Security Framework
`If this API is implemented on the MIDP 2.0 platform, the security framework of MIDP 2.0 MUST be used as
`defined below.
`
`The table below defines the names of the permissions used and the methods that are protected by each
`permission. The definition of the policy for these permissions is out of scope for this specification.
`
`Permission name
`
`javax.microedition.location.Location
`
`Methods protected by this permission
`
`LocationProvider.getLocation(),
`LocationProvider.setLocationListener()
`
`javax.microedition.location.Orientation
`
`Orientation.getOrientation()
`
`javax.microedition.location.ProximityListener
`
`LocationProvider.addProximityListener()
`
`javax.microedition.location.LandmarkStore.read
`
`LandmarkStore.getInstance(),
`LandmarkStore.listLandmarkStores()
`
`6
`
`12
`
`
`
`javax.microedition.location.LandmarkStore.write
`
`javax.microedition.location
`
`LandmarkStore.addLandmark(),
`LandmarkStore.deleteLandmark(),
`LandmarkStore.removeLandmarkFromCategory(),
`LandmarkStore.updateLandmark()
`
`javax.microedition.location.LandmarkStore.catego
`ry
`
`LandmarkStore.addCategory(),
`LandmarkStore.deleteCategory()
`
`javax.microedition.location.LandmarkStore.manage
`ment
`
`LandmarkStore.createLandmarkStore(),
`LandmarkStore.deleteLandmarkStore()
`
`Identification of the Location API
`To enable applications to test for the presence of the Location API and its version during runtime, a system
`property is defined. Platforms where this API is implemented according to this specification shall include a
`system property with a key “microedition.location.version”. When System.getProperty is
`called with this key, implementations conforming to this specification shall return the version string “1.0”.
`
`Example of Usage
`The following piece of code illustrates how to obtain the current location of the terminal. This piece of code
`illustrates obtaining the location syncronously. An application would normally perform this within a separate
`thread, because the getLocation method may block for a long time.
`
`try {
`
`// Create a Criteria object for defining desired selection criteria
`Criteria cr = new Criteria();
`// Specify horizontal accuracy of 500 meters, leave other parameters
`// at default values.
`cr.setHorizontalAccuracy(500);
`
`LocationProvider lp = LocationProvider.getInstance(cr);
`
`// get the location, one minute timeout
`Location l = lp.getLocation(60);
`
`Coordinates c = l.getQualifiedCoordinates();
`
`if (c != null) {
`// use coordinate information
`...
`
`}
`} catch (LocationException e) {
`// not able to retrive location information
`...
`
`}
`The following example illustrates how to use the LocationListener for subscribing to periodic location
`updates. This example creates a handler thread to handle the updates so that the methods on the listener would
`not block the platform implementation threads for a long time.
`
`7
`
`13
`
`
`
`javax.microedition.location
`
`class MovementTracker implements LocationListener {
`float movementDistance;
`LocationProvider provider;
`Location lastValidLocation;
`UpdateHandler handler;
`boolean done;
`
`public MovementTracker(float movementDistance) throws LocationException {
`this.movementDistance = movementDistance;
`done = false;
`handler = new UpdateHandler();
`new Thread(handler).start();
`provider = LocationProvider.getInstance(null);
`provider.setLocationListener(this, -1, -1, -1);
`
`} p
`
`} p
`
`} c
`
`ublic void locationUpdated(LocationProvider provider, Location location) {
`handler.handleUpdate(location);
`
`ublic void providerStateChanged(LocationProvider provider, int newState) {
`
`lass UpdateHandler implements Runnable {
`private Location updatedLocation = null;
`
`// The run method performs the actual processing of the location
`// updates
`public void run() {
`Location locationToBeHandled = null;
`while (!done) {
`synchronized(this) {
`if (updatedLocation == null) {
`try {
`wait();
`} catch (Exception e) {
`// Handle interruption
`
`}
`
`}l
`
`ocationToBeHandled = updatedLocation;
`
`} /
`
`/ The benefit of the MessageListener is here.
`// This thread could via similar triggers be
`// handling other kind of events as well in
`// addition to just receiving the location updates.
`if (locationToBeHandled != null)
`processUpdate(locationToBeHandled);
`
`}
`
`} p
`
`} p
`
`ublic synchronized void handleUpdate(Location update) {
`updatedLocation = update;
`notify();
`
`rivate void processUpdate(Location update) {
`if ( location.getQualifiedCoordinates().distance(
`lastValidLocation.getQualifiedCoordinates() )
`> movementDistance ) {
`// Alert user to movement...
`
`// Cache new position as we have moved a sufficient distance
`// from last one
`lastValidLocation = location;
`
`}
`
`}
`
`8
`
`14
`
`
`
`javax.microedition.location
`
`}
`
`}
`
`Since: LAPI 1.0
`
`Class Summary
`
`Interfaces
`
`LocationListener51
`
`The LocationListener represents a listener that receives events associated with a
`particular LocationProvider.
`
`ProximityListener63
`
`This interface represents a listener to events associated with detecting proximity to
`some registered coordinates.
`
`Classes
`
`AddressInfo10
`
`Coordinates16
`
`Criteria22
`
`Landmark29
`
`LandmarkStore35
`
`Location43
`
`LocationProvider53
`
`The AddressInfo class holds textual address information about a location.
`
`The Coordinates class represents coordinates as latitude-longitude-altitude values.
`
`The criteria used for the selection of the location provider is defined by the values in
`this class.
`
`The Landmark class represents a landmark, i.e.
`
`The LandmarkStore class provides methods to store, delete and retrieve landmarks
`from a persistent landmark database.
`
`The Location class represents the standard set of basic location information.
`
`This is the starting point for applications using this API and represents a source of the
`location information.
`
`Orientation60
`
`The Orientation class represents the physical orientation of the terminal.
`
`QualifiedCoordinates65
`
`The QualifiedCoordinates class represents coordinates as latitude-longitude-
`altitude values that are associated with an accuracy value.
`
`Exceptions
`
`LandmarkException33
`
`The LandmarkException is thrown when an error related to handling landmarks
`has occurred.
`
`LocationException49
`
`The LocationException is thrown when a location API specific error has
`occurred.
`
`9
`
`15
`
`
`
`AddressInfo
`
` javax.microedition.location
`
`javax.microedition.location
`AddressInfo
`
`Declaration
`public class AddressInfo
`
`Object
`
`|+
`
`--javax.microedition.location.AddressInfo
`
`Description
`The AddressInfo class holds textual address information about a location. Typically the information is e.g.
`street address. The information is divided into fields (e.g. street, postal code, city, etc.). Defined field constants
`can be used to retrieve field data.
`
`If the value of a field is not available, it is set to null.
`The names of the fields use terms and definitions that are commonly used e.g. in the United States. Addresses
`for other countries should map these to the closest corresponding entities used in that country.
`This class is only a container for the information. The getField method returns the value set for the defined
`field using the setField method. When the platform implementation returns AddressInfo objects, it
`MUST ensure that it only returns objects where the parameters have values set as described for their semantics
`in this class.
`Below are some typical examples of addresses in different countries and how they map to the AddressInfo
`fields.
`
`AddressInfo Field
`
`American Example
`
`British Example
`
`EXTENSION
`
`Flat 5
`
`The Oaks
`
`STREET
`
`10 Washington Street
`
`20 Greenford Court
`
`POSTAL_CODE
`
`12345
`
`CITY
`
`COUNTY
`
`STATE
`
`San Fransisco
`
`Marin County
`
`California
`
`AB1 9YZ
`
`Cambridge
`
`Cambridgeshire
`
`England
`
`COUNTRY
`
`United States of America
`
`Great Britain
`
`COUNTRY_CODE
`
`US
`
`UK
`
`DISTRICT
`
`BUILDING_NAME
`
`BUILDING_FLOOR
`
`BUILDING_ROOM
`
`BUILDING_ZONE
`
`CROSSING1
`
`CROSSING2
`
`10
`
`16
`
`
`
`javax.microedition.location
`
`AddressInfo
`BUILDING_FLOOR
`
`URL
`
`http://www.americanurl.com http://britishurl.co.uk
`
`PHONE_NUMBER
`
`Member Summary
`Fields
`
`static int BUILDING_FLOOR11
`static int BUILDING_NAME12
`static int BUILDING_ROOM12
`static int BUILDING_ZONE12
`static int CITY12
`static int COUNTRY12
`static int COUNTRY_CODE12
`static int COUNTY12
`static int CROSSING113
`static int CROSSING213
`static int DISTRICT13
`static int EXTENSION13
`static int PHONE_NUMBER13
`static int POSTAL_CODE13
`static int STATE13
`static int STREET14
`static int URL14
`
`AddressInfo()14
`
`Constructors
`
`Methods
` java.lang.String getField(int field)14
` void setField(int field, String value)14
`
`Inherited Member Summary
`
`Methods inherited from class Object
`
`equals(Object), getClass(), hashCode(), notify(), notifyAll(), toString(), wait(),
`wait(), wait()
`
`Fields
`
`BUILDING_FLOOR
`Declaration:
`public static final int BUILDING_FLOOR
`
`Description:
`Address field denoting a building floor.
`
`11
`
`17
`
`
`
`AddressInfo
`BUILDING_NAME
`
` javax.microedition.location
`
`BUILDING_NAME
`Declaration:
`public static final int BUILDING_NAME
`
`Description:
`Address field denoting a building name.
`
`BUILDING_ROOM
`Declaration:
`public static final int BUILDING_ROOM
`
`Description:
`Address field denoting a building room.
`
`BUILDING_ZONE
`Declaration:
`public static final int BUILDING_ZONE
`
`Description:
`Address field denoting a building zone
`
`CITY
`Declaration:
`public static final int CITY
`
`Description:
`Address field denoting town or city name.
`
`COUNTRY
`Declaration:
`public static final int COUNTRY
`
`Description:
`Address field denoting country.
`
`COUNTRY_CODE
`Declaration:
`public static final int COUNTRY_CODE
`
`Description:
`Address field denoting country as a two-letter ISO 3166-1 code.
`
`COUNTY
`Declaration:
`public static final int COUNTY
`
`Description:
`Address field denoting a county, which is an entity between a state and a city
`
`12
`
`18
`
`
`
`javax.microedition.location
`
`AddressInfo
`CROSSING1
`
`CROSSING1
`Declaration:
`public static final int CROSSING1
`
`Description:
`Address field denoting a street in a crossing.
`
`CROSSING2
`Declaration:
`public static final int CROSSING2
`
`Description:
`Address field denoting a street in a crossing.
`
`DISTRICT
`Declaration:
`public static final int DISTRICT
`
`Description:
`Address field denoting a municipal district.
`
`EXTENSION
`Declaration:
`public static final int EXTENSION
`
`Description:
`Address field denoting address extension, e.g. flat number.
`
`PHONE_NUMBER
`Declaration:
`public static final int PHONE_NUMBER
`
`Description:
`Address field denoting a phone number for this place.
`
`POSTAL_CODE
`Declaration:
`public static final int POSTAL_CODE
`
`Description:
`Address field denoting zip or postal code.
`
`STATE
`Declaration:
`public static final int STATE
`
`Description:
`Address field denoting state or province.
`
`13
`
`19
`
`
`
`AddressInfo
`STREET
`
` javax.microedition.location
`
`STREET
`Declaration:
`public static final int STREET
`
`Description:
`Address field denoting street name and number.
`
`URL
`Declaration:
`public static final int URL
`
`Description:
`Address field denoting a URL for this place.
`
`Constructors
`
`AddressInfo()
`Declaration:
`public AddressInfo()
`
`Description:
`Constructs an AddressInfo object with all the values of the fields set to null.
`
`Methods
`
`getField(int)
`Declaration:
`public String getField(int field)
`
`Description:
`Returns the value of an address field. If the field is not available null is returned.
`
`Example: getField(AddressInfo.STREET) might return “113 Broadway” if the location is on
`Broadway, New York, or null if not available.
`Parameters:
`field - the ID of the field to be retrieved
`Returns: the address field string. If the field is not set, returns null.
`Throws:
`IllegalArgumentException - if the parameter field ID is not one of the constant values defined
`in this class
`See Also: setField(int, String)14
`
`setField(int, String)
`Declaration:
`public void setField(int field, String value)
`
`14
`
`20
`
`
`
`javax.microedition.location
`
`AddressInfo
`setField(int, String)
`
`Description:
`Sets the value of an address field.
`Parameters:
`field - the ID of the field to be set
`
`value - the new value for the field. null is used to indicate that the field has no content.
`Throws:
`IllegalArgumentException - if the parameter field ID is not one of the constant values defined
`in this class
`See Also: getField(int)14
`
`15
`
`21
`
`
`
` javax.microedition.location
`
`Coordinates
`setField(int, String)
`javax.microedition.location
`Coordinates
`
`Declaration
`public class Coordinates
`
`Object
`
`|+
`
`--javax.microedition.location.Coordinates
`
`Direct Known Subclasses: QualifiedCoordinates65
`
`Description
`The Coordinates class represents coordinates as latitude-longitude-altitude values. The latitude and
`longitude values are expressed in degrees using floating point values. The degrees are in decimal values (rather
`than minutes/seconds). The coordinates are given using the WGS84 datum.
`
`This class also provides convenience methods for converting between a string coordinate representation and the
`double representation used in this class.
`
`Member Summary
`Fields
`
`static int DD_MM17
`static int DD_MM_SS17
`
`Constructors
`
`Methods
`
`Coordinates(double latitude, double longitude, float
`altitude)17
`
` float azimuthTo(Coordinates to)18
`static
`convert(double coordinate, int outputType)18
`java.lang.String
`static double convert(String coordinate)18
` float distance(Coordinates to)19
` float getAltitude()20
` double getLatitude()20
` double getLongitude()20
` void setAltitude(float altitude)20
` void setLatitude(double latitude)21
` void setLongitude(double longitude)21
`
`Inherited Member Summary
`
`Methods inherited from class Object
`
`16
`
`22
`
`
`
`javax.microedition.location
`
`Coordinates
`DD_MM
`
`Inherited Member Summary
`
`equals(Object), getClass(), hashCode(), notify(), notifyAll(), toString(),