diff --git a/source/Ox.UI/js/Map/Ox.Map.js b/source/Ox.UI/js/Map/Ox.Map.js index 63f90c49..0e04e13d 100644 --- a/source/Ox.UI/js/Map/Ox.Map.js +++ b/source/Ox.UI/js/Map/Ox.Map.js @@ -393,7 +393,7 @@ Ox.Map = function(options, self) { northeast = new google.maps.LatLngBounds( center, bounds.getNorthEast() ).getCenter(), - place = Ox.MapPlace({ + place = new Ox.MapPlace({ alternativeNames: [], countryCode: '', editable: true, @@ -609,12 +609,12 @@ Ox.Map = function(options, self) { i == length - 1 || canContain(bounds, result.geometry.bounds || result.geometry.viewport) ) { - callback(Ox.MapPlace(parseGeodata(results[i]))); + callback(new Ox.MapPlace(parseGeodata(results[i]))); return false; } }); } else { - callback(Ox.MapPlace(parseGeodata(results[0]))); + callback(new Ox.MapPlace(parseGeodata(results[0]))); } } if ( @@ -637,7 +637,7 @@ Ox.Map = function(options, self) { address: name }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { - callback(Ox.MapPlace(parseGeodata(results[0]))); + callback(new Ox.MapPlace(parseGeodata(results[0]))); } if ( status == google.maps.GeocoderStatus.OK || @@ -719,7 +719,7 @@ Ox.Map = function(options, self) { self.places = []; if (!self.isAsync) { self.options.places.forEach(function(place, i) { - self.places[i] = Ox.MapPlace(Ox.extend({ + self.places[i] = new Ox.MapPlace(Ox.extend({ map: that }, place)); }); @@ -806,7 +806,7 @@ Ox.Map = function(options, self) { var place = getPlaceById(item.id); if (!place) { self.places.push( - Ox.MapPlace(Ox.extend({ + new Ox.MapPlace(Ox.extend({ map: that }, item)).add() ); @@ -1023,7 +1023,7 @@ Ox.Map = function(options, self) { ] } }, function(results) { - place = Ox.MapPlace(Ox.extend({ + place = new Ox.MapPlace(Ox.extend({ map: that }, results.data.items[0])).add(); self.places.push(place); diff --git a/source/Ox.UI/js/Map/Ox.MapMarker.js b/source/Ox.UI/js/Map/Ox.MapMarker.js index be86e36b..48668a32 100644 --- a/source/Ox.UI/js/Map/Ox.MapMarker.js +++ b/source/Ox.UI/js/Map/Ox.MapMarker.js @@ -63,7 +63,7 @@ Ox.MapMarker = function(options) { bounds = bounds.union(that.place.bounds); southWest = bounds.getSouthWest(); northEast = bounds.getNorthEast(); - that.map.newPlace(Ox.MapPlace({ + that.map.newPlace(new Ox.MapPlace({ // fixme: duplicated, see Ox.Map.js alternativeNames: [], countryCode: '', diff --git a/source/Ox.UI/js/Map/Ox.MapPlace.js b/source/Ox.UI/js/Map/Ox.MapPlace.js index d46f0e53..352b2891 100644 --- a/source/Ox.UI/js/Map/Ox.MapPlace.js +++ b/source/Ox.UI/js/Map/Ox.MapPlace.js @@ -72,13 +72,13 @@ Ox.MapPlace = function(options) { {lat: that.north, lng: that.east} ); if (!that.marker) { - that.marker = Ox.MapMarker({ + that.marker = new Ox.MapMarker({ color: that.markerColor, map: that.map, place: that, size: that.markerSize }); - that.rectangle = Ox.MapRectangle({ + that.rectangle = new Ox.MapRectangle({ map: that.map, place: that }); diff --git a/source/Ox.UI/js/Map/Ox.MapRectangle.js b/source/Ox.UI/js/Map/Ox.MapRectangle.js index db21baad..fccc1911 100644 --- a/source/Ox.UI/js/Map/Ox.MapRectangle.js +++ b/source/Ox.UI/js/Map/Ox.MapRectangle.js @@ -34,7 +34,7 @@ Ox.MapRectangle = function(options, self) { markers array of markers @*/ that.markers = Ox.map(that.place.points, function(point, position) { - return Ox.MapRectangleMarker({ + return new Ox.MapRectangleMarker({ map: that.map, place: that.place, position: position