**Author:** JosÃ© Fernando Calcerrada

**Licence:**
Licensed under GPL license.

Comments can be sent to: jfcalcerrada at yahoo dot es.

Back to the projects

# Contents

# Introduction

An extension for Google Maps API v3. It's implements differents functions that API v3 not supported yet. Most of that's functions are taking for API v2.

# Getting started

You need include the Google Masp API v3 first.
Yo user the ruler plugin inside the `<head>`

tag of your HTML document:

<script type="text/javascript" src="/path/to/extendedApi.js"></script>

# Examples

Examples of how it works.

# Reference Table of Contents

List of the objets with extensions:

Methods | Return Value | Description |
---|---|---|

distanceFrom(other:LatLng) | Number | Returns the distance, in meters, from this location to the given location. By default, this distance is calculated given the default equatorial earth radius of 6378137 meters. The earth is approximated as a sphere, hence the distance could be off as much as 0.3%, especially in the polar extremes. |

getMiddle(other:LatLng) | LatLng | Returns the middle coordinate, LatLng, between two LatLngs. |

Methods | Return Value | Description |
---|---|---|

distanceFrom(other:Marker) | Number | Returns the distance, in meters, from this location to the given location. By default, this distance is calculated given the default equatorial earth radius of 6378137 meters. The earth is approximated as a sphere, hence the distance could be off as much as 0.3%, especially in the polar extremes. |

getMiddle(other:Marker) | LatLng | Returns the middle coordinate, LatLng, between two markers. |

Methods | Return Value | Description |
---|---|---|

deleteVertex(index:Number) | None | Removes with the given index in the polygon and updates the shape of the polyline accordingly. |

getBounds() | LatLngBounds | Returns the bounds for this polyline. |

getLength() | Number | Returns the length (in meters) of the polyline along the surface of a spherical Earth. |

getVertex(index:Number) | LatLng | Returns the vertex with the given index in the polyline. |

getVertexCount() | Number | Returns the number of vertices in the polyline. |

getVisible() | boolean | Return the visibility of the polyline. |

insertVertex(index:Number, latlng:LatLng) | None | Inserts a new point at the given index in the polyline and updates its shape. |

setVertex(index:Number, latlng:LatLng) | None | Set a LatLng at the specified index. |

setVisible(visible:boolean) | None | Set the visibility of the polyline. |

Methods | Return Value | Description |
---|---|---|

deleteVertex(index:Number) | None | Removes with the given index in the polygon and updates the shape of the polygon accordingly. |

getBounds() | LatLngBounds | Returns the bounds for this polygon. |

getPerimeter() | Number | Returns the perimeter (in meters) of the polygon along the surface of a spherical Earth. |

getVertex(index:Number) | LatLng | Returns the vertex with the given index in the polygon. |

getVertexCount() | Number | Returns the number of vertices in the polygon. |

getVisible() | boolean | Return the visibility of the polygon. |

insertVertex(index:Number, latlng:LatLng) | None | Inserts a new point at the given index in the polygon and updates its shape. |

setVertex(index:Number, latlng:LatLng) | None | Set a LatLng at the specified index. |

setVisible(visible:boolean) | None | Set the visibility of the polygon. |

# Download

**Normal Version:** Click to download extendedApi.js

# Chagelog