I'm write this code for my page:
<script>
function initialize() {
var mapProp = {
center: new google.maps.LatLng(51.508742, -0.120850),
zoom: 7,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
}
function loadScript() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?key=&sensor=false&callback=initialize";
document.body.appendChild(script);
}
window.onload = loadScript;
</script>
i want when asp button click the initialize function,and set the new value for this line:
center: new google.maps.LatLng(51.508742--->Load from asp:Text1, -0.120850--->Load from asp:Text2)
How can i do this?