Commit 03b2d0df authored by Mohsen Taleb's avatar Mohsen Taleb

Updated Mapbox.js to v2.1.9. Updated demos and README.

parent da039f9d
......@@ -24,8 +24,8 @@ Check out demos at `demos/` folder for better grasping the idea.
```html
<script>
apiBaseUrlHttp = 'http://...';
apiBaseUrlHttps = 'https://...';
apiBaseUrlHttp = 'http://your-own-api-url.com';
apiBaseUrlHttps = 'https://your-own-api-url.com';
</script>
```
......@@ -49,5 +49,31 @@ npm install
grunt build
```
built files are put in `dist/` folder.
Note that every time you pull new changes from repository, you should run `grunt build`.
\ No newline at end of file
Built files are copied into `dist/` folder according to current SDK `version`. (See `package.json`)
Note that every time you pull new changes from repository, you should run `grunt build`.
# Updating
## Updating mapbox.js submodule
The mapbox.js SDK is updated from time to time and obviously cedarmaps.js also needs to be synced. The submodule is residing in `/mapbox.js` folder and points to a specific mapbox.js tag (not the HEAD, of course).
In order to upgrade the submodule to a specific `<version>`, do the following:
```
cd mapbox.js/
git pull
git tag -l
git checkout <version>
cd ..
git add mapbox.js/
git commit -m "Updated mapbox submodule to <version>."
```
## Updating Cedarmaps.js
In case of any updates in module itself the following files must be updated:
* `version` in `./package.json`
* `version` in `<script>` and `<link>` tags in demo files (`./demo`)
* `version` in sample API usage in `README.md`
* "Doc files" by running `grunt doc` command
* building new dist files by running `grunt build` command
\ No newline at end of file
......@@ -5,9 +5,9 @@
<meta charset=utf-8 />
<title>Reverse Geocoding Testing Environment</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script>
<script src='../dist/v1.0.1/cedarmaps.js'></script>
<script src='../access-token.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet' />
<link href='../dist/v1.0.1/cedarmaps.css' rel='stylesheet' />
<style>
body {
......@@ -65,7 +65,7 @@
<div id='map' class='map'> </div>
<script>
window.L.Icon.Default.imagePath = '../dist/v1.0.0/images/images';
window.L.Icon.Default.imagePath = '../dist/v1.0.1/images/images';
try {
L.cedarmaps.accessToken = accessToken;
......
......@@ -5,9 +5,9 @@
<meta charset=utf-8 />
<title>CedarMaps Web SDK Demos</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script>
<script src='../dist/v1.0.1/cedarmaps.js'></script>
<script src='../access-token.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet' />
<link href='../dist/v1.0.1/cedarmaps.css' rel='stylesheet' />
<style>
body {
......@@ -55,13 +55,13 @@
// see: http://leafletjs.com/reference.html#marker
var myIcon = L.icon({
iconUrl: '../dist/v1.0.0/images/pin-taxi.png',
iconRetinaUrl: '../dist/v1.0.0/images/pin-taxi@2x.png',
iconUrl: '../dist/v1.0.1/images/pin-taxi.png',
iconRetinaUrl: '../dist/v1.0.1/images/pin-taxi@2x.png',
iconSize: [34, 46],
iconAnchor: [17, 41],
popupAnchor: [-3, -46],
shadowUrl: '../dist/v1.0.0/images/pin-shadow.png',
shadowRetinaUrl: '../dist/v1.0.0/images/pin-shadow@2x.png',
shadowUrl: '../dist/v1.0.1/images/pin-shadow.png',
shadowRetinaUrl: '../dist/v1.0.1/images/pin-shadow@2x.png',
shadowSize: [26, 6],
shadowAnchor: [13,3]
});
......
......@@ -5,9 +5,9 @@
<meta charset=utf-8 />
<title>Reverse Geocoding Testing Environment</title>
<script src='../dist/v1.0.0/cedarmaps.js'></script>
<script src='../dist/v1.0.1/cedarmaps.js'></script>
<script src='../access-token.js'></script>
<link href='../dist/v1.0.0/cedarmaps.css' rel='stylesheet' />
<link href='../dist/v1.0.1/cedarmaps.css' rel='stylesheet' />
<style>
body {
......@@ -55,12 +55,12 @@
<body>
<div id='map' class='map'> </div>
<div id="results">
<h2>Click somewhere on map!</h2><div id="loading"><img src="../dist/v1.0.0/images/loading-14-white.gif" width="14" height="14"> Loading...</div>
<h2>Click somewhere on map!</h2><div id="loading"><img src="../dist/v1.0.1/images/loading-14-white.gif" width="14" height="14"> Loading...</div>
<div id="latlng"></div>
<div id="response"></div>
</div>
<script>
window.L.Icon.Default.imagePath ='../dist/v1.0.0/images/images';
window.L.Icon.Default.imagePath ='../dist/v1.0.1/images/images';
try {
L.cedarmaps.accessToken = accessToken;
......
Subproject commit 97b7dd877797d902d0b040ce8ef575148c21c6f1
Subproject commit 4b1d2bdd45801cc0718d1feb5343427c1c4203ea
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