Commit ba8984cf authored by Deployer's avatar Deployer

Improved documentation. Updated cedar-maps npm module to version 2

parent f5ab9952
......@@ -14,8 +14,8 @@ CedarMaps JS is a javascript library for building interactive maps. It's simply
Recommended usage is via the CedarMaps CDN. Just include CSS and JavaScript files in `<head>` section of your HTML file.
```html
<script src='https://api.cedarmaps.com/cedarmaps-gl.js/v1.1.0/cedarmaps.js'></script>
<link href='https://api.cedarmaps.com/cedarmaps-gl.js/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='https://api.cedarmaps.com/cedarmaps-gl.js/v2.0.0/cedarmaps.js'></script>
<link href='https://api.cedarmaps.com/cedarmaps-gl.js/v2.0.0/cedarmaps.css' rel='stylesheet'/>
```
and put the following code in the `<body>` of your HTML file:
......@@ -56,6 +56,14 @@ npx webpack
You can also see the [API documentation](https://www.mapbox.com/mapbox-gl-js) for further help.
# Demos
[Basic map marker live example](https://demo.cedarmaps.com/websdk-vector/demos/basic-map-marker.html)
[Basic map marker with controls live example](https://demo.cedarmaps.com/websdk-vector/demos/basic-map-marker-with-controls.html)
[Direction live example](https://demo.cedarmaps.com/websdk-vector/demos/direction.html)
[Reverse geocoder live example](https://demo.cedarmaps.com/websdk-vector/demos/reverse-geocoder.html)
# API
## map
......@@ -81,7 +89,6 @@ Mapbox GL object
var marker = new CedarMaps.gl.Marker().setLngLat([51.3789253, 35.709987]).addTo(map)
```
_Example_: Check out a [Live example](https://demo.cedarmaps.com/websdk-vector/demos/basic-map-marker.html).
## api
CedarMaps API. please see [cedarmaps npm package](https://www.npmjs.com/package/cedar-maps) for more information
\ No newline at end of file
......@@ -2,11 +2,11 @@
<html>
<head>
<meta charset=utf-8/>
<meta charset="UTF-8">
<title>CedarMaps - Basic Map Load with a Marker</title>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v2.0.0/cedarmaps.js'></script>
<link href='../dist/v2.0.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
<style>
......
......@@ -2,11 +2,11 @@
<html>
<head>
<meta charset=utf-8/>
<meta charset="UTF-8">
<title>CedarMaps - Basic Map Load with a Marker</title>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v2.0.0/cedarmaps.js'></script>
<link href='../dist/v2.0.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
......
......@@ -2,11 +2,11 @@
<html>
<head>
<meta charset=utf-8/>
<meta charset="UTF-8">
<title>CedarMaps - Simple Map Load</title>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v2.0.0/cedarmaps.js'></script>
<link href='../dist/v2.0.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
<style>
body {
......@@ -54,7 +54,7 @@
// Points should be separated by a semicolon. e.g.: lat,lng;lat,lng;lat,lng....
// You can provide up to 100 stops (including start, middle and end points) for a direction request. Here we provided 3.
direction({lat: 35.764335, lon: 51.365622}, {lat: 35.7604311, lon: 51.3939486}, {}, function (err, result) {
direction([{lat: 35.764335, lon: 51.365622}, {lat: 35.7604311, lon: 51.3939486}], {}, function (err, result) {
if (err) {
return console.log(err)
}
......
......@@ -2,11 +2,11 @@
<html>
<head>
<meta charset=utf-8/>
<meta charset="UTF-8">
<title>CedarMaps - Basic Map Load with a Marker</title>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v2.0.0/cedarmaps.js'></script>
<link href='../dist/v2.0.0/cedarmaps.css' rel='stylesheet'/>
<link href='./css/reverse-geocoder.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
......
{
"name": "cedarmaps.js",
"version": "1.0.0",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -454,9 +454,9 @@
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz",
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w=="
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
},
"babel-code-frame": {
"version": "6.26.0",
......@@ -1513,9 +1513,9 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"cedar-maps": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cedar-maps/-/cedar-maps-1.1.1.tgz",
"integrity": "sha512-7oKm8HyR2eSXrfgVUZI4emiBfUWNSb2hIrMlXwPuoM6iPIKsC5B1698jTO7G9nAgeQ5DXZoNvNX4Q2EbfIkxCQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/cedar-maps/-/cedar-maps-2.0.1.tgz",
"integrity": "sha512-40rfmhS8d/aMqKoRZzbo7kaGSiQnTMuxmHBu5WNaOHCt8yjVwvV4tIp1XL48/pyJCUWppwHsfij7EyQVmt9uiA==",
"requires": {
"lodash": "^4.17.10",
"q": "^1.5.1",
......@@ -3185,11 +3185,11 @@
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz",
"integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==",
"requires": {
"ajv": "^5.1.0",
"ajv": "^5.3.0",
"har-schema": "^2.0.0"
},
"dependencies": {
......@@ -4206,9 +4206,9 @@
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"oauth-sign": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"object-copy": {
"version": "0.1.0",
......@@ -4578,6 +4578,11 @@
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
"dev": true
},
"psl": {
"version": "1.1.29",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
"integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ=="
},
"public-encrypt": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz",
......@@ -4839,30 +4844,30 @@
}
},
"request": {
"version": "2.87.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz",
"integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==",
"version": "2.88.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.6.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.5",
"extend": "~3.0.1",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.1",
"har-validator": "~5.0.3",
"form-data": "~2.3.2",
"har-validator": "~5.1.0",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.17",
"oauth-sign": "~0.8.2",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.1",
"safe-buffer": "^5.1.1",
"tough-cookie": "~2.3.3",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.1.0"
"uuid": "^3.3.2"
}
},
"require-directory": {
......@@ -5675,10 +5680,11 @@
}
},
"tough-cookie": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"requires": {
"psl": "^1.1.24",
"punycode": "^1.4.1"
},
"dependencies": {
......
......@@ -2,7 +2,7 @@
"author": "CedarStudios",
"name": "cedarmaps.js",
"description": "CedarMaps javascript API built on top of mapbox.js",
"version": "1.1.0",
"version": "2.0.0",
"homepage": "http://www.cedarmaps.com/",
"repository": {
"type": "git",
......@@ -14,7 +14,7 @@
"babel-loader": "^7.1.5",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"cedar-maps": "^1.1.0",
"cedar-maps": "^2.0.1",
"mapbox-gl": "^0.47.0"
},
"optionalDependencies": {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment