Service Request Details  · NYC311 (2024)

The Police Department responded to the complaint and determined that police action was not necessary.

-

-

Closed

Illegal Parking

Blocked Sidewalk

301 GOLD STREET, BROOKLYN, NY, 11201

N/A

'); var _inputbox = $(''); if(_options.placeholder != undefined) _inputbox.attr("placeholder", _options.placeholder); else updatePlaceholder(); var _suggestionsdiv = $('

'); var _clearbutton = $(''); _inputbox.keypress(function (e) { if (e.charCode == 13) { if(_topitem != null) { _topitem.click(); _topitem = null; } return false; } }); _inputgroup.append(_inputbox); _inputgroup.append(_clearbutton); _parentelement.append(_inputgroup); _parentelement.append(_suggestionsdiv); buildAddressAutoComplete.call(_self); _clearbutton.hide(); _clearbutton.click(function () { _inputbox.val(""); setInputDisabled(false); _self.onAddressSelected(null); }); function setInputDisabled(disabled) { if(disabled) { _clearbutton.show(); _inputbox.attr("disabled", "disabled"); } else { _clearbutton.hide(); _inputbox.removeAttr("disabled"); } } function buildAddressAutoComplete() { $.widget( "a.geoclientcomplete", $.ui.autocomplete, { _create: function() { this._super(); this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" ); }, _renderMenu: function( ul, items ) { var that = this; var currentCategory = ""; _topitem = null; $.each( items, function( index, item ) { var li; if ( item.category != currentCategory ) { ul.append( "

  • " + item.category + "
  • " ); currentCategory = item.category; } li = that._renderItemData( ul, item ); if(_topitem == null) _topitem = li; if ( item.category ) { li.attr( "aria-label", item.category + " : " + item.label ); } }); } }); _inputbox.geoclientcomplete({ delay: 0, appendTo: "#suggestion-list-" + _num, source: getAddressData.bind(_self), minLength: 3, select: function(event, ui) { setInputDisabled(true); _self.onAddressSelected(ui.item.data); } }); } function getAddressData(request, response) { function onSuccessGISCall(data) { debugger _topitem = null; if(data.status == "OK"){ var jsonObj = data.results; $.each(jsonObj, function(index, obj){ obj["id"] = index; if(obj.request.indexOf("address") == 0 && obj.response.houseNumber){ obj["category"] = AddressCategory.ADDRESS; } if(obj.request.indexOf("blockface") == 0){ obj["category"] = AddressCategory.BLOCKFACE; } if(obj.request.indexOf("intersection") == 0){ obj["category"] = AddressCategory.INTERSECTION; } if(obj.request.indexOf("place") == 0){ obj["category"] = AddressCategory.PLACE; } }) var unmatch = 0; response($.map(jsonObj, function (value, key) { if(_categories != null && value.category && _categories.indexOf(value.category) == -1){ unmatch++; if(unmatch == jsonObj.length){ alert("You must enter an address in one of the formats listed."); _self.clearText(); } return; } var addressdata = getAddressDataFromArcGISJSON(value); if(addressdata != undefined || addressdata != null) { unmatch = 0; return { category: AddressCategoryToString(addressdata.getCategory()), label: addressdata.getFullAddress(), key: value.id, data: addressdata }; } }) ); } } getGISAPIResults (_inputbox.val(), onSuccessGISCall); /* $.ajax({ url: gis_baseurl + _inputbox.val(), headers:{ "ocp-apim-subscription-key": "f6130358c84c48c096d24cb12c1f1387" }, success: function( data ) { _topitem = null; if(data.status == "OK"){ var jsonObj = data.results; $.each(jsonObj, function(index, obj){ obj["id"] = index; if(obj.request.indexOf("address") != -1){ obj["category"] = AddressCategory.ADDRESS; } if(obj.request.indexOf("blockface") != -1){ obj["category"] = AddressCategory.BLOCKFACE; } if(obj.request.indexOf("intersection") != -1){ obj["category"] = AddressCategory.INTERSECTION; } if(obj.request.indexOf("place") != -1){ obj["category"] = AddressCategory.PLACE; } }) var unmatch = 0; response($.map(jsonObj, function (value, key) { if(_categories != null && _categories.indexOf(value.category) == -1){ unmatch++; if(unmatch == jsonObj.length){ alert("You must enter an address in one of the formats listed."); _self.clearText(); } return; } var addressdata = getAddressDataFromArcGISJSON(value); if(addressdata != undefined || addressdata != null) { unmatch = 0; return { category: AddressCategoryToString(addressdata.getCategory()), label: addressdata.getFullAddress(), key: value.id, data: addressdata }; } }) ); } } });*/ } _self.onAddressSelected = function (addressdata) { } _self.setSearchText = function (text) { setInputDisabled(true); _inputbox.val(text); } _self.clearText = function () { setInputDisabled(false); _inputbox.val(""); } _self.setCategories = function (categories) { _categories = categories || []; updatePlaceholder(); } function updatePlaceholder() { if(_options.placeholder != undefined) { return; } var placeholder = "Search for an NYC "; var count = 0; _categories.forEach(function (category) { if(count == 0) placeholder += AddressCategoryToString(category); else if(count == _categories.length - 1) placeholder += " or " + AddressCategoryToString(category); else placeholder += ", " + AddressCategoryToString(category); count++; }); _inputbox.attr("placeholder", placeholder); } }//# sourceURL=AddressSearchBoxScripts.js

    ').append(_distanceselect) element.append(_addressinputcontainer); element.append(distanceinputgroup); return element; } function addSearchRangeToMap(center, radius) { if(radius > 3000) radius = 3000; if(_searchRangeShape != null) _self.getBingMap().entities.remove(_searchRangeShape); Microsoft.Maps.loadModule('Microsoft.Maps.SpatialMath', function () { var locations = Microsoft.Maps.SpatialMath.getRegularPolygon(center, radius, 90, Microsoft.Maps.SpatialMath.DistanceUnits.Kilometers); _searchRangeShape = new Microsoft.Maps.Polygon(locations, null); _self.getBingMap().entities.push(_searchRangeShape); }); } _self.getFetchParameters = function () { var params = {}; if(_searchRangeShape != null) _self.getBingMap().entities.remove(_searchRangeShape); /*************** OLD INPUT START ******************/ /*************** OLD INPUT END ******************/ if(_distanceselect.val() != 0 && _distanceselect.val() != "" && _distanceselect.val() != "" && _addressData != null) { var distance = getDistanceKilometers(); var bounds = getDistanceBoundsFromKilometers(_addressData.getLatitude(), _addressData.getLongitude(), distance); params["minlatitude"] = bounds[0]; params["minlongitude"] = bounds[1]; params["maxlatitude"] = bounds[2]; params["maxlongitude"] = bounds[3]; addSearchRangeToMap(new Microsoft.Maps.Location(_addressData.getLatitude(), _addressData.getLongitude()), distance + .033); if(_self.getBingMap() != null) { if(distance > 480) { _self.getBingMap().setView({ center: new Microsoft.Maps.Location(_addressData.getLatitude(), _addressData.getLongitude()), zoom: 5 }); } else if(distance < 0.1990344) { _self.getBingMap().setView({ center: new Microsoft.Maps.Location(_addressData.getLatitude(), _addressData.getLongitude()), zoom: 16 }); } else { _self.getBingMap().setView({ bounds: Microsoft.Maps.LocationRect.fromCorners(new Microsoft.Maps.Location(bounds[2], bounds[1]), new Microsoft.Maps.Location(bounds[0], bounds[3])) }); } } } return params; } function getDistanceKilometers() { /*************** OLD INPUT START ******************/ /*************** OLD INPUT END ******************/ var distance = parseFloat(_distanceselect.val()); var units = _distanceselect.find("option:selected").attr('unit'); if(isNaN(distance)) distance = 0; if(units == "miles") { distance = distance * 1.609344; } else if(units == "feet") { distance = distance * 0.0003048; } if(distance <= 0) distance = parseFloat(0.0003048); return distance; } _self.validatePin = function (pin) { if(_addressData == null) return true; var distance = getDistanceKilometers(); if(parseFloat(getDistanceBetweenGeolocationsInKilometers(_addressData.getLatitude(), _addressData.getLongitude(), pin.getLatitude(), pin.getLongitude())) > parseFloat(distance)) return false; return true; }}function degToRad(degrees){ return (Math.PI * degrees)/180;}function radToDeg(radians){ return (radians * 180)/Math.PI;}var earthRadius = 6371.01; // Earth's radius in kilometresfunction getDistanceBoundsFromKilometers(latitude, longitude, distance){ var MIN_LAT = degToRad(-90); var MAX_LAT = degToRad(90); var MIN_LON = degToRad(-180); var MAX_LON = degToRad(180); //Radius of the Earth var raddistance = distance / earthRadius; //coordinates in radians var radlatitude = degToRad(latitude); var radlongitude = degToRad(longitude); var minlatitude = radlatitude - raddistance; var maxlatitude = radlatitude + raddistance; var minlongitude, maxlongitude; if(minlatitude > MIN_LAT && maxlatitude < MAX_LAT) { var deltalongitude = Math.asin(Math.sin(raddistance) / Math.cos(radlatitude)); minlongitude = radlongitude - deltalongitude; if(minlongitude < MIN_LON) minlongitude += 2 * Math.PI; maxlongitude = radlongitude + deltalongitude; if(maxlongitude > MAX_LON) maxlongitude -= 2 * Math.PI; } else { minlatitude = Math.max(minlatitude, MIN_LAT); maxlatitude = Math.min(maxlatitude, MAX_LAT); minlongitude = MIN_LON; maxlongitude = MAX_LON; } return [radToDeg(minlatitude), radToDeg(minlongitude), radToDeg(maxlatitude), radToDeg(maxlongitude)];}function getDistanceBetweenGeolocationsInKilometers(lat1, lon1, lat2, lon2){ var radlat1 = degToRad(lat1); var radlat2 = degToRad(lat2); var raddistancelat = degToRad(lat2-lat1); var raddistancelon = degToRad(lon2-lon1); //Haversine Formula var a = Math.sin(raddistancelat/2) * Math.sin(raddistancelat/2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.sin(raddistancelon/2) * Math.sin(raddistancelon/2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); return earthRadius * c;}

    Service Request Details
		 · NYC311 (2024)

    References

    Top Articles
    Latest Posts
    Article information

    Author: Nathanial Hackett

    Last Updated:

    Views: 5722

    Rating: 4.1 / 5 (72 voted)

    Reviews: 95% of readers found this page helpful

    Author information

    Name: Nathanial Hackett

    Birthday: 1997-10-09

    Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

    Phone: +9752624861224

    Job: Forward Technology Assistant

    Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

    Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.