1
0
Fork 0
forked from 0x2620/oxjs

Ox.Map elements need new too

This commit is contained in:
j 2011-06-20 14:53:00 +02:00
commit 523764c632
4 changed files with 11 additions and 11 deletions

View file

@ -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);