Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#map').locationpicker({
- location: {
- latitude: initLat,
- longitude: initLon
- },
- radius: initRadius,
- zoom: initZoom,
- inputBinding: {
- latitudeInput: $('#map-lat'),
- longitudeInput: $('#map-lon'),
- locationNameInput: $('#map-address'),
- radiusInput: $('#map-radius')
- },
- onchanged: function (currentLocation, radius, isMarkerDropped) {
- var mapContext = $('#map').locationpicker('map');
- mapContext.marker.setVisible(true);
- mapContext.map.setZoom(13);
- //CHANGE RADIUS HERE
- mapContext.circle.setRadius(###);
- },
- enableAutocomplete: true,
- addressFormat: 'street_address',
- autocompleteOptions: {
- componentRestrictions: { country: 'us' }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement