Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Locations for Classes #1

Open
ineshbose opened this issue Jul 5, 2020 · 2 comments
Open

Provide Locations for Classes #1

ineshbose opened this issue Jul 5, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ineshbose
Copy link
Owner

The bot should be able to provide a map, directions or link when a user asks for a specific location on campus. For example,

"Where is my next Psychology lecture?"
"Where is the Boyd Orr building?"

The locations can be found using event["location"] in timetable.py (that is if "location" in event else return "No Location Found"). A raw link would be a little shabby, so an embedded map in the chat-bubble is preferred but this is not supported by all platforms.

Google Maps is the preferred service for locations. Some universities also use a custom map (by Google Maps) for their campus (eg https://www.gla.ac.uk/explore/maps/).

@ineshbose ineshbose added enhancement New feature or request good first issue Good for newcomers labels Jul 5, 2020
@ineshbose
Copy link
Owner Author

Possible Solution: JSON
Map data could be populated as a JSON with keys buildingName, description and link. When the intent is triggered by the parser, fuzz can be used to iterate and match the name and then return the info.

Problem: Populating the data

  1. Manually filling out campus data would be disaster.
  2. Google Maps JSON can be fetched through deep inspection of custom maps, but it doesn't involve suitable data (eg link, description).

@ineshbose ineshbose added the help wanted Extra attention is needed label Aug 22, 2020
@ineshbose
Copy link
Owner Author

Big Obstacle: Link for Location

Even if we have the name for a place, it's difficult to provide an accurate link for the place. For example, "Main Building" can be anything. Appending University name could get a little weird since the buildingName can be anything. So, a good idea would be to use coordinates.

But the option would be
https://maps.google.com/?q=main+building+university+of+glasgow
However, if we're just sending them a search link, what's the use? It may show the desired location, or just multiple results. Not desirable.

Another would be
https://www.google.com/maps/search/?api=1&query=%2C
But this needs coordinates of the place. Now this can be fetched using OpenStreetMaps. A good link to get JSON is https://nominatim.openstreetmap.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant