user3236406
user3236406

Reputation: 609

Jquery Geocomplete options not working

I am trying to use the Geocomplete library (http://ubilabs.github.io/geocomplete/) to populate a map, but I am not getting the right options. When I use the code below, the function plots the map, but only the hybrid "mapOption" works. The zoom is set to the default - not whatever I change it to. Any ideas?

$(document).ready(function(){
     $("#street-address-id").geocomplete({   
        map: "#map_canvas",
        mapOptions: {
          zoom: 18,
          mapTypeId: "hybrid"

        }
    })

});

Upvotes: 0

Views: 1584

Answers (1)

Edwin Thomas
Edwin Thomas

Reputation: 1186

Change In jquery.geocomplete.js

 var defaults = {  
    bounds: true,  
    country: null,  
    map: false,  
    details: false,  
    detailsAttribute: "name",  
    location: false,  

    mapOptions: {  
      zoom: 14,//Change Here  
      scrollwheel: false,  
      mapTypeId: "roadmap"  
    },  

    markerOptions: {  
      draggable: false  
    },  

    maxZoom: 16,//Change Here  
    types: ['geocode'],  
    blur: false  
  }; 

Upvotes: 2

Related Questions