Whatsnearby.js

Whatsnearby.js is a jQuery plugin for quickly find the nearest places.

A Simple of whatsnearby.js example as shown below −

<!DOCTYPE html><html><head><meta charset ="utf-8"/><link rel ="stylesheet" 
     href ="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"&gt;&lt;script src ="example/js/es5-shim.min.js" 
     type ="text/javascript"&gt;&lt;/script&gt;&lt;script src ="example/js/es5-sham.min.js" type ="text/javascript"&gt;&lt;/script&gt;&lt;script 
     src ="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"
     type ="text/javascript"&gt;&lt;/script&gt;&lt;script 
     src ="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;libraries=places"&gt;&lt;/script&gt;&lt;script src ="source/WhatsNearby.js" 
     type ="text/javascript"&gt;&lt;/script&gt;&lt;script type ="text/javascript"&gt;$(document).ready(function(){$("#wn2").whatsnearby({ 
           zoom:15,
           width:"100%",
           address:"jublihills",
           placesRadius:500,
           placesTypes:['restaurant','cafe','gym']});});&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="container"&gt;&lt;div class="well"&gt;&lt;div id ="wn2"&gt;&lt;div class="infowindow-markup"&gt;&lt;strong&gt;{{name}}&lt;/strong&gt;&lt;br/&gt;{{vicinity}}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *