Commit be76229f authored by Deployer's avatar Deployer

Fixed static map marker bug

parent fdbee134
......@@ -20,8 +20,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.4.0/cedarmaps.js'></script>
<link href='http://api.cedarmaps.com/cedarmaps.js/v1.4.0/cedarmaps.css' rel='stylesheet' />
<script src='http://api.cedarmaps.com/cedarmaps.js/v1.4.1/cedarmaps.js'></script>
<link href='http://api.cedarmaps.com/cedarmaps.js/v1.4.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).
......
......@@ -2,7 +2,7 @@
"author": "CedarStudios",
"name": "cedarmaps.js",
"description": "CedarMaps javascript API built on top of mapbox.js",
"version": "1.4.0",
"version": "1.4.1",
"homepage": "http://www.cedarmaps.com/",
"repository": {
"type": "git",
......
......@@ -32,9 +32,17 @@ module.exports = function (container, options) {
}
if (!options.position) {
options.position = 'auto';
} else {
if(typeof options.position !== 'object') {
throw 'Unknown value for position.'
}
}
if (!options.dimensions) {
throw 'Cedarmaps: No dimensions specified.';
} else {
if(typeof options.dimensions !== 'object') {
throw 'Unknown value for position.'
}
}
if (!container) {
throw 'Cedarmaps: No container selector specified.';
......@@ -49,7 +57,7 @@ module.exports = function (container, options) {
if (options.qs && options.qs.length > 0) {
var qs = 'markers=';
for (var i = 0, l = options.qs.length; i < l; i++) {
if (options.qs[i].marker_url) {
if (!options.qs[i].marker_url) {
options.qs[i].marker_url = 'marker-default';
}
qs += options.qs[i].marker_url + '|' + options.qs[i].lat + ',' + options.qs[i].lng;
......
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