Reputation: 3098
Trying to perform a search by address using jquery-ui-map plug-in.
Firefox reports: TypeError: h[b] is undefined /js/ui-map/jquery.ui.map.full.min.js Line: 2
$(document).ready(function() {
$('#map_canvas').gmap('search', { 'address': 'Stockholm' }, function(isFound,results) {
if (isFound) {
$('#map_canvas').gmap('getMap').panTo(results[0].geometry.location);
}
});
});
Please help.
EDIT: Reported to developer at http://code.google.com/p/jquery-ui-map/issues/detail?id=64
Upvotes: 1
Views: 2621
Reputation: 36
instead of gmap('getMap') one should use gmap('get','map'). Besides you swapped isFound and results The correct sample is:
$(document).ready(function() {
$('#map_canvas').gmap('search', { 'address': 'Stockholm' }, function(results,isFound) {
if (isFound) {
$('#map_canvas').gmap('get','map').panTo(results[0].geometry.location);
}
});
});
Upvotes: 2