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