From 021d4293981b4cdb192f989dff00d60c5e1742d9 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 1 Jun 2011 16:27:25 +0200 Subject: [PATCH] fix map --- source/Ox.UI/js/Map/Ox.MapMarker.js | 1 - source/Ox.UI/js/Map/Ox.MapPlace.js | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/Ox.UI/js/Map/Ox.MapMarker.js b/source/Ox.UI/js/Map/Ox.MapMarker.js index af1cc489..982b8956 100644 --- a/source/Ox.UI/js/Map/Ox.MapMarker.js +++ b/source/Ox.UI/js/Map/Ox.MapMarker.js @@ -156,7 +156,6 @@ Ox.MapMarker = function(options) { // workaround to prevent marker from appearing twice // after setting draggable from true to false (google maps bug) var fix = that.marker.getDraggable() && !that.place.editing; - //Ox.print('setOptions, that.color', that.color) if (that.map.options('showTypes')) { that.color = typeColor[that.place.type]; that.size = 8; diff --git a/source/Ox.UI/js/Map/Ox.MapPlace.js b/source/Ox.UI/js/Map/Ox.MapPlace.js index 06d898be..331a9a74 100644 --- a/source/Ox.UI/js/Map/Ox.MapPlace.js +++ b/source/Ox.UI/js/Map/Ox.MapPlace.js @@ -45,7 +45,7 @@ Ox.MapPlace = function(options) { update(); - function update() { + function update(updateMarker) { that.points = { ne: new google.maps.LatLng(that.north, that.east), sw: new google.maps.LatLng(that.south, that.west) @@ -82,7 +82,7 @@ Ox.MapPlace = function(options) { map: that.map, place: that }); - } else { + } else if (updateMarker) { that.marker.update(); } } @@ -155,7 +155,7 @@ Ox.MapPlace = function(options) { Ox.forEach(options, function(value, key) { that.key = value; }); - update(); + update(true); }; /*@ @@ -195,8 +195,8 @@ Ox.MapPlace = function(options) { /*@ update update @*/ - that.update = function() { - update(); + that.update = function(updateMarker) { + update(updateMarker); that.map.triggerEvent('changeplace', that); return that; };