Google Map code help to position map location based on marker values

Discussion created by ajayz on Jun 25, 2014
Latest reply on Jun 26, 2014 by DanielShanahan

Update: Thanks guys for the quick replies but i'm not a programmer and hence still not sure of your solutions or where to fix this code. I tracked down this code from the internet and manage to alter it to suit my requirements. The issue is centring the map. The other issue I have was it works find in this test environment, but when I set up the same scripts, screens and code in my actual database (Filemaker 13) the scripts generates the markers but he map was completely BLANK. (not sure what going on)


I've attached a copy of the database which gives the user the option to select a number of search filters on billboard sites, then peform the map and then click to generate the map. I'm happy with any other suitions you can come up with. I just need to able to create a cluster map with the search results.


Email; ajaynz@outlook.com





I need some help fixing up some code which basically takes a number of GPS coordinates and displays them on a google map (ie cluster map of coordinates)


Currently I'm using this code which is just position the map over SYDNEY GPS at a zoom level of 12


Google_Maps::HTML_to_invoke_Google_Maps & "&sensor=false'>


<script type='text/javascript'>

function initialize() {

var mapOptions = {

center: new google.maps.LatLng(-33.867280, 151.209297),


mapTypeId: google.maps.MapTypeId.roadmap


var map = new google.maps.Map(document.getElementById('map_canvas'),




I would like the code to automatically centre the map based on the values being displayed.. I had read on https://developers.google.com/maps/documentation/staticmaps/ that this was possible.


"The location parameters define the marker's location on the map. If the location is off the map, that marker will not appear in the constructed image provided that center and zoom parameters are supplied. However, if these parameters are not supplied, the Static Map server will automatically construct an image which contains the supplied markers."


I hope that's enough informaton.