# marker-animate

> marker-animate

Latest version **0.0.1** (published 2015-05-30) · LicenseRef-LICENSE license · 0 weekly downloads

## Install

```sh
npm install marker-animate
pnpm add marker-animate
yarn add marker-animate
bun add marker-animate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-05-30 |
| First published | 2015-05-30 |
| Weekly downloads | 0 |
| License | LicenseRef-LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | terikon |

## Links

- npm: https://www.npmjs.com/package/marker-animate
- Repository: https://github.com/viskin/marker-animate.git#node-friendly
- Homepage: https://github.com/viskin/marker-animate
- Issues: https://github.com/viskin/marker-animate/issues
- npm.io page: https://npm.io/package/marker-animate

## Dependencies (2)

- [jquery](https://npm.io/package/jquery.md) *
- [jquery-easing](https://npm.io/package/jquery-easing.md) ^0.0.1

## Recent versions

- 0.0.1 (latest) — 2015-05-30

## README

# Animated marker movement in Google Maps

A nice alternative to `marker.setPosition(latLng)`. Include jQuery and jQuery Easing Plugin for more easing options.

Demo: http://robsite.net/static/markermove/markermove.html (click on the map)

## Node wrapper

This is node wrapper for the library, so it will be possible to use it from [NW.js](<http://nwjs.io/>).

To use it from node:

```
npm install marker-animate
```

## Usage

Include `markerAnimate.js` after Google Maps and call `animateTo` on a `google.maps.Marker`:

    // params:
    // newPosition        - the new Position as google.maps.LatLng()
    // options.duration   - animation duration in ms (default 1000)
    // options.easing     - easing function from jQuery and/or the jQuery easing plugin (default 'linear')
    // options.complete   - callback function. Gets called, after the animation has finished

    marker.animateTo(newPosition [, {easing: 'easeOutBounce', duration: 1000, complete: function(){}}]);

## Example

    var marker = new google.maps.Marker({position: new google.maps.LatLng(0,0), map: myMap, title: 'Hello World!'});
    var newPosition = new google.maps.LatLng(13,42);

    // move marker in 1000ms and with linear animation.
    marker.animateTo(newPosition); 

    // or with callback and options for easing and duration in milliseconds. Needs jQuery Easing Plugin.
    marker.animateTo(newPosition, {  easing: "easeOutBounce",
                                     duration: 1000,
                                     complete: function() {
                                       alert("animation complete");
                                     }
                                  });

---
_Source: https://npm.io/package/marker-animate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
