ade234uk Posted August 16, 2016 Share Posted August 16, 2016 (edited) I'm building a free events site, however I need some direction on the following as I am completely confused on how the process should work. I can output all the results from MySQL via php, what I would like to do is use the information from the post_code field in my database to create a google map with a marker showing the location. My preferred way would be to insert the post_code in to the url which the user clicks and takes them to google maps showing the marker on the map. From there the user can manipulate the map, zoom, get directions and all the other functions google maps offers. I could just do it like this <code><a href="http://maps.google.com/maps?q=<?php echo $row['post_code']; ?>">Click here for map</a></code> but I feel this is the wrong way of going about it. I already have a google API. Hope this makes some sort of sense. Edited August 16, 2016 by ade234uk Quote Link to comment Share on other sites More sharing options...
Barand Posted August 16, 2016 Share Posted August 16, 2016 see https://developers.google.com/maps/documentation/javascript/examples/marker-simple Quote Link to comment Share on other sites More sharing options...
Solution ade234uk Posted August 16, 2016 Author Solution Share Posted August 16, 2016 (edited) see https://developers.google.com/maps/documentation/javascript/examples/marker-simple I went through as many help pages as I could and completely missed this one lol. Thanks for the link, it is a good starting point. Edited August 16, 2016 by ade234uk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.