Google map api 3 ajax call Google map api 3 ajax call codeigniter codeigniter

Google map api 3 ajax call


In order to initialize the map you need to add center and mapTypeId to the mapOptions, (all of which are required, as mentioned in the documentation). For example:

    var mapOptions = {        center:  new google.maps.LatLng(40.178873, -96.767578),        mapTypeId: google.maps.MapTypeId.ROADMAP,        zoom: 6}