How to change view of google map -


i trying set google map view according needs unable do. want show google map this

enter image description here

but showing this

enter image description here using code:

function init_map() {     var var_location = new google.maps.latlng(33.6934473,35.644258);      var var_mapoptions = {       center: var_location,       zoom: 12     };      var var_marker = new google.maps.marker({         position: var_location,         map: var_map,         title:"venice"});      var var_map = new google.maps.map(document.getelementbyid("map-container"),         var_mapoptions);      var_marker.setmap(var_map);     }    google.maps.event.adddomlistener(window, 'load', init_map); 

any appreciated.

set center of map different location marker.

function init_map() {    var var_location = new google.maps.latlng(33.6934473, 35.644258);      var var_mapoptions = {      center: new google.maps.latlng(33.691578, 35.523065),      zoom: 12    };      var var_marker = new google.maps.marker({      position: var_location,      map: var_map,      title: "venice"    });      var var_map = new google.maps.map(document.getelementbyid("map-container"),      var_mapoptions);      var_marker.setmap(var_map);  }    google.maps.event.adddomlistener(window, 'load', init_map);
html,  body,  #map-container {    height: 200px;    width: 100%;    margin: 0px;    padding: 0px  }
<script src="https://maps.googleapis.com/maps/api/js"></script>  <div id="center"></div>  <div id="map-container"></div>


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -