When the user, uses the search to filter to only show one city or town, the map will jump to the location of the first bar in that town. My thinking behind this, is that if you are filtering/searching for a specific town you want the map to show that area and you (the user) are probably not in that town. However I may change this at a later date so that I find out if the user is within a few miles of the first bar and therefore if they are, then I won’t change force it to jump to that area and make the map think they are in that location. But if they are say more than 10 miles away then the user is probably planning a night out or week away and therefore the app will launch with their ‘mylocation’ being where they are and this won’t be any where near the town selected.
What you’ve got to remember is that the premise behind this app is that people would use it if they about to go out or are out and want to find a place to drink with some offers on or has drinks they are more interested in. Or they are planning a trip away and want to know what bars and offers are available to them when they get there, so that they have the best night out they can and don’t spend most of the night looking for places to go. There’s probably other scenarios I haven’t taken into consideration but you get the idea.
Also I mentioned in my previous blog about changing the ‘default’ icon from the wine icon to another icon. This is because bars that didn’t have any offer on at all would show up as a place with an offer for wine…very misleading. Therefore I was going to make a default empty icon for when pubs don’t have an offer on. However my thinking is that if there isn’t an offer on then they shouldn’t be shown on the map because again this app is about showing bars with offers on to try and promote them and therefore get the bar more business.
Next thing to do and what was the last thing needed for the bar profile popup, was to pull the images of each bar down from the database and show the correct one for each bar. I have saved the images for each bar in a separate table in my database, simply called ‘Images’. The data for this table is then pulled down in the same way each other table is pulled down (using php and JSON). When they have been pulled down and are sitting in a JSON Array, I then search through each one and compare their associated bar Id with the Id of each bar. When I find the correct bar I save the image to that bar’s object. This then allows me to simply pull the image from the bar’s object and populate the ImageView with the bars Image.