Class
MapLocation
Description
Represents a location anywhere on Earth.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
latitude As Double, longitude As Double, tag As Variant = Nil |
|||
location As MapLocation |
|||
address As String |
MapLocation |
✓ |
|
location As String |
|||
Property descriptions
MapLocation.Address
Address As String
The physical address (if there is one) of the location.
This property is read-only.
MapLocation.Animated
Animated As Boolean
If True, moving the map to a new location or displaying an added location will be animated.
MapLocation.Icon
Icon As Picture
The picture that appears at the location when added to the map. The default is a pin.
MapLocation.Latitude
Latitude As Double
The angular distance of the center of the map north or south of the equator.
This property is read-only.
MapLocation.Longitude
Longitude As Double
The angular distance of the center of the map east or west of the meridian at Greenwich, England.
This property is read-only.
MapLocation.Tag
Tag As Variant
An related value associated with the location.
MapLocation.Title
Title As String
A name associated with the location. The name that appears when the location is added to a map.
Method descriptions
MapLocation.Constructor
Constructor(address As String, tag As Variant = Nil)
Note
Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.
Creates a MapLocation at the address and with the tag passed.
To create a geo-fence, pass a MobileCircularRegion as the Tag property.
MapLocation.Constructor
Constructor(latitude As Double, longitude As Double, tag As Variant = Nil)
Note
Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.
Creates a MapLocation at the latitude and longitude with the tag passed.
If latitude or longitude passed is not valid, an InvalidArgumentException will occur.
To create a geo-fence, pass a MobileCircularRegion as the Tag property.
Create a location for the White House:
Var theWhiteHouse As New MapLocation(38.897957, -77.036560)
MapLocation.DistanceTo
DistanceTo(location As MapLocation) As Double
The distance in kilometers between the current location and the location passed.
MapLocation.LookupAddress
LookupAddress(address As String) As MapLocation()
Returns an array of MapLocations for the address passed.
This method is shared.
MapLocation.MoveTo
MoveTo(latitude As Double, longitude As Double)
Moves the current MapLocation to the latitude and longitude passed.
MapLocation.MoveTo
MoveTo(location As String)
Moves the current MapLocation to the location passed.
MapLocation.PointsOfInterest
PointsOfInterest As String()
Returns names of any points of interest at the current MapLocation. Points of interest are things such as parks, museums, etc. and not commercial locations such as retail stores.
Notes
If you provide invalid coordinates or an invalid address when creating a MapLocation, an InvalidArgumentException will occur.
Compatibility
iOS projects on the iOS operating system.
See also
Object parent class; MobileMapViewer class.