javascript - Google Map not centring on marker -
the following code finding memberid on page , rendering map , placing marker not centring map on marker. map ending centred in presumably default location (somalia). what doing wrong? function initialize() { var memberid = $('#member-section').data("member-id"); if (typeof memberid === "undefined") { memberid = 0; } var latitude = $('#member-section').data("latitude"); if (typeof latitude === "undefined") { latitude = 51.21921589999999; } var longitude = $('#member-section').data("longitude"); if (typeof longitude === "undefined") { longitude = 4.402881799999932; } var mapcentrelatlng; mapcentrelatlng = new google.maps.latlng(latitude, longitude); buildmap(memberid, mapcentrelatlng); } function buildmap(memberid, mapcentrelatlng) { google.maps.visualrefresh = true; var infowindow = null; var mapoptions = {...