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 @@
'copy:apiDocument'
]);
grunt.registerTask('default', function() {
grunt.log.writeln('No task specified. Did nothing. run "grunt build" for example.');
});
grunt.registerTask('default', 'build');
};
......@@ -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:
```html
<script src='http://api.cedarmaps.com/cedarmaps.js/v1.0.0/cedarmaps.js'></script>
<link href='http://api.cedarmaps.com/cedarmaps.js/v1.0.0/cedarmaps.css' rel='stylesheet' />
<script src='http://api.cedarmaps.com/cedarmaps.js/v1.0.1/cedarmaps.js'></script>
<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).
......@@ -20,6 +20,15 @@ L.cedarmaps.accessToken = 'your_hash';
```
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.
## API
......
......@@ -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.0.1",
"homepage": "http://www.cedarmaps.com/",
"repository": {
"type": "git",
......
'use strict';
module.exports = {
HTTP_URL: 'http://api.cedarmaps.com/v1',
HTTPS_URL: 'https://api.cedarmaps.com/v1',
HTTP_URL: window.apiBaseUrlHttp || 'http://api.cedarmaps.com/v1',
HTTPS_URL: window.apiBaseUrlHttps || 'https://api.cedarmaps.com/v1',
FORCE_HTTPS: false,
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