com.supermap.plugin

Class LocationManagePlugin

  • java.lang.Object
    • com.supermap.plugin.LocationManagePlugin


  • public class LocationManagePlugin
    extends java.lang.Object
    The location management plug-in. Now it supports to get the current location from the GPS device.

    When using the navigation function, you must use this class to get GPSData for real navigation and cruise.

    • Constructor Detail

      • LocationManagePlugin

        public LocationManagePlugin()
        Constructs a new location management plug-in.
    • Method Detail

      • openGpsDevice

        public boolean openGpsDevice(android.location.LocationManager loc)
        Starts the GPS device.
        Parameters:
        loc - android The location manager of android.
        Returns:
        A boolean. Return true if successful; otherwise, false.
      • closeGpsDevice

        public void closeGpsDevice()
        Closes the GPS device.
      • setTimeInterval

        public void setTimeInterval(long interval)
        Sets time interval.
        Parameters:
        interval - Time interval. The unit is millisecond.
      • getTimeInterval

        public long getTimeInterval()
        Gets the time interval.
        Returns:
        Time interval.
      • addLocationChangedListener

        public boolean addLocationChangedListener(LocationChangedListener locationChangedListener)
        Adds the listener of location changes.
        Parameters:
        locationChangedListener - location change listener.
        Returns:
        a boolean value, add a position to change the listener successfully returns true, otherwise it returns false.
      • removeLocationChangedListener

        public boolean removeLocationChangedListener(LocationChangedListener locationChangedListener)
        Removes the change listener with the specified location.
        Parameters:
        locationChangedListener - ChangedListener location change listener.
        Returns:
        a boolean value, remove the specified location change the listener successfully returns true, otherwise it returns false.
      • addSatelliteStatusListener

        public boolean addSatelliteStatusListener(SatelliteStatusListener satelliteStatusListener)
        Adds satellite status listener.
        Parameters:
        satelliteStatusListener - satellite information change listener
        Returns:
        adds a listening that is null and returns false; otherwise it returns true.
      • removeSatelliteStatusListener

        public boolean removeSatelliteStatusListener(SatelliteStatusListener satelliteStatusListener)
        Removes the specified satellite status listener.
        Parameters:
        satelliteStatusListener - satellite information change listener
        Returns:
        Returns true if the specified listener object is found, false otherwise;