Sha256: 3d5658f31f50bd1ab9bbdfc47093af4cebbabe665d57b54cb20fbf62cfc75540
Contents?: true
Size: 552 Bytes
Versions: 5
Compression:
Stored size: 552 Bytes
Contents
"use strict"; // initialize map var map = new GMaps({ div: '#map', lat: -6.5637928, lng: 106.7535061 }); // when the form is submitted $("#search-form").submit(function(e) { e.preventDefault(); // initialize map geocode GMaps.geocode({ address: $('#address').val(), callback: function(results, status) { if (status == 'OK') { var latlng = results[0].geometry.location; map.setCenter(latlng.lat(), latlng.lng()); map.addMarker({ lat: latlng.lat(), lng: latlng.lng() }); } } }); })
Version data entries
5 entries across 5 versions & 1 rubygems