update map marker image style
This commit is contained in:
parent
63b61f520b
commit
b6a8ed28b4
2 changed files with 10 additions and 11 deletions
|
@ -193,11 +193,7 @@ Ox.Request = function(options) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (data.status.code == 200 || data.status.code == 404 || data.status.code == 409) {
|
||||||
data.status.code == 200
|
|
||||||
|| data.status.code == 404
|
|
||||||
|| data.status.code == 409
|
|
||||||
) {
|
|
||||||
// we have to include not found and conflict
|
// we have to include not found and conflict
|
||||||
// so that handlers can handle these cases
|
// so that handlers can handle these cases
|
||||||
cache[req] = {
|
cache[req] = {
|
||||||
|
|
|
@ -28,11 +28,14 @@ Ox.MapMarkerImage = (function() {
|
||||||
].join(';');
|
].join(';');
|
||||||
|
|
||||||
if (!cache[index]) {
|
if (!cache[index]) {
|
||||||
var color = options.type == 'place' ?
|
var color = options.type == 'rectangle' ? [0, 0, 0, 0]
|
||||||
Ox.merge(Ox.clone(options.color), [0.5]) :
|
: Ox.merge(Ox.clone(options.color), [options.type == 'place' ? 0.75 : 0.25]),
|
||||||
options.type == 'result' ? [128, 128, 128, 0.5] : [0, 0, 0, 0],
|
border = Ox.merge(
|
||||||
border = options.mode == 'normal' ? [0, 0, 0] :
|
options.mode == 'normal' ? [0, 0, 0]
|
||||||
options.mode == 'selected' ? [255, 255, 255] : [128, 128, 255],
|
: options.mode == 'selected' ? [255, 255, 255]
|
||||||
|
: [128, 128, 255],
|
||||||
|
[options.type == 'result' ? 0.5 : 1]
|
||||||
|
),
|
||||||
c = Ox.canvas(options.size, options.size),
|
c = Ox.canvas(options.size, options.size),
|
||||||
image,
|
image,
|
||||||
r = options.size / 2;
|
r = options.size / 2;
|
||||||
|
@ -41,7 +44,7 @@ Ox.MapMarkerImage = (function() {
|
||||||
c.context.fill();
|
c.context.fill();
|
||||||
c.context.beginPath();
|
c.context.beginPath();
|
||||||
c.context.lineWidth = 2;
|
c.context.lineWidth = 2;
|
||||||
c.context.strokeStyle = 'rgb(' + border.join(', ') + ')';
|
c.context.strokeStyle = 'rgba(' + border.join(', ') + ')';
|
||||||
c.context.arc(r, r, r - 1, 0, 360);
|
c.context.arc(r, r, r - 1, 0, 360);
|
||||||
c.context.stroke();
|
c.context.stroke();
|
||||||
cache[index] = new google.maps.MarkerImage(
|
cache[index] = new google.maps.MarkerImage(
|
||||||
|
|
Loading…
Reference in a new issue