Commit da039f9d authored by Mohsen Taleb's avatar Mohsen Taleb

Added support for setting API base url manually for dedicated plans.

parent b4077192
...@@ -102,7 +102,5 @@ ...@@ -102,7 +102,5 @@
'copy:apiDocument' 'copy:apiDocument'
]); ]);
grunt.registerTask('default', function() { grunt.registerTask('default', 'build');
grunt.log.writeln('No task specified. Did nothing. run "grunt build" for example.');
});
}; };
...@@ -7,8 +7,8 @@ This is CedarMaps Javascript API. It's simply a wrapper for [Mapbox Javascript A ...@@ -7,8 +7,8 @@ This is CedarMaps Javascript API. It's simply a wrapper for [Mapbox Javascript A
Recommended usage is via the CedarMaps CDN: Recommended usage is via the CedarMaps CDN:
```html ```html
<script src='http://api.cedarmaps.com/cedarmaps.js/v1.0.0/cedarmaps.js'></script> <script src='http://api.cedarmaps.com/cedarmaps.js/v1.0.1/cedarmaps.js'></script>
<link href='http://api.cedarmaps.com/cedarmaps.js/v1.0.0/cedarmaps.css' rel='stylesheet' /> <link href='http://api.cedarmaps.com/cedarmaps.js/v1.0.1/cedarmaps.css' rel='stylesheet' />
``` ```
The `cedarmaps.js` file includes the Leaflet library. Alternatively, you can use `cedarmaps.standalone.js`, which does not include Leaflet (you will have to provide it yourself). The `cedarmaps.js` file includes the Leaflet library. Alternatively, you can use `cedarmaps.standalone.js`, which does not include Leaflet (you will have to provide it yourself).
...@@ -20,6 +20,15 @@ L.cedarmaps.accessToken = 'your_hash'; ...@@ -20,6 +20,15 @@ L.cedarmaps.accessToken = 'your_hash';
``` ```
Check out demos at `demos/` folder for better grasping the idea. Check out demos at `demos/` folder for better grasping the idea.
**Note:** If you've purchased our dedicated plan you should set your baseURL in the following manner in `<head>` tag *before* including cedarmaps' files:
```html
<script>
apiBaseUrlHttp = 'http://...';
apiBaseUrlHttps = 'https://...';
</script>
```
You can also see the [API documentation](http://mapbox.com/mapbox.js/api/) and [Mapbox's Examples](http://mapbox.com/mapbox.js/example/v1.0.0/) for further help. You can also see the [API documentation](http://mapbox.com/mapbox.js/api/) and [Mapbox's Examples](http://mapbox.com/mapbox.js/example/v1.0.0/) for further help.
## API ## API
......
...@@ -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.0.1",
"homepage": "http://www.cedarmaps.com/", "homepage": "http://www.cedarmaps.com/",
"repository": { "repository": {
"type": "git", "type": "git",
......
'use strict'; 'use strict';
module.exports = { module.exports = {
HTTP_URL: 'http://api.cedarmaps.com/v1', HTTP_URL: window.apiBaseUrlHttp || 'http://api.cedarmaps.com/v1',
HTTPS_URL: 'https://api.cedarmaps.com/v1', HTTPS_URL: window.apiBaseUrlHttps || 'https://api.cedarmaps.com/v1',
FORCE_HTTPS: false, FORCE_HTTPS: false,
REQUIRE_ACCESS_TOKEN: true REQUIRE_ACCESS_TOKEN: true
}; };
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