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
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.0.0/cedarmaps.js'></script>
<link href='https://api.cedarmaps.com/cedarmaps-gl.js/v1.0.0/cedarmaps.css' rel='stylesheet'/>
<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'/>
```
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">
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, {
style: 'cedarmaps://styles/light', //or cedarmaps://styles/dark
style: 'style://streets-light', //or style://streets-dark
container: 'map',
center: [51.391827, 35.694875],
zoom: 15
......@@ -67,7 +67,7 @@ _Returns_ a `Map box` object.
```javascript
CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light', //or cedarmaps://styles/dark
style: 'style://streets-light', //or style://streets-dark
container: <CONTAINER ID>,
center: <CENTER POINT>,
zoom: 15
......
......@@ -5,8 +5,8 @@
<meta charset=utf-8/>
<title>CedarMaps - Basic Map Load with a Marker</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
<style>
......@@ -31,7 +31,7 @@
// initilizing map into div#map
var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light',
style: 'style://streets-light',
container: 'map',
center: [51.3789253, 35.709987],
zoom: 15,
......
......@@ -5,8 +5,8 @@
<meta charset=utf-8/>
<title>CedarMaps - Basic Map Load with a Marker</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
......@@ -32,7 +32,7 @@
// initilizing map into div#map
var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light',
style: 'style://streets-light',
container: 'map',
center: [51.3789253, 35.709987],
zoom: 15,
......
......@@ -5,8 +5,8 @@
<meta charset=utf-8/>
<title>CedarMaps - Simple Map Load</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
<style>
body {
......@@ -40,7 +40,7 @@
// initilizing map into div#map
var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/dark',
style: 'style://streets-dark',
container: 'map',
scrollWheelZoom: true,
center: [51.378618, 35.767243],
......
......@@ -5,8 +5,8 @@
<meta charset=utf-8/>
<title>CedarMaps - Basic Map Load with a Marker</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet'/>
<script src='../dist/v1.1.0/cedarmaps.js'></script>
<link href='../dist/v1.1.0/cedarmaps.css' rel='stylesheet'/>
<link href='./css/reverse-geocoder.css' rel='stylesheet'/>
<script src='../access-token.js'></script>
......@@ -47,7 +47,7 @@
// initilizing map into div#map
var map = CedarMaps.map(accessToken, {
style: 'cedarmaps://styles/light',
style: 'style://streets-light',
container: 'map',
center: [51.3789253, 35.709987],
zoom: 15,
......
......@@ -2,7 +2,7 @@
"author": "CedarStudios",
"name": "cedarmaps.js",
"description": "CedarMaps javascript API built on top of mapbox.js",
"version": "1.0.0",
"version": "1.1.0",
"homepage": "http://www.cedarmaps.com/",
"repository": {
"type": "git",
......
......@@ -3,8 +3,8 @@
const mapboxGl = require('mapbox-gl')
const cedarMapsMethods = require('cedar-maps')
const styleMapper = {
'cedarmaps://styles/light': 'https://api.cedarmaps.com/v1/styles/cedarmaps.light.json',
'cedarmaps://styles/dark': 'https://api.cedarmaps.com/v1/styles/cedarmaps.dark.json'
'style://streets-light': 'https://api.cedarmaps.com/v1/styles/cedarmaps.light.json',
'style://streets-dark': 'https://api.cedarmaps.com/v1/styles/cedarmaps.dark.json'
}
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