
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
leaflet-google-places-autocomplete
Advanced tools
Add google places autocomplete to your leaflet map
Simple extension to add Google Places autocomplete into map.
bower install --save leaflet-google-places-autocomplete
npm install --save leaflet-google-places-autocomplete
Make sure you have Google Places library with valid API key loaded on page.
<script src="https://maps.googleapis.com/maps/api/js?key=<key>&libraries=places"></script>
new L.Control.GPlaceAutocomplete().addTo(map);
new L.Control.GPlaceAutocomplete({
callback: function(place){
var loc = place.geometry.location;
map.setView( [loc.lat(), loc.lng()], 18);
}
}).addTo(map);
These options can be set up when creating the control with autocompleteOptions
.
Option | Default | Version | Description |
---|---|---|---|
position | topright | v0.0.5 | any valid LeafLet position |
prepend | true :bool | v0.0.5 | If true, control will prepended to other existing controls, if false, control will be appended |
callback | - | v0.0.5 | any valid function as callback. By default internal callback is set and just pan the map to found position |
autocomplete_options | {} | v0.0.5 | default options for google autocomplete |
collapsed_mode | false :bool | v0.0.6 | if set to true, then just click-able icon will be displayed |
placeholder | null :string | v0.0.9 | custom placeholder for input text |
FAQs
Add google places autocomplete to your leaflet map
The npm package leaflet-google-places-autocomplete receives a total of 2,545 weekly downloads. As such, leaflet-google-places-autocomplete popularity was classified as popular.
We found that leaflet-google-places-autocomplete demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.