Open ineshbose opened 4 years ago
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
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=
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"]
intimetable.py
(that isif "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/).