8000 GitHub - docwyatt2001/pwshPlaces: pwshPlaces is a PowerShell module that can help you discover places and search for points of interest around the globe.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pwshPlaces is a PowerShell module that can help you discover places and search for points of interest around the globe.

License

Notifications You must be signed in to change notification settings

docwyatt2001/pwshPlaces

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pwshPlaces

Minimum Supported PowerShell Version PowerShell Gallery Cross Platform License

Branch Windows - PowerShell Windows - pwsh Linux MacOS
main Build Status Windows PowerShell main Build Status Windows pwsh main Build Status Linux main Build Status MacOS main
dev Build Status Windows PowerShell dev Build Status Windows pwsh dev Build Status Linux dev Build Status MacOS dev

Synopsis

pwshPlaces is a PowerShell module that can help you discover places and search for points of interest around the globe.

Description

pwshPlaces enables you to leverage the Google Maps and/or Bing Maps API(s) to perform a variety of maps related tasks using PowerShell:

  • Search for places, entities, addresses, and other points of interest
  • Discover locations near your or near a specified place
  • Easily perform Geocoding and reverse Geocoding actions
  • Get detailed place information including opening hours, website information, and contact information

pwshPlaces provides the following functions:

Why

The Google Maps and Bing Maps API require very specific formatting and criteria for API map interaction. The goal of this project is to abstract that complexity away in favor of simple and direct PowerShell commands.

Installation

Prerequisites

To use pwshPlaces you will require a Google Maps or Bing Maps API key. To use all of the functions you will require both.

🙄 Not another module that requires an API Key!

Both of these Map API keys are easy to create and have no cost pricing tiers which should meet your needs. I have provided detailed guides on how to get your API keys:

Install pwshPlaces

# Install pwshPlaces from the PowerShell Gallery
Install-Module -Name pwshPlaces -Repository PSGallery -Scope CurrentUser

Quick start

######################################################################################
# Google Maps
$googleAPIKey = 'yourGoogleAPIKey'
######################################################################################
# I want to find a specific place
Find-GMapPlace -Query "Krause's cafe" -GoogleAPIKey $googleAPIKey
Find-GMapPlace -Query '+18306252807' -GoogleAPIKey $googleAPIKey
Find-GMapPlace -Query 'cafe' -PointLatitude '29.7049806' -PointLongitude '-98.068343' -GoogleAPIKey $googleAPIKey
#-------------------------------------------------------------------------------------
# I want to search for a type of place
Search-GMapText -Query "Cupcakes" -Type bakery -AllSearchResults -GoogleAPIKey $googleAPIKey
Search-GMapText -Query "italian restaurants in New York" -MinPrice 4 -GoogleAPIKey $googleAPIKey
#-------------------------------------------------------------------------------------
# I want to search for nearby places
Search-GMapNearbyPlace -Latitude '29.7049806' -Longitude '-98.068343' -Radius 5000 -GoogleAPIKey $googleAPIKey
Search-GMapNearbyPlace -Latitude '29.7049806' -Longitude '-98.068343' -Radius 10000 -RankByProminence -Keyword 'butcher' -Type store -GoogleAPIKey $googleAPIKey
#-------------------------------------------------------------------------------------
# I want to get very detailed information about a place - place ID retrieved from other commands
Get-GMapPlaceDetail -PlaceID 'ChIJf9Yxhme9XIYRkXo-Bl62Q10' -Contact -Atmosphere -GoogleAPIKey $googleAPIKey
#-------------------------------------------------------------------------------------
# I want to GeoCode an address
Invoke-GMapGeoCode -Address '148 S Castell Ave, New Braunfels, TX 78130, United States' -GoogleAPIKey $googleAPIKey
#-------------------------------------------------------------------------------------
# I want to reverse GeoCode a location
Invoke-GMapGeoCode -Latitude '29.7012853' -Longitude '-98.1250235' -GoogleAPIKey $googleAPIKey
######################################################################################
# Bing Maps
$bingAPIKey = 'yourBingAPIKey'
######################################################################################
# I want to find a specific place
Find-BingPlace -Query "Krause's cafe" -BingMapsAPIKey $bingAPIKey
Find-BingPlace -Query 'cafe' -PointLatitude '29.7049806' -PointLongitude '-98.068343' -BingMapsAPIKey $bingAPIKey
#-------------------------------------------------------------------------------------
# I want to search for nearby places
Search-BingNearbyPlace -Type Attractions -BingMapsAPIKey $bingAPIKey
Search-BingNearbyPlace -Type CafeRestaurants -PointLatitude '29.7049806' -PointLongitude '-98.068343' -BingMapsAPIKey $bingAPIKey
#-------------------------------------------------------------------------------------
# I want to GeoCode an address
Invoke-BingGeoCode -AddressLine '148 S Castell Ave' -City 'New Braunfels' -State TX -PostalCode 78130 -BingMapsAPIKey $bingAPIKey
#-------------------------------------------------------------------------------------
# I want to reverse GeoCode a location
Invoke-BingGeoCode -Latitude '29.7030' -Longitude '-98.1245' -BingMapsAPIKey $bingAPIKey
#-------------------------------------------------------------------------------------
# I want to determine the Time Zone of a specific place
Find-BingTimeZone -Query 'New Braunfels, TX' -BingMapsAPIKey $bingAPIKey
Find-BingTimeZone -PointLatitude 29.70 -PointLongitude -98.11 -BingMapsAPIKey $bingAPIKey
#-------------------------------------------------------------------------------------

FAQ

pwshPlaces - FAQ

Author

Jake Morrison - https://www.techthoughts.info/

Notes

Read more about:

This PowerShell project was created with Catesta.

Changelog

Reference the Changelog

About

pwshPlaces is a PowerShell module that can help you discover places and search for points of interest around the globe.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 100.0%
0