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 (
|
||||
data.status.code == 200
|
||||
|| data.status.code == 404
|
||||
|| data.status.code == 409
|
||||
) {
|
||||
if (data.status.code == 200 || data.status.code == 404 || data.status.code == 409) {
|
||||
// we have to include not found and conflict
|
||||
// so that handlers can handle these cases
|
||||
cache[req] = {
|
||||
|
|
|
@ -28,11 +28,14 @@ Ox.MapMarkerImage = (function() {
|
|||
].join(';');
|
||||
|
||||
if (!cache[index]) {
|
||||
var color = options.type == 'place' ?
|
||||
Ox.merge(Ox.clone(options.color), [0.5]) :
|
||||
options.type == 'result' ? [128, 128, 128, 0.5] : [0, 0, 0, 0],
|
||||
border = options.mode == 'normal' ? [0, 0, 0] :
|
||||
options.mode == 'selected' ? [255, 255, 255] : [128, 128, 255],
|
||||
var color = options.type == 'rectangle' ? [0, 0, 0, 0]
|
||||
: Ox.merge(Ox.clone(options.color), [options.type == 'place' ? 0.75 : 0.25]),
|
||||
border = Ox.merge(
|
||||
options.mode == 'normal' ? [0, 0, 0]
|
||||
: options.mode == 'selected' ? [255, 255, 255]
|
||||
: [128, 128, 255],
|
||||
[options.type == 'result' ? 0.5 : 1]
|
||||
),
|
||||
c = Ox.canvas(options.size, options.size),
|
||||
image,
|
||||
r = options.size / 2;
|
||||
|
@ -41,7 +44,7 @@ Ox.MapMarkerImage = (function() {
|
|||
c.context.fill();
|
||||
c.context.beginPath();
|
||||
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.stroke();
|
||||
cache[index] = new google.maps.MarkerImage(
|
||||
|
|
Loading…
Reference in a new issue