Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. $('#map').locationpicker({
  2. location: {
  3. latitude: initLat,
  4. longitude: initLon
  5. },
  6. radius: initRadius,
  7. zoom: initZoom,
  8. inputBinding: {
  9. latitudeInput: $('#map-lat'),
  10. longitudeInput: $('#map-lon'),
  11. locationNameInput: $('#map-address'),
  12. radiusInput: $('#map-radius')
  13. },
  14. onchanged: function (currentLocation, radius, isMarkerDropped) {
  15. var mapContext = $('#map').locationpicker('map');
  16. mapContext.marker.setVisible(true);
  17. mapContext.map.setZoom(13);
  18.  
  19. //CHANGE RADIUS HERE
  20. mapContext.circle.setRadius(###);
  21.  
  22. },
  23. enableAutocomplete: true,
  24. addressFormat: 'street_address',
  25. autocompleteOptions: {
  26. componentRestrictions: { country: 'us' }
  27. }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement