Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery UI Map Search Not Working
    primarykey
    data
    text
    <p>I was trying to use JQuery UI Map on my project. All the example codes available there seem to work properly even when i use the sample code on my project. However i didn't find example for searching a location by it address. My intention is to find longitude and latitude for a given address text.</p> <p>Then, i found <a href="http://code.google.com/p/jquery-ui-map/wiki/jquery_ui_map_v_3_sample_code" rel="nofollow">this tutorial</a>, on Search section, i used the sample code provided there. But i faced error saying</p> <blockquote> <p>Uncaught TypeError: Cannot call method 'apply' of undefined.</p> </blockquote> <p>What does probably cause this error or it looks like there are some bugs in the library? I've made sure i've included these libs, because i've succeed when trying other examples.</p> <pre><code> &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="{{ asset('&lt;PATH&gt;/jquery-ui-map/ui/jquery.ui.map.js') }}"&gt;&lt;/script&gt; </code></pre> <p>This is the code snippet i was using from the tutorial</p> <pre><code> $('#map_canvas').gmap().bind('init', function() { $('#map_canvas').gmap('search', { 'address': 'Stockholm' }, function(results, status) { if ( status === 'OK' ) { $('#map_canvas').gmap('get', 'map').panTo(results[0].geometry.location); } }); }}); $('#map_canvas').gmap({'callback':function() { var self = this; self.search({ 'address': 'Stockholm' }, function(results, status) { if ( status === 'OK' ) { self.get('map').panTo(results[0].geometry.location); } }); }}); $('#map_canvas').gmap('search', { 'address': 'Stockholm' }, function(results, status) { if ( status === 'OK' ) { $('#map_canvas').gmap('get', 'map').panTo(results[0].geometry.location); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload