Skip to content

Commit cf318a3

Browse files
committed
Merge branch 'masashi_dev2' into test
2 parents 81b1d63 + 3d21bd5 commit cf318a3

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

www/googlemaps-cdv-plugin.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ App.prototype.addPolyline = function(polylineOptions, callback) {
953953
polylineOptions.visible = polylineOptions.visible === undefined ? true : polylineOptions.visible;
954954
polylineOptions.zIndex = polylineOptions.zIndex || 4;
955955
polylineOptions.geodesic = polylineOptions.geodesic || false;
956+
console.log("color = " + polylineOptions.color.join(", "));
956957

957958
cordova.exec(function(result) {
958959
var polyline = new Polyline(self, result.id, polylineOptions);
@@ -1933,20 +1934,19 @@ function isHTMLColorString(inputValue) {
19331934
return inputValue in HTML_COLORS;
19341935
}
19351936

1936-
function HTMLColor2RGBA(colorStr, defaultOpacity) {
1937+
function HTMLColor2RGBA(colorValue, defaultOpacity) {
19371938
defaultOpacity = !defaultOpacity ? 1.0 : defaultOpacity;
1938-
if (colorStr === "transparent" || !colorStr) {
1939+
if (colorValue === "transparent" || !colorValue) {
19391940
return [0, 0, 0, 0];
19401941
}
19411942
var alpha = Math.floor(255 * defaultOpacity),
19421943
matches,
1943-
compStyle,
19441944
result = {
19451945
r: 0,
19461946
g: 0,
19471947
b: 0
19481948
};
1949-
colorStr = colorStr.toLowerCase();
1949+
var colorStr = colorValue.toLowerCase();
19501950
if (colorStr in HTML_COLORS) {
19511951
colorStr = HTML_COLORS[colorStr];
19521952
}
@@ -2014,8 +2014,9 @@ function HTMLColor2RGBA(colorStr, defaultOpacity) {
20142014
rgb.push(alpha);
20152015
return rgb;
20162016
}
2017-
2018-
return [0, 0, 0, defaultOpacity];
2017+
2018+
console.log("Warning: '" + colorValue + "' is not available. The overlay is drew by black.");
2019+
return [0, 0, 0, alpha];
20192020
}
20202021

20212022
/**

0 commit comments

Comments
 (0)