Giter VIP home page Giter VIP logo

Comments (1)

clhenrick avatar clhenrick commented on July 3, 2024

Noting that this seems to be due to a bug in the NYC Geosearch API. For example, the response to this query still returns the address in Brooklyn as the first result (see the features array in the response object):

https://geosearch.planninglabs.nyc/v1/search?text=52%20HENRY%20STREET,%20Manhattan

Currently the AIRS frontend app grabs the first result from the search/ API endpoint response which is why the incorrect address is displayed.

Until the NYC Planning Labs team fixes this problem in the API a work around could be storing the lat, lon, and BBL for the selected address from the autosuggest results list (this is what is returned by the Geosearch API autocomplete endpoint once a user starts typing in the search box) when a user chooses an address from that list. This would require some additional branching logic that handles someone typing an address but not choosing an autosuggest result then hitting submit vs. someone selecting an autosuggest result and then hitting submit. The former scenario would still require the address text being passed to the Geosearch search/ endpoint while the latter would not. The existing implementation passes the address text to the search endpoint no matter what, because well I was lazy.

from am-i-rent-stabilized.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.