diff --git a/README.md b/README.md index c5081c5..303b725 100644 --- a/README.md +++ b/README.md @@ -49,14 +49,14 @@ To use pwshPlaces you will require a Google Maps or Bing Maps API key. To use al > 🙄 Not another module that requires an API Key! -Both of these APIs 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: +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: * [How to get a Google Maps API Key](docs/GoogleMapsAPI.md#how-to-get-a-google-maps-api-key) * [How to get a Bing Maps API Key](docs/BingMapsAPI.md#how-to-get-a-bing-maps-api-key) ```powershell # Set your API Keys in the pwshPlaces.psm1 file -# using the approriate variable names: +# using the appropriate variable names: $env:GoogleAPIKey = 'yourGoogleAPIKey' $env:BingAPIKey = 'yourBingAPIKey' diff --git a/docs/BingMapsAPI.md b/docs/BingMapsAPI.md index a0610de..7d280c6 100644 --- a/docs/BingMapsAPI.md +++ b/docs/BingMapsAPI.md @@ -41,7 +41,7 @@ Log into the [Bing Maps Dev Center Portal](https://www.bingmapsportal.com) - if #### 2. Create a Bing Maps Basic API Key - Under My account tab click *My Keys* - - Create a new api key + - Create a new API key ![Bing Maps API Key Choices](../media/create_bing_maps_api_key.PNG 'Bing Map API Key Choice') ![Bing Maps Dev Center New API Key](../media/bing_map_create_api_key.PNG 'New Bing Maps API Key') @@ -71,12 +71,12 @@ $scrapePath = $env:Temp $locale = Invoke-BingGeoCode -Query 'New Braunfels, TX' -$areaRestaraunts = Search-BingNearbyPlace -Type Restaurants -PointLatitude $locale.Latitude -PointLongitude $locale.Longitude -MaxResults 20 +$areaRestaurants = Search-BingNearbyPlace -Type Restaurants -PointLatitude $locale.Latitude -PointLongitude $locale.Longitude -MaxResults 20 -ConvertTo-Clixml -InputObject $areaRestaraunts -Depth 100 | Out-File "$scrapePath\localRestaraunts.xml" +ConvertTo-Clixml -InputObject $areaRestaurants -Depth 100 | Out-File "$scrapePath\localRestaurants.xml" #-------------------------------------------------------------- # where should we eat today? -$myLocalRestaurants = Get-Content -Path "$scrapePath\localRestaraunts.xml" -Raw | ConvertFrom-Clixml +$myLocalRestaurants = Get-Content -Path "$scrapePath\localRestaurants.xml" -Raw | ConvertFrom-Clixml Get-Random $myLocalRestaurants ``` diff --git a/docs/Find-BingPlace.md b/docs/Find-BingPlace.md index b5c0c15..cb94c1a 100644 --- a/docs/Find-BingPlace.md +++ b/docs/Find-BingPlace.md @@ -41,7 +41,7 @@ Find-BingPlace [-Query ] [-PointLatitude ] [-PointLongitude ] [-PointLatitude ] [-PointLongitude [-Language ] [-MaxResults ] ``` ## DESCRIPTION -Geocoding is the process of converting addresses addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates. +Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates. This function can take in an address and return coordinate information. You can also provide coordinates to return multiple nearby address results. @@ -182,7 +182,7 @@ Accept wildcard characters: False ``` ### -Longitude -Geographic coordinate that specifies the east-west position of a point on the Earths surface. +Geographic coordinate that specifies the east-west position of a point on the Earth's surface. ```yaml Type: String @@ -229,7 +229,7 @@ Accept wildcard characters: False ### -MaxResults Specifies the maximum number of locations to return in the response. -If not specified the default is 5. +If not specified, the default is 5. ```yaml Type: Int32 @@ -258,7 +258,7 @@ Author: Jake Morrison - @jakemorrison - https://www.techthoughts.info/ Example: http://dev.virtualearth.net/REST/v1/Locations?countryRegion={countryRegion}&adminDistrict={adminDistrict}&locality={locality}&postalCode={postalCode}&addressLine={addressLine}&userLocation={userLocation}&userIp={userIp}&usermapView={usermapView}&includeNeighborhood={includeNeighborhood}&maxResults={maxResults}&key={BingMapsKey} -While the Bing Location API does support a text query option, I have found it to be fairly unreliable. +While the Bing Location API does support a text query option, I have found it to be unreliable. For GeoCode info stick to Addresses and Lat/Long for reverse Geocoding. For Text Queries use other Bing Maps functions. diff --git a/docs/Invoke-GMapGeoCode.md b/docs/Invoke-GMapGeoCode.md index e2eda16..5c30151 100644 --- a/docs/Invoke-GMapGeoCode.md +++ b/docs/Invoke-GMapGeoCode.md @@ -29,7 +29,7 @@ Invoke-GMapGeoCode -PlaceID [-Language ] [-RegionBias -Longitude -Radius [ ## DESCRIPTION Performs a nearby search request with provided parameters. Nearby search is useful for finding places near a specific geographic location. -By default 20 results are returned from a standard search. +By default, 20 results are returned from a standard search. You can increase this to a maximum of 60 places results by providing the AllSearchResults switch. ## EXAMPLES @@ -85,7 +85,7 @@ Search-GMapNearbyPlace -Latitude '26.1202' -Longitude '127.7025' -Radius 10000 - ``` Performs a nearby search and returns only amusement parks places near provided coordinates within a range of 10000 meters. -Results are ranked by prominence and returned in Engish. +Results are ranked by prominence and returned in English. ### EXAMPLE 7 ``` @@ -138,7 +138,7 @@ Accept wildcard characters: False ``` ### -Longitude -Geographic coordinate that specifies the east-west position of a point on the Earths surface. +Geographic coordinate that specifies the east-west position of a point on the Earth's surface. ```yaml Type: String diff --git a/docs/Search-GMapText.md b/docs/Search-GMapText.md index a84f952..528538a 100644 --- a/docs/Search-GMapText.md +++ b/docs/Search-GMapText.md @@ -43,7 +43,7 @@ Search-GMapText [-Query ] -Latitude -Longitude [-Type Text based search for finding places based on a provided string and optional parameters. Text search is especially useful for making ambiguous queries when searching for places. Returned results can be heavily biased based on factors such as including a location in -the query iteself, or by providing direct location information in optional parameters. +the query itself, or by providing direct location information in optional parameters. By default 20 results are returned from a standard search. You can increase this to a maximum of 60 places results by providing the AllSearchResults switch. @@ -86,7 +86,7 @@ Places results are biased to the region of Spain. Search-GMapText -Query "italian restaurants in New York" -MinPrice 4 ``` -Performs a text search with the provided query and returns expensive restaraunt options. +Performs a text search with the provided query and returns expensive restaurant options. Since a location is provided in the query, places results will be biased by that location. ### EXAMPLE 6 @@ -144,7 +144,7 @@ Only restaurant places are returned. Results are returned based on the provided coordiantes and are ranked by their distance from the coordinates. Places data is returned in English. Results with a cheap to moderate price are returned. -Only restaraunts that are currently open are returned. +Only restaurants that are currently open are returned. The maximum of 60 places results is returned. ### EXAMPLE 12 @@ -169,7 +169,7 @@ Only restaurant places are returned. Results are returned based on the provided coordiantes and are ranked by their distance from the coordinates. Places data is returned in English. Results with a cheap to moderate price are returned. -Only restaraunts that are currently open are returned. +Only restaurants that are currently open are returned. The maximum of 60 places results is returned. ## PARAMETERS @@ -229,7 +229,7 @@ Accept wildcard characters: False ``` ### -Longitude -Geographic coordinate that specifies the east-west position of a point on the Earths surface. +Geographic coordinate that specifies the east-west position of a point on the Earth's surface. ```yaml Type: String diff --git a/docs/pwshPlaces-FAQ.md b/docs/pwshPlaces-FAQ.md index ce8039f..0bec0b8 100644 --- a/docs/pwshPlaces-FAQ.md +++ b/docs/pwshPlaces-FAQ.md @@ -40,7 +40,7 @@ You can dive into more details by [Understanding Bing Maps API pricing](BingMaps ```powershell # Set your API Keys in the pwshPlaces.psm1 file -# using the approriate variable names: +# using the appropriate variable names: $env:GoogleAPIKey = 'yourGoogleAPIKey' $env:BingAPIKey = 'yourBingAPIKey' diff --git a/src/pwshPlaces/Public/Find-BingPlace.ps1 b/src/pwshPlaces/Public/Find-BingPlace.ps1 index f653a04..0f1e89f 100644 --- a/src/pwshPlaces/Public/Find-BingPlace.ps1 +++ b/src/pwshPlaces/Public/Find-BingPlace.ps1 @@ -4,7 +4,7 @@ .DESCRIPTION Performs a find place request with provided parameters. A text search is performed that returns a list of business entities. - By default the location bias is IP based. + By default, the location bias is IP based. Location bias and language can be controlled via parameters. .EXAMPLE Find-BingPlace -Query "Krause's cafe" @@ -13,7 +13,7 @@ .EXAMPLE Find-BingPlace -Query "Krause's cafe" -Language es - Returns place information for the query location biased by IP and returns a few portion of the results in Spanish. + Returns place information for the query location biased by IP and returns a few portions of the results in Spanish. .EXAMPLE Find-BingPlace -Query 'cafe' -PointLatitude '29.7049806' -PointLongitude '-98.068343' @@ -46,11 +46,11 @@ .PARAMETER PointLatitude Prefer results in a specified area by specifying a single coordinate for the north–south position of a point on the Earth's surface. .PARAMETER PointLongitude - Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earths surface. + Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earth's surface. .PARAMETER CircleLatitude Prefer results in a specified area by specifying a radius plus lat/long - north–south position of a point on the Earth's surface. .PARAMETER CircleLongitude - Prefer results in a specified area by specifying a radius plus lat/long - east–west position of a point on the Earths surface. + Prefer results in a specified area by specifying a radius plus lat/long - east–west position of a point on the Earth's surface. .PARAMETER CircleRadius Prefer results in a specified area by specifying a radius plus lat/long - radius in meters .PARAMETER SouthLatitude diff --git a/src/pwshPlaces/Public/Find-BingTimeZone.ps1 b/src/pwshPlaces/Public/Find-BingTimeZone.ps1 index 54eba19..e53a0ce 100644 --- a/src/pwshPlaces/Public/Find-BingTimeZone.ps1 +++ b/src/pwshPlaces/Public/Find-BingTimeZone.ps1 @@ -16,7 +16,7 @@ .PARAMETER PointLatitude Prefer results in a specified area by specifying a single coordinate for the north–south position of a point on the Earth's surface. .PARAMETER PointLongitude - Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earths surface. + Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earth's surface. .PARAMETER RegionBias The region code, specified as a ccTLD ("top-level domain") two-character value. .PARAMETER Language diff --git a/src/pwshPlaces/Public/Find-GMapPlace.ps1 b/src/pwshPlaces/Public/Find-GMapPlace.ps1 index 2f1e9d2..6880e9b 100644 --- a/src/pwshPlaces/Public/Find-GMapPlace.ps1 +++ b/src/pwshPlaces/Public/Find-GMapPlace.ps1 @@ -4,7 +4,7 @@ .DESCRIPTION Performs a find place request with provided parameters. A text search is performed unless a properly formatted phone number is provided in which case - a phonenumber search is completed. By default the location bias and language is IP based. + a phonenumber search is completed. By default, the location bias and language is IP based. Location bias and language can be controlled via parameters. The information returned in a normal call contains all basic field types. Additional field types including contact and atmosphere information can be called for but these carry an additional cost. The Find Place return does not return @@ -58,11 +58,11 @@ .PARAMETER PointLatitude Prefer results in a specified area by specifying a single coordinate for the north–south position of a point on the Earth's surface. .PARAMETER PointLongitude - Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earths surface. + Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earth's surface. .PARAMETER CircleLatitude Prefer results in a specified area by specifying a radius plus lat/long - north–south position of a point on the Earth's surface. .PARAMETER CircleLongitude - Prefer results in a specified area by specifying a radius plus lat/long - east–west position of a point on the Earths surface. + Prefer results in a specified area by specifying a radius plus lat/long - east–west position of a point on the Earth's surface. .PARAMETER CircleRadius Prefer results in a specified area by specifying a radius plus lat/long - radius in meters .PARAMETER SouthLatitude diff --git a/src/pwshPlaces/Public/Invoke-BingGeoCode.ps1 b/src/pwshPlaces/Public/Invoke-BingGeoCode.ps1 index 6c4e41f..16e9a24 100644 --- a/src/pwshPlaces/Public/Invoke-BingGeoCode.ps1 +++ b/src/pwshPlaces/Public/Invoke-BingGeoCode.ps1 @@ -2,7 +2,7 @@ .SYNOPSIS Engages Bing Maps API to return address and geographic coordinates based on provided query parameters. .DESCRIPTION - Geocoding is the process of converting addresses addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates. + Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates. This function can take in an address and return coordinate information. You can also provide coordinates to return multiple nearby address results. .EXAMPLE @@ -47,13 +47,13 @@ .PARAMETER Latitude Geographic coordinate that specifies the north–south position of a point on the Earth's surface. .PARAMETER Longitude - Geographic coordinate that specifies the east–west position of a point on the Earths surface. + Geographic coordinate that specifies the east–west position of a point on the Earth's surface. .PARAMETER Query A string that contains information about a location, such as an address or landmark name. .PARAMETER Language The language in which to return results. .PARAMETER MaxResults - Specifies the maximum number of locations to return in the response. If not specified the default is 5. + Specifies the maximum number of locations to return in the response. If not specified, the default is 5. .OUTPUTS Bing.GeoCode .NOTES @@ -62,7 +62,7 @@ Example: http://dev.virtualearth.net/REST/v1/Locations?countryRegion={countryRegion}&adminDistrict={adminDistrict}&locality={locality}&postalCode={postalCode}&addressLine={addressLine}&userLocation={userLocation}&userIp={userIp}&usermapView={usermapView}&includeNeighborhood={includeNeighborhood}&maxResults={maxResults}&key={BingMapsKey} - While the Bing Location API does support a text query option, I have found it to be fairly unreliable. + While the Bing Location API does support a text query option, I have found it to be unreliable. For GeoCode info stick to Addresses and Lat/Long for reverse Geocoding. For Text Queries use other Bing Maps functions. .COMPONENT diff --git a/src/pwshPlaces/Public/Invoke-GMapGeoCode.ps1 b/src/pwshPlaces/Public/Invoke-GMapGeoCode.ps1 index 1c238ae..b55e41a 100644 --- a/src/pwshPlaces/Public/Invoke-GMapGeoCode.ps1 +++ b/src/pwshPlaces/Public/Invoke-GMapGeoCode.ps1 @@ -2,7 +2,7 @@ .SYNOPSIS Engages Geocoding API to return address and geographic coordinates based on provided query parameters. .DESCRIPTION - Geocoding is the process of converting addresses addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates. + Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates. This function can take in an address and return coordinate information. You can also provide coordinates to return multiple nearby address results. If you know the exact google placeID this can also be provided to return Geocoding information about that location. @@ -27,7 +27,7 @@ .PARAMETER Latitude Geographic coordinate that specifies the north–south position of a point on the Earth's surface. .PARAMETER Longitude - Geographic coordinate that specifies the east–west position of a point on the Earths surface. + Geographic coordinate that specifies the east–west position of a point on the Earth's surface. .PARAMETER PlaceID The place ID of the place for which you wish to obtain the human-readable address. The place ID is a unique identifier that can be used with other Google APIs. .PARAMETER Language diff --git a/src/pwshPlaces/Public/Search-BingNearbyPlace.ps1 b/src/pwshPlaces/Public/Search-BingNearbyPlace.ps1 index 1e720fd..a458a7c 100644 --- a/src/pwshPlaces/Public/Search-BingNearbyPlace.ps1 +++ b/src/pwshPlaces/Public/Search-BingNearbyPlace.ps1 @@ -29,7 +29,7 @@ .EXAMPLE Search-BingNearbyPlace -Type Museums -PointLatitude '29.7049806' -PointLongitude '-98.068343' -Language en -MaxResults 20 - Performs a nearby search near the provided Lat/Long and returns Museum places types. Results are returned in english with a maximum of 20 results returned. + Performs a nearby search near the provided Lat/Long and returns Museum places types. Results are returned in English with a maximum of 20 results returned. .EXAMPLE $searchBingNearbyPlaceSplat = @{ Type = 'Museums' @@ -40,17 +40,17 @@ } Search-BingNearbyPlace @searchBingNearbyPlaceSplat - Performs a nearby search near the provided Lat/Long and returns Museum places types. Results are returned in english with a maximum of 20 results returned. + Performs a nearby search near the provided Lat/Long and returns Museum places types. Results are returned in English with a maximum of 20 results returned. .PARAMETER Query A string that contains information about a location, such as an address or landmark name. .PARAMETER PointLatitude Prefer results in a specified area by specifying a single coordinate for the north–south position of a point on the Earth's surface. .PARAMETER PointLongitude - Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earths surface. + Prefer results in a specified area by specifying a single coordinate for the east–west position of a point on the Earth's surface. .PARAMETER CircleLatitude Prefer results in a specified area by specifying a radius plus lat/long - north–south position of a point on the Earth's surface. .PARAMETER CircleLongitude - Prefer results in a specified area by specifying a radius plus lat/long - east–west position of a point on the Earths surface. + Prefer results in a specified area by specifying a radius plus lat/long - east–west position of a point on the Earth's surface. .PARAMETER CircleRadius Prefer results in a specified area by specifying a radius plus lat/long - radius in meters .PARAMETER SouthLatitude diff --git a/src/pwshPlaces/Public/Search-GMapNearbyPlace.ps1 b/src/pwshPlaces/Public/Search-GMapNearbyPlace.ps1 index 194fe70..3450e9a 100644 --- a/src/pwshPlaces/Public/Search-GMapNearbyPlace.ps1 +++ b/src/pwshPlaces/Public/Search-GMapNearbyPlace.ps1 @@ -4,7 +4,7 @@ .DESCRIPTION Performs a nearby search request with provided parameters. Nearby search is useful for finding places near a specific geographic location. - By default 20 results are returned from a standard search. + By default, 20 results are returned from a standard search. You can increase this to a maximum of 60 places results by providing the AllSearchResults switch. .EXAMPLE Search-GMapNearbyPlace -Latitude '29.7049806' -Longitude '-98.068343' -Radius 5000 @@ -29,7 +29,7 @@ .EXAMPLE Search-GMapNearbyPlace -Latitude '26.1202' -Longitude '127.7025' -Radius 10000 -RankByProminence -Type amusement_park -Language en - Performs a nearby search and returns only amusement parks places near provided coordinates within a range of 10000 meters. Results are ranked by prominence and returned in Engish. + Performs a nearby search and returns only amusement parks places near provided coordinates within a range of 10000 meters. Results are ranked by prominence and returned in English. .EXAMPLE Search-GMapNearbyPlace -Latitude '29.7049806' -Longitude '-98.068343' -Radius 5000 -RankByProminence -Keyword 'pasta' -Type restaurant -Language en -OpenNow -MaxPrice 4 -MinPrice 2 -AllSearchResults @@ -54,7 +54,7 @@ .PARAMETER Latitude Geographic coordinate that specifies the north–south position of a point on the Earth's surface. .PARAMETER Longitude - Geographic coordinate that specifies the east–west position of a point on the Earths surface. + Geographic coordinate that specifies the east–west position of a point on the Earth's surface. .PARAMETER Radius Distance (in meters) within which to return place results. Instructs the Places service to prefer showing results within that circle; results outside of the defined area may still be displayed. .PARAMETER RankByProminence diff --git a/src/pwshPlaces/Public/Search-GMapText.ps1 b/src/pwshPlaces/Public/Search-GMapText.ps1 index fa206ac..09d2105 100644 --- a/src/pwshPlaces/Public/Search-GMapText.ps1 +++ b/src/pwshPlaces/Public/Search-GMapText.ps1 @@ -5,7 +5,7 @@ Text based search for finding places based on a provided string and optional parameters. Text search is especially useful for making ambiguous queries when searching for places. Returned results can be heavily biased based on factors such as including a location in - the query iteself, or by providing direct location information in optional parameters. + the query itself, or by providing direct location information in optional parameters. By default 20 results are returned from a standard search. You can increase this to a maximum of 60 places results by providing the AllSearchResults switch. .EXAMPLE @@ -27,7 +27,7 @@ .EXAMPLE Search-GMapText -Query "italian restaurants in New York" -MinPrice 4 - Performs a text search with the provided query and returns expensive restaraunt options. Since a location is provided in the query, places results will be biased by that location. + Performs a text search with the provided query and returns expensive restaurant options. Since a location is provided in the query, places results will be biased by that location. .EXAMPLE Search-GMapText -Query "main plaza New Braunfels" -Type restaurant @@ -51,7 +51,7 @@ .EXAMPLE Search-GMapText -Query 'Coco' -Latitude '26.1202' -Longitude '127.7025' -RankByDistance -Type restaurant -Language en -OpenNow -MinPrice 1 -MaxPrice 2 -AllSearchResults - Performs a text search with the provided query. Only restaurant places are returned. Results are returned based on the provided coordiantes and are ranked by their distance from the coordinates. Places data is returned in English. Results with a cheap to moderate price are returned. Only restaraunts that are currently open are returned. The maximum of 60 places results is returned. + Performs a text search with the provided query. Only restaurant places are returned. Results are returned based on the provided coordiantes and are ranked by their distance from the coordinates. Places data is returned in English. Results with a cheap to moderate price are returned. Only restaurants that are currently open are returned. The maximum of 60 places results is returned. .EXAMPLE $searchGMapTextSplat = @{ Query = 'Coco' @@ -67,13 +67,13 @@ } Search-GMapText @searchGMapTextSplat - Performs a text search with the provided query. Only restaurant places are returned. Results are returned based on the provided coordiantes and are ranked by their distance from the coordinates. Places data is returned in English. Results with a cheap to moderate price are returned. Only restaraunts that are currently open are returned. The maximum of 60 places results is returned. + Performs a text search with the provided query. Only restaurant places are returned. Results are returned based on the provided coordiantes and are ranked by their distance from the coordinates. Places data is returned in English. Results with a cheap to moderate price are returned. Only restaurants that are currently open are returned. The maximum of 60 places results is returned. .PARAMETER Query Text string on which to search .PARAMETER Latitude Geographic coordinate that specifies the north–south position of a point on the Earth's surface. .PARAMETER Longitude - Geographic coordinate that specifies the east–west position of a point on the Earths surface. + Geographic coordinate that specifies the east–west position of a point on the Earth's surface. .PARAMETER Radius Distance (in meters) within which to return place results. Instructs the Places service to prefer showing results within that circle; results outside of the defined area may still be displayed. .PARAMETER RankByProminence