';
google.maps.event.addListener(propertyMarker, 'spider_click', function () {
if (infoWindow != undefined) {
infoWindow.close();
}
infoWindow = new google.maps.InfoWindow({ content: content });
infoWindow.open(mapFullWidth, propertyMarker);
$('.neighborhood-widget__marker').parent().parent().parent().prev().find('> div').eq(7).css('border-top', '3px solid #4a759f;');
});
var center;
function calculateCenter() {
center = mapFullWidth.getCenter();
}
google.maps.event.addDomListener(mapFullWidth, 'idle', function () {
calculateCenter();
});
google.maps.event.addListener(mapFullWidth, 'spider_click', function (event) {
infoWindow.close();
clicked = false;
if ($(window).width() ' +
'
' +
'
' + v.Address + '
' + v.City + ', ' + v.State + ' ' + v.Zip + '
' +
'
Get Directions
';
google.maps.event.addListener(customMarker, 'spider_click', function () {
if (infoWindow != undefined) {
infoWindow.close();
}
infoWindow = new google.maps.InfoWindow({ content: customPin });
infoWindow.open(mapFullWidth, customMarker);
$('.neighborhood-widget__marker').parent().parent().parent().prev().find('> div').eq(7).css('border-top', '3px solid #4a759f;');
});
}
});
}
function circleDrawHandler(radius) {
while (overlays[0]) {
overlays.pop().setMap(null);
}
var circle = new google.maps.Circle({
center: origin,
clickable: true,
draggable: false,
editable: false,
fillColor: '#004de8',
fillOpacity: 0.27,
map: mapFullWidth,
radius: radius,
strokeColor: '#004de8',
strokeOpacity: 0.62,
strokeWeight: 1
});
overlays.push(circle);
google.maps.event.addListener(circle, 'rightclick', polygonDestructionHandler);
};
polygonDestructionHandler = function () {
return this.setMap(null);
};
function boundsUpdated(event) {
var z = mapFullWidth.getZoom();
var bounds = mapFullWidth.getBounds();
var center = mapFullWidth.getCenter();
var ne = bounds.getNorthEast();
var sw = bounds.getSouthWest();
var nw = new google.maps.LatLng(ne.lat(), sw.lng());
var se = new google.maps.LatLng(sw.lat(), ne.lng());
if (bounds && center) {
var b = google.maps.geometry.spherical.computeDistanceBetween(nw, ne) / 2;
var h = google.maps.geometry.spherical.computeDistanceBetween(center, ne);
var radius = ((h - b) / 400);
}
}
function createMarker(placeResult, icon) {
var iconList = ["entertainment", "schools", "food", "nightlife", "recreation", "professional", "residences", "shopping", "travel"];
if (iconList.indexOf(icon) 0) {
photoUrl = details.photos[0].getUrl({ 'maxWidth': 300, 'maxHeight': 300 });
}
}
var addr = details.address_components;
var content = '
';
infoWindow = new google.maps.InfoWindow({ content: content });
infoWindow.open(mapFullWidth, marker);
});
}
function getAddressComponent(components, type, length){
var str;
$(components).each(function(){
if (this.types[0] == type){
str = (length == 'short') ? this.short_name : this.long_name;
return;
}
});
return str;
}
function findByKeyword(keyword, icon) {
currentKeyword = keyword;
currentIcon = icon;
var excludedKeywords = $.parseJSON('[]');
var excludedBusinesses = $.parseJSON('[]');
var filteredWords = "sex,strip club,adult entertainment,strip bar,XXX,porn,escort,adult video,gentlemen's club,adult bookstore,adult club";
if (excludedKeywords.length > 0) {
filteredWords += ',' + excludedKeywords.join(',');
}
if (excludedBusinesses.length > 0) {
filteredWords += ',' + excludedBusinesses.join(',');
}
var fwordsArray = filteredWords.split(",");
var request = {
keyword: keyword,
location: origin,
radius: currentRadius
};
$('.neighborhood-widget__loader').show();
mapService.nearbySearch(request, function (results, status) {
deleteOverlays();
var customPinExists = false;
$(customMapPinsObj).each(function (i, v) {
$(v.Category).each(function (j, w) {
if (w == icon || (!icon && keyword && w == keyword.trim())) {
customPinExists = true;
var markerIconUrl = '/templateresources/global/icons/map-icons/' + (icon ? icon : 'general') + '.png';
var markerIcon = {
url: markerIconUrl,
scaledSize: new google.maps.Size(26, 26),
anchor: new google.maps.Point(13, 13)
};
var customMarkerOptions = {
position: new google.maps.LatLng(v.Latitude, v.Longitude),
map: mapFullWidth,
icon: markerIcon,
geometry: {
location: new google.maps.LatLng(v.Latitude, v.Longitude)
},
name: v.Name,
vicinity: v.Address,
addressState: v.State,
addressPostalCode: v.Zip,
website: v.Url,
city: v.City
};
var customMarker = new google.maps.Marker(customMarkerOptions);
google.maps.event.addListener(customMarker, 'spider_format', function (status) {
if (status == OverlappingMarkerSpiderfier.markerStatus.SPIDERFIABLE) {
customMarker.setIcon({
url: '/CMSScripts/Custom/RPWebParts/spiderfier/general-plus.png',
scaledSize: new google.maps.Size(26, 26),
anchor: new google.maps.Point(13, 13)
});
}
else {
customMarker.setIcon({
url: markerIconUrl,
scaledSize: new google.maps.Size(26, 26),
anchor: new google.maps.Point(13, 13),
});
}
});
oms.addMarker(customMarker);
markersArray.push(customMarker);
var customPin = '
';
google.maps.event.addListener(customMarker, 'spider_click', function () {
if (infoWindow != undefined) {
infoWindow.close();
}
infoWindow = new google.maps.InfoWindow({ content: customPin });
infoWindow.open(mapFullWidth, customMarker);
$('.neighborhood-widget__marker').parent().parent().parent().prev().find('> div').eq(7).css('border-top', '3px solid #4a759f;');
});
}
});
});
if (status == google.maps.places.PlacesServiceStatus.OK) {
$(results).each(function () {
var temp = 0;
for (var i = 0; i 0) {
var bounds = new google.maps.LatLngBounds();
for (var i = 0; i
' + val + '
';
$('.neighborhood-widget__categories ul').append(keywordItem);
});
$('.neighborhood-widget__categories li').click(function () {
$(this).addClass('active');
$(this).siblings().removeClass('active');
findByKeyword($(this).text(), $(this).data('icon'));
$('.neighborhood-widget__search input').val($(this).text());
if ($(window).width() 0) ? $('.neighborhood-widget__walkscore').height() + 30 : 0;
$('.neighborhood-widget__categories').css('max-height', $('.neighborhood-widget__categories').parent().parent().height() - (90 + navPosition.top) - walkScoreHeight);
function hideCategories() {
$('.neighborhood-widget__categories').css({ 'margin-top': -$('.neighborhood-widget__categories').innerHeight(), 'opacity': 0 })
$('.neighborhood-widget__nav').removeClass('expanded');
categoriesHidden = true;
}
function showCategories() {
$('.neighborhood-widget__categories').css({ 'margin-top': 0, 'opacity': 1 });
$('.neighborhood-widget__nav').addClass('expanded');
categoriesHidden = false;
}
$(window).resize(function () {
var navPosition = $('.neighborhood-widget__nav').position();
var walkScoreHeight = ($('.walk-score-container').length > 0) ? $('.neighborhood-widget__walkscore').height() + 30 : 0;
$('.neighborhood-widget__categories').css('max-height', $('.neighborhood-widget__categories').parent().parent().height() - (90 + navPosition.top) - walkScoreHeight);
});
});
}
No Results Found