google-polyline

WebJar for google-polyline

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

google-polyline
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

google-polyline
WebJar for google-polyline
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jhermsmeier/node-google-polyline

Download google-polyline

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/google-polyline/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>google-polyline</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/google-polyline/
implementation 'org.webjars.npm:google-polyline:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/google-polyline/
implementation ("org.webjars.npm:google-polyline:1.0.0")
'org.webjars.npm:google-polyline:jar:1.0.0'
<dependency org="org.webjars.npm" name="google-polyline" rev="1.0.0">
  <artifact name="google-polyline" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='google-polyline', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "google-polyline" % "1.0.0"
[org.webjars.npm/google-polyline "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

google-polyline

npm npm license npm downloads build status

Encodes and decodes Google's polyline format

Install via npm

$ npm install --save google-polyline

Usage

var polyline = require( 'google-polyline' )
polyline.encode([
  [ 38.5, -120.2 ],
  [ 40.7, -120.95 ],
  [ 43.252, -126.453 ]
])

> '_p~iF~ps|U_ulLnnqC_mqNvxq`@'
polyline.decode( '_p~iF~ps|U_ulLnnqC_mqNvxq`@' )

> [
  [ 38.5, -120.2 ],
  [ 40.7, -120.95 ],
  [ 43.252, -126.453 ]
]

Benchmarks

$ npm run benchmark
# decode: 3 points ⨉ 100000
ok ~21 ms (0 s + 21199187 ns)

# decode: ~350 points ⨉ 100000
ok ~741 ms (0 s + 740819246 ns)

# encode: 3 points ⨉ 100000
ok ~221 ms (0 s + 221480259 ns)

# encode: ~350 points ⨉ 100000
ok ~2.4 s (2 s + 403294668 ns)

Versions

Version
1.0.0