Commit 3ba34d3d authored by Deployer's avatar Deployer

Changed style schema

parent 09856543
...@@ -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.0.0/cedarmaps.js'></script> <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.0.0/cedarmaps.css' rel='stylesheet'/> <link href='https://api.cedarmaps.com/cedarmaps-gl.js/v1.1.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:
...@@ -26,7 +26,7 @@ and put the following code in the `<body>` of your HTML file: ...@@ -26,7 +26,7 @@ and put the following code in the `<body>` of your HTML file:
<script type="text/javascript"> <script type="text/javascript">
var accessToken = 'ACCESS TOKEN' // You can get an access token by filling out the demo account form in https://www.cedarmaps.com/#demo var accessToken = 'ACCESS TOKEN' // You can get an access token by filling out the demo account form in https://www.cedarmaps.com/#demo
var map = CedarMaps.map(accessToken, { var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light', //or cedarmaps://styles/dark style: 'style://streets-light', //or style://streets-dark
container: 'map', container: 'map',
center: [51.391827, 35.694875], center: [51.391827, 35.694875],
zoom: 15 zoom: 15
...@@ -67,7 +67,7 @@ _Returns_ a `Map box` object. ...@@ -67,7 +67,7 @@ _Returns_ a `Map box` object.
```javascript ```javascript
CedarMaps.map(accessToken, { CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light', //or cedarmaps://styles/dark style: 'style://streets-light', //or style://streets-dark
container: <CONTAINER ID>, container: <CONTAINER ID>,
center: <CENTER POINT>, center: <CENTER POINT>,
zoom: 15 zoom: 15
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<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.0.0/cedarmaps.js'></script> <script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/> <link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script> <script src='../access-token.js'></script>
<style> <style>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
// initilizing map into div#map // initilizing map into div#map
var map = CedarMaps.map(accessToken, { var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light', style: 'style://streets-light',
container: 'map', container: 'map',
center: [51.3789253, 35.709987], center: [51.3789253, 35.709987],
zoom: 15, zoom: 15,
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<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.0.0/cedarmaps.js'></script> <script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/> <link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script> <script src='../access-token.js'></script>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
// initilizing map into div#map // initilizing map into div#map
var map = CedarMaps.map(accessToken, { var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light', style: 'style://streets-light',
container: 'map', container: 'map',
center: [51.3789253, 35.709987], center: [51.3789253, 35.709987],
zoom: 15, zoom: 15,
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<meta charset=utf-8/> <meta charset=utf-8/>
<title>CedarMaps - Simple Map Load</title> <title>CedarMaps - Simple Map Load</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script> <script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/> <link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script> <script src='../access-token.js'></script>
<style> <style>
body { body {
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
// initilizing map into div#map // initilizing map into div#map
var map = CedarMaps.map(accessToken, { var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/dark', style: 'style://streets-dark',
container: 'map', container: 'map',
scrollWheelZoom: true, scrollWheelZoom: true,
center: [51.378618, 35.767243], center: [51.378618, 35.767243],
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<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.0.0/cedarmaps.js'></script> <script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/> <link href='../dist/v1.1.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>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
// initilizing map into div#map // initilizing map into div#map
var map = CedarMaps.map(accessToken, { var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light', style: 'style://streets-light',
container: 'map', container: 'map',
center: [51.3789253, 35.709987], center: [51.3789253, 35.709987],
zoom: 15, zoom: 15,
......
...@@ -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.0.0", "version": "1.1.0",
"homepage": "http://www.cedarmaps.com/", "homepage": "http://www.cedarmaps.com/",
"repository": { "repository": {
"type": "git", "type": "git",
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
const mapboxGl = require('mapbox-gl') const mapboxGl = require('mapbox-gl')
const cedarMapsMethods = require('cedar-maps') const cedarMapsMethods = require('cedar-maps')
const styleMapper = { const styleMapper = {
'cedarmaps://styles/light': 'https://api.cedarmaps.com/v1/styles/cedarmaps.light.json', 'style://streets-light': 'https://api.cedarmaps.com/v1/styles/cedarmaps.light.json',
'cedarmaps://styles/dark': 'https://api.cedarmaps.com/v1/styles/cedarmaps.dark.json' 'style://streets-dark': 'https://api.cedarmaps.com/v1/styles/cedarmaps.dark.json'
} }
const map = (accessToken, options) => { const map = (accessToken, options) => {
......
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