for 0.0.1
Show:

# GPSUtils Class

Some GPS coordinates convertion tools to use maps in Mobilizing.js

() static

## Methods

### `getCoordinateInMap`

(
• `longitute`
• `latitude`
• `zoom`
• `mapCoord`
• `mapWidth`
• `mapHeight`
)
static

Compute GPS coordinates into pixels x, y coordinates in a map. Here, we adopt the OSM standard for mappinp. Therefore, you should generate your bitmap earth map with a tool using OSM tiles (like MapBox, TileMill). You should give the zoom factor and the map bounds (in lognititude and latitude) to this method for the calculation to be effective

#### Parameters:

• `longitute` Number
• `latitude` Number
• `zoom` Number

zoom factor fo this map

• `mapCoord` Array

MapBox/TileMill map coords array, like [-180,-85.0511,180,85.0511]

• `mapWidth` Number

the map width in pixels

• `mapHeight` Number

the map height in pixels

### `getPixelsCoordsFromOSMLngLat`

(
• `longitute`
• `latitude`
• `zoom`
)
static

Converts longitude and latitude coords (from an OpenStreetMap map) into absolute pixels coords. This method don't calculate the pixels coords within a given map bound's! Use getCoordinateInMap for this.

#### Parameters:

• `longitute` Number

longitute

• `latitude` Number

latitude

• `zoom` Number

the zoom factor fo this map

### `latY`

(
• `lat`
)
Number static

latitude to absolute y coord

#### Parameters:

• `lat` Number

Number:

pixel coordinate

### `lngX`

(
• `lon`
)
Number static

latitude to absolute x coord

#### Parameters:

• `lon` Number

Number:

pixel coordinate

## Properties

### `getPolarFromLngLat`

Unknown static

Convert GPS coords to cartesian coords. NB : this algorithm is adapted to three.js geoms!

#### Sub-properties:

• `longitude` Numbe
• `latitude` Numbe
• `radius` Numbe