Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Mike Robin Gatchalian
150 PointsHow to integrate googlemap to show your exact location then show a specific places near to your location ex: hospitals
I am developing a web/crossplatform app using html5 and jQuery mobile,
I wanted to determine my current location then if for example i wanted to know the nearest hospitals in my current location, how do i list them like top 5 nearest and determine how far is it to my location and if possible a gps route to it
Jonathan Bai
Courses Plus Student 8,181 PointsHey Mike Loot at this Article -> http://www.paulund.co.uk/how-to-use-geolocation-api-with-google-maps This can give you more insight on how to use.
Mike Robin Gatchalian
150 PointsThanks..
Mike Robin Gatchalian
150 PointsHow do i make the map responsive in terms of width
Jonathan Bai
Courses Plus Student 8,181 PointsUse jsfiddle to make some test like using percentage on css or css media queries to specify the resolution you're using on screen or media devices.
1 Answer
Jeremy Woodbridge
25,278 PointsGoogle maps has a neat development API known as Google Maps API. The whole project is powered by AJAX, JavaScript callback sublanguage charged with the power to make requests of a server to display new info without ever leaving the page you are already on. By using the API and sending and receiving location stats you can then use the documentation to figure out how to write a function that receives your current location and then posts nearby information specified, such as hospitals.
Jacobus Hindson
14,429 PointsJacobus Hindson
14,429 PointsHi Mike,
Take a look at the Google Places API. This gives you the links to the appropriate JavaScript files you will need and the methodology for calling different place types and routes.
Piecing this one together is a bit beyond my scope but it this resource should point you in the right direction.