function addMarker(obj) {
	// Temp marker that is added to markerArray. It's "info" field contains all the db info of said marker
	obj.marker = new google.maps.Marker({
		position: {"lat": obj.fields.lat, "lng": obj.fields.lng},
		map: map,
		icon: "img/house-" + obj.fields.house_icon + ".png",
	});

	obj.marker.info = obj.fields;
	if (!obj.id) {
		obj.marker.info.id = obj.pk;
	}
	else {
		obj.marker.info.id = obj.pk;
	}

	// Marker listener
	obj.marker.addListener('click', function() {
		markerClick(obj.marker)
	});

	markerArray.push(obj.marker)
}
// Only adds marker to the map
Only adds marker to the map
Only adds marker to the map
function addMarker(obj) {
	obj.marker = new google.maps.Marker({
		position: {"lat": obj.fields.lat, "lng": obj.fields.lng},
		map: map,
		icon: "img/house-" + obj.fields.house_icon + ".png",
	});
	obj.marker.info = obj.fields;
	if (!obj.id) {
		obj.marker.info.id = obj.pk;
	}
	else {
		obj.marker.info.id = obj.pk;
	}
	obj.marker.addListener('click', function() {
		markerClick(obj.marker)
	});
	markerArray.push(obj.marker)
}
function addMarker ( obj ) { obj . marker = new google . maps . Marker ( { position : { "lat" : obj . fields . lat , "lng" : obj . fields . lng } , map : map , icon : "img/house-" + obj . fields . house_icon + ".png" , } ) ; obj . marker . info = obj . fields ; if ( ! obj . id ) { obj . marker . info . id = obj . pk ; } else { obj . marker . info . id = obj . pk ; } obj . marker . addListener ( 'click' , function ( ) { markerClick ( obj . marker ) } ) ; markerArray . push ( obj . marker ) }
Only adds marker to the map
Only adds marker to the map
// Temp marker that is added to markerArray. It's "info" field contains all the db info of said marker // Marker listener