Hey aschrand,
The last 2 digits do not change, I have set this up months ago and it’s still working.
Why do you think the last 2 digits change each time?
Gr.
NB.
I have tested the new Google Places v2 API and it shows the status of the charge station but not per charge point.
I have created a script to gather API keys from the internet and test the API codes if the API is working. There is no API found that has the Placesv2 enabled, or has valid permissions. If you create an account at ‘https://console.cloud.google.com/’ and enable the Placesv2 API then you have your own API key. Remember to set permissions!
PowerShell code for this is :
Function GetPlacesv2SearchNearBy ($Location,$Radius,$IncludedTypes,$MaxResults,$MapsAPIKey){
$Error.Clear()
Try{
$Uri='https://maps.googleapis.com/maps/api/geocode/json?key='+$MapsAPIKey;$Json=Invoke-WebRequest $Uri -Body @{address=$Location} -UseBasicParsing|ConvertFrom-Json|Select -ExpandProperty results
$Body='{
"includedTypes": ["'+$IncludedTypes+'"],
"maxResultCount":'+$MaxResults+',
"locationRestriction": {
"circle": {
"center": {
"latitude":'+$Json.geometry.location.lat+',
"longitude":'+$Json.geometry.location.lng+'
},
"radius":'+$Radius+'
}
}
}'
$XGoogFieldMask="places.evChargeOptions"
$Uri="https://places.googleapis.com/v1/places:searchNearby"
Invoke-WebRequest $Uri -Method POST -Body $Body -Headers @{"X-Goog-FieldMask"=$XGoogFieldMask;"X-Goog-Api-Key"=$MapsAPIKey;"Content-Type"="application/json"}|ConvertFrom-Json|Select -ExpandProperty places|Select -ExpandProperty evChargeOptions|Select -ExpandProperty connectorAggregation
}Catch{}
}
$Location='YOUR ADDRESS'
$Radius='500' #meters
$InludedTypes='electric_vehicle_charging_station'
$MaxResults='5'
$MapsAPIKey='YOUR MAPS API KEY'
GetPlacesv2SearchNearby $Location $Radius $IncludedTypes $MaxResults $MapsAPIKey
If the key is changing each day then I would scriptmatic gather the key online each time that the script executes. But there is no need because the key doesn’t change.
And for the lovers my whole script :
For scriptmatic Google Search there is an expensive API needed. I have a workaround to get the keys from the browser cache. Script is not perfect, but works great. Save it as a PowerShell script (scriptname.ps1).
It assumes you have Edge installed and get the cache from each profile.
Download this: ChromeCacheView - Cache viewer for Google Chrome Web browser
Rename the executable as ‘EdgeCacheView.exe’ and place it in the same folder where the script is. Success.
# Documentation : https://developers.google.com/maps/documentation/directions
Function GetDistance($Start,$End,$MapsAPIKey){
Try{
$Uri='https://maps.googleapis.com/maps/api/directions/json?&key='+$MapsAPIKey
$Body=@{'origin'=$Start;'destination'=$End}
$Json=Invoke-WebRequest $Uri -UseBasicParsing -Body $Body | ConvertFrom-Json
$Json.routes.legs.duration.text
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/geocoding/start
Function GetGeoLocation ($Location,$MapsAPIKey){
$Error.Clear()
Try{
$Uri='https://maps.googleapis.com/maps/api/geocode/json?key='+$MapsAPIKey
Invoke-WebRequest $Uri -Body @{address=$Location} -UseBasicParsing|ConvertFrom-Json|Select -ExpandProperty results
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/places/web-service/search-nearby
Function GetNearbyPlacesFromCoordinates ($Lat,$Lng,$MapsAPIKey){
$Error.Clear()
Try{
$Uri='https://maps.googleapis.com/maps/api/place/nearbysearch/json?location='+$Lat+','+$Lng+'&radius=500&keyword=electric_vehicle_charging_station&key='+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing| ConvertFrom-Json|Select -ExpandProperty results|Select -ExpandProperty vicinity
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/timezone/overview
Function GetTimeZone ($Location,$MapsAPIKey) {
$Error.Clear()
Try{
$Json=GetGeoLocation $Location $MapsAPIKey
$Coordinates=($Json.geometry.location.lat,$Json.geometry.location.lng) -Join(',')
$TimeStamp=[int]((Get-Date)-(Get-Date "January 1, 1970")).TotalSeconds
$Uri='https://maps.googleapis.com/maps/api/timezone/json?location='+$Coordinates+'×tamp='+$TimeStamp+'&key='+$MapsAPIKey
(Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json).timeZoneName
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/distance-matrix/distance-matrix
Function GetNearbyPlacesFromLocation ($Location,$Radius,$Keyword,$MapsAPIKey) {
$Error.Clear()
Try{
$Json=GetGeoLocation $Location $MapsAPIKey
$Coordinates=($Json.geometry.location.lat,$Json.geometry.location.lng) -Join(',')
$Uri='https://maps.googleapis.com/maps/api/place/nearbysearch/json?location='+$Coordinates+'&radius='+$Radius+'&keyword='+$Keyword+'&key='+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json|Select -ExpandProperty results|Select -ExpandProperty vicinity
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/places/web-service/search-text
Function GetNearbyPlacesFromText ($Location,$Radius,$Query,$MapsAPIKey) {
$Error.Clear()
Try{
$Json=GetGeoLocation $Location $MapsAPIKey
$Coordinates=($Json.geometry.location.lat,$Json.geometry.location.lng) -Join(',')
$Uri='https://maps.googleapis.com/maps/api/place/textsearch/json?location='+$Coordinates+'&radius='+$Radius+'&query='+$Query+'&key='+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json|Select -ExpandProperty results|Select -ExpandProperty name
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/distance-matrix
Function GetDistanceMatrix ($Location,$Destination,$TravelType,$MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://maps.googleapis.com/maps/api/distancematrix/json?origins='+$Location+'&destinations='+$Destination+'&mode='+$TravelType.ToLower()+'&key='+$MapsAPIKey
$Json=Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json
$DistanceMatrix=($Json.Rows.elements.distance.text,$Json.Rows.elements.duration.text) -Join(', ')
$DistanceMatrix+" "+$TravelType
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/geolocation/overview
Function GetMyLocation ($MapsAPIKey) {
$Error.Clear()
Try{
$MacAddress=netsh wlan show networks mode=Bssid | Where-Object{$_ -like "*BSSID*"} | %{($_.split(" ")[-1]).toupper()}
If(!($MacAddress)){Write-Host "Niet verbonden met Wi-Fi";Break}
$Uri='https://www.googleapis.com/geolocation/v1/geolocate?key='+$MapsAPIKey
$Body=@{wifiAccessPoints=@{macAddress=$($MacAddress[0])},@{macAddress = $($MacAddress[1])}}|ConvertTo-Json
$Json=Invoke-WebRequest $Uri -Method POST -Body $Body -UseBasicParsing|ConvertFrom-Json
$Coordinates=($Json.location.lat,$Json.location.lng) -Join(',')
((GetGeoLocation $Coordinates $MapsAPIKey).formatted_address)[1..3] -Join('; ')
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/directions
# https://developers.google.com/maps/documentation/directions/get-directions
Function GetChargeStationsSortByDuration ($Location,$Radius,$TravelType,$MaxResults,$MapsAPIKey) {
$Error.Clear()
Try{
$Destinations=GetNearbyPlacesFromLocation $Location $Radius "Charge" $MapsAPIKey
$ChargePoints=[System.Collections.Generic.List[pscustomobject]]::new()
ForEach($Destination in $Destinations){
$GeoDirectionsAPI='https://maps.googleapis.com/maps/api/directions/json?origin='+$Location+'&destination='+$Destination+'&mode='+$TravelType.ToLower()+'&key='+$MapsAPIKey
$JsonGeoDirectionsAPI=invoke-webrequest $GeoDirectionsAPI -Method Get|Select -ExpandProperty Content|ConvertFrom-Json
ForEach($D in $JsonGeoDirectionsAPI){
$duration_in_seconds=[int]$D.routes.legs.duration.value
$duration_text=$D.routes.legs.duration.text
$distance_in_meters=[int]$D.routes.legs.distance.value
$distance_text=$D.routes.legs.distance.text
$address=$D.routes.legs.end_address
$ChargePoints.Add([pscustomobject]@{
'address'=$address
'duration_in_seconds'=$duration_in_seconds
'duration_displayname'=$duration_text
'distance_in_meters'=$distance_in_meters
'distance_displayname'=$distance_text
})
}
}
$ChargePoints|sort duration_in_seconds|Select * -First $MaxResults -ExpandProperty address
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/solar
Function GetSolar ($lat,$Lng,$Quality,$MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://solar.googleapis.com/v1/buildingInsights:findClosest?location.latitude='+$Lat+'&location.longitude='+$Lng+'&requiredQuality='+$Quality.ToUpper()+'&key='+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/address-validation
Function ValidateAddress ($MapsAPIKey) {
$Error.Clear()
Try{
$Headers=@{'Content-Type'='application/json'}
$Body=@{'address'= @{'regioCode'='US';'addressLines'='1600 Amphitheatre Pkwy','Mountain view, CA, 94043'}}|ConvertTo-JSon
$Uri='https://addressvalidation.googleapis.com/v1:validateAddress?key='+$MapsAPIKey
Invoke-WebRequest $Uri -Method POST -Body $Body -Headers $Headers|ConvertFrom-Json
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/streetview
# https://developers.google.com/maps/documentation/streetview/request-streetview
Function StreetView ($Location, $MapsAPIKey){
$Error.Clear()
Try{
$Size='3840x2160'
If($Location-match', '){
$Location=$Location -Split(', ')
$Location[0]=$Location[0] -Replace(' ','+')
$Location[1]=$Location[1] -Replace(' ','+')
$Location=$Location[0]+','+$Location[1]
}Else{$Location -Replace(' ','+')}
$Uri='https://maps.googleapis.com/maps/api/streetview/metadata?location='+$Location+'&key='+$MapsAPIKey
$PanoId=(Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json).pano_id
$PanoIdLat=(Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json).location.lat
$PanoIdLng=(Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json).location.lng
If($PanoId){
$Uri='https://maps.googleapis.com/maps/api/streetview?size='+$Size+'&location='+$PanoIdLat+','+$PanoIdLng+'&key='+$MapsAPIKey
}Else{
$Uri='https://maps.googleapis.com/maps/api/streetview?size='+$Size+'&location='+$Location+'&key='+$MapsAPIKey
}
Invoke-WebRequest $Uri -UseBasicParsing
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/tile/2d-tiles-overview
Function GetStreetView2DTiles ($Lat,$Lng,$Radius,$MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://tile.googleapis.com/v1/3dtiles/root.json?key='+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/tile/3d-tiles-overview
Function GetStreetView3DTiles ($MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://tile.googleapis.com/v1/3dtiles/root.json?key='+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/pollen
Function GetPollen ($Lat,$Lng,$Days,$MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://pollen.googleapis.com/v1/forecast:lookup?key='+$MapsAPIKey+'&location.longitude='+$Lng+'&location.latitude='+$Lat+'&days='+$Days
Invoke-WebRequest $Uri -UseBasicParsing
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/air-quality/heatmaps
Function GetAirQualityHeatMapTiles ($MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://airquality.googleapis.com/v1/mapTypes/UAQI_INDIGO_PERSIAN/heatmapTiles/0/0/0?key='+$MapsAPIKey
Invoke-WebRequest $Uri -ContentType 'application/json' -UseBasicParsing
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/air-quality/history
Function GetAirQualityHistory ($MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://maps.googleapis.com/maps/api/geocode/json?key='+$MapsAPIKey;$Json=Invoke-WebRequest $Uri -Body @{address=$Location} -UseBasicParsing|ConvertFrom-Json|Select -ExpandProperty results
$Body='{
"hours": 4,
"pageSize": 2,
"pageToken":"",
"location": {
"latitude":'+$Json.geometry.location.lat+',
"longitude":'+$Json.geometry.location.lng+'
}
}'
$Uri='https://airquality.googleapis.com/v1/history:lookup?key='+$MapsAPIKey
Invoke-WebRequest $Uri -Body $Body -Method POST -ContentType 'application/json' -UseBasicParsing|ConvertFrom-Json
}Catch{}
}
Function GoogleSearch ($Keyword,$EndCount){
$Error.Clear()
Try{
$Pages=1
$Count=1
Do {
Write-Host "Pagina : "$Count"/"$EndCount
$Keyword=$Keyword -Replace(' ','+')
$Uri='https://www.google.nl/search?q='+$Keyword+'&start='+$Pages
Start-Process $Uri -Wait
$Count++
$Pages=$Pages+10
} While ($Count-le$EndCount)
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/elevation/overview
Function GetElevation ($Lat,$Lng,$MapsAPIKey) {
$Error.Clear()
Try{
$Uri='https://maps.googleapis.com/maps/api/elevation/json?locations='+$Lat+'%2C'+$Lng+'&key='+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing|ConvertFrom-Json|Select -ExpandProperty results
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/aerial-view
Function GetAerialView ($Location,$MapsAPIKey) {
$Error.Clear()
Try{
$Location="500 W 2nd St, Austin, TX 78701"
$Body='{
"address":"'+$Location+'"
}'
$Uri="https://aerialview.googleapis.com/v1/videos:renderVideo?key="+$MapsAPIKey
Invoke-WebRequest $Uri -UseBasicParsing -Method POST -Body $Body -ContentType 'application/json'|ConvertFrom-Json
}Catch{}
}
# Documentation : https://developers.google.com/maps/documentation/tile/session_tokens
Function GetTileCreateSession ($MapsAPIKey) {
$Error.Clear()
Try{
$Body=@{
'mapType'='streetview'
'language'='en-US'
'region'='US'
}|ConvertTo-Json
$Headers=@{
'Content-Type'='application/json'
}
$Uri='https://tile.googleapis.com/v1/createSession?key='+$MapsAPIKey
Invoke-WebRequest $Uri -Body $Body -Headers $Headers -Method POST
}Catch{}
}
Function GetPlacesv2SearchNearBy ($Location,$Radius,$IncludedTypes,$MaxResults,$MapsAPIKey){
$Error.Clear()
Try{
$Uri='https://maps.googleapis.com/maps/api/geocode/json?key='+$MapsAPIKey;$Json=Invoke-WebRequest $Uri -Body @{address=$Location} -UseBasicParsing|ConvertFrom-Json|Select -ExpandProperty results
$Body='{
"includedTypes": ["'+$IncludedTypes+'"],
"maxResultCount":'+$MaxResults+',
"locationRestriction": {
"circle": {
"center": {
"latitude":'+$Json.geometry.location.lat+',
"longitude":'+$Json.geometry.location.lng+'
},
"radius":'+$Radius+'
}
}
}'
$Headers=@{"X-Goog-FieldMask"="*";"X-Goog-Api-Key"=$MapsAPIKey;"Content-Type"="application/json"}
$Uri="https://places.googleapis.com/v1/places:searchNearby"
Invoke-WebRequest $Uri -Method POST -Body $Body -Headers $Headers|ConvertFrom-Json|Select -ExpandProperty places
}Catch{}
}
$NewLine=[Environment]::NewLine;Clear-Host;Add-Type -AssemblyName PresentationCore,PresentationFramework;$ButtonType=[System.Windows.MessageBoxButton]::YesNo;$MessageIcon=[System.Windows.MessageBoxImage]::Error;$MessageBody="Wil je zoeken in Google?";$MessageTitle="GoogleSearch"
$Result=[System.Windows.MessageBox]::Show($MessageBody,$MessageTitle,$ButtonType,$MessageIcon);If($Result-eq'Yes'){[void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');$Title='GoogleSearch';$Msg="Voer zoekterm(en) in :`n`nVoorbeeld zoektermen : `nStreetView`nAirQuality`nAerialView`nSolar`nPollen`nDistanceMatrix`nTimeZone`nGeoLocation`nPlaces`nElevation";$Keyword=[Microsoft.VisualBasic.Interaction]::InputBox($Msg,$Title);$Title='GoogleSearch';$Msg="Hoeveel webpagina's moeten weergeven worden?`n`nWebpagina bevat 10 website resultaten.`nBij geen opgegeven waarde is default 1.";$Count=[Microsoft.VisualBasic.Interaction]::InputBox($Msg,$Title);If($Count-eq""){$Count=1};GoogleSearch $Keyword $Count}
$ScriptPath=(Split-Path ($MyInvocation.MyCommand.Path) -Parent)+'\';$Executable="EdgeCacheView.exe";If(!($Executable)){Write-host "Executable "+$Executable+" not found!";Break};$EdgeProfileFolder=$Env:LOCALAPPDATA+"\Microsoft\Edge\User Data\";If(!($EdgeProfileFolder)){Write-Host "Edge profile base folder not found!";Break};$EdgeProfileFolderNames=(Get-Item "HKCU:\Software\Microsoft\Edge\Profiles\*").PSChildName;If(!($EdgeProfileFolderNames)){Write-Host "Edge Profiles not found";Break}
$ExportRAW=$ScriptPath+$Executable.Replace(".exe",".txt");Remove-Item $ExportRAW -Force -ErrorAction SilentlyContinue;ForEach($EdgeProfileFolderName in $EdgeProfileFolderNames){$EdgeProfile=$EdgeProfileFolder+$EdgeProfileFolderName+'/Cache/Cache_Data/';$Arguments="-folder ""$EdgeProfile"" /sText ""$ExportRaw""";Start-Process -FilePath "$ScriptPath$Executable" -ArgumentList $Arguments -Wait}
Clear-Host;$MapsAPIKeys=$(ForEach($Line in Get-Content $ExportRaw){$Begin='AIzaSy';$APILength="39";If($Line-match$Begin){$Length=($line.SubString($Line.IndexOf($Begin))).Length;If($Length-ge$APILength){$Line.SubString(($Line.IndexOf($Begin)),$APILength)}}})|Sort-Object|Get-Unique
$Temp=New-TemporaryFile;$ExportToCSV=$ScriptPath+($Executable -Replace('exe','csv'));$OldKeyCount=0;If(Test-Path $ExportToCSV){$ExportToCSVContent=Get-Content $ExportToCSV|ConvertFrom-CSV;$OldKeys=$ExportToCSVContent|Select -Exp APIKey;$OldKeysCount=($ExportToCSVContent|Select -Exp APIKey).Count}
$OldKeys|Out-File $Temp;$MapsAPIKeys|Out-File $Temp -Ap;$AllKeys=Get-Content $Temp|Sort|Get-Unique;$TotalKeys=$AllKeys.Count;$NewKeys=@();ForEach($Key in $MapsAPIKeys){If(!($OldKeys-contains$Key)){$NewKeys+=$Key}};$Count=0;$Enum=@()
$DumpCount=0
ForEach($MapsAPIKey in $NewKeys){
$Count++;Write-Host $Count "/" $NewKeys.count " - total: " $TotalKeys
$Location='YOUR ADDRESS'
$Destination='DESTINATION ADDRESS'
$Radius='500'
$KeyWordChargeStation='charge station'
$TravelType='Walking'
$MaxResults='1'
$Query='Restaurant'
$Days='5'
$Lat='LATITUDE OF YOUR LOCATION'
$Lng='LONGITUDE OF YOUR LOCATION'
$Quality='HIGH'
$IncludedTypes="electric_vehicle_charging_station"
$LatforSolar='52.0590358' # Bogus, doesn't work with latitude of my location
$LngforSolar='4.2716786' # Bogus, doesn't work with longitude of my location
$GetGeoLocation=GetGeoLocation $Location $MapsAPIKey|Select -ExpandProperty formatted_address
$Error.Clear();Try{$GetNearbyPlacesFromLocation=(GetNearbyPlacesFromLocation $Location $Radius $KeywordChargetation $MAPSAPIKey)[0]}Catch{}
$GetTimeZone=GetTimeZone $Location $MapsAPIKey
$GetDistanceMatrix=GetDistanceMatrix $Location $Destination $TravelType $MapsAPIKey
$GetMyLocation=GetMyLocation $MapsAPIKey
$GetChargeStationsSortByDuration=GetChargeStationsSortByDuration $Location $Radius $TravelType $MaxResults $MapsAPIKey
$Error.Clear();Try{$GetNearByPlacesFromText=(GetNearByPlacesFromText $Location $Radius $QUery $MapsAPIKey)[0]}Catch{}
$GetPollen=GetPollen $Lat $Lng $Days $MapsAPIKey
$GetAirQualityHistory=GetAirQualityHistory $MapsAPIKey
$GetAirQualityHeatMapTiles=GetAirQualityHeatMapTiles $MapsAPIKey
$GetSolar=GetSolar $LatforSolar $LngforSolar $Quality $MapsAPIKey
$GetElevation=GetElevation $Lat $Lng $MapsAPIKey
$GetAerialView=GetAerialView $Location $MapsAPIKey
$GetTileCreateSession=GetTileCreateSession $MapsAPIKey
$GetStreetView2DTiles=GetStreetView2DTiles $Lat $Lng $Radius $MapsAPIKey
$GetStreetView3DTiles=GetStreetView3DTiles $MapsAPIKey
$StreetView=StreetView $Location $MapsAPIKey
$GetPlacesv2SearchNearBy=GetPlacesv2SearchNearBy $Location $Radius $IncludedTypes $MaxResults $MapsAPIKey
$A=New-Object PSObject
$A|Add-Member NoteProperty "APIKey" $MapsAPIKey
If($GetChargeStationsSortByDuration){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Directions,ChargeStationsByDuration' $B
If($GetGeoLocation){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Geolocation' $B
If($GetNearbyPlacesFromLocation){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Placesv1,SearchFromLocation' $B
If($GetTimeZone){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Timezone' $B
If($GetDistanceMatrix-ne', Walking'){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'DistanceMatrix' $B
If($GetMyLocation){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'My Location' $B
If($GetNearByPlacesFromText){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Placesv1,NearbyFromText' $B
If($GetElevation){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Elevation' $B
If($GetPlacesv2SearchNearBy){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Placesv2,SearchNearby' $B
If($GetPollen){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Pollen' $B
If($GetAirQualityHistory){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'AirQualityHistory' $B
If($GetAirQualityHeatMapTiles){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'AirQualityHeatMapTiles' $B
If($GetSolar){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Solar' $B
If($GetAerialView){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'AerialView' $B
If($GetTileCreateSession){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Tile,CreateSession' $B
If($GetStreetView2DTiles){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Streetview,2DTiles' $B
If($GetStreetView3DTiles){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Streetview,3DTiles' $B
If($StreetView){$B="Yes"}Else{$B=" "};$A|Add-Member NoteProperty 'Streetview' $B
$Enum+=$A
$DumpCount++
If($DumpCount-eq10){
$Enum|Export-CSV $ExportToCSV -NoTypeInformation -Ap
$Enum=@();$DumpCount=0
Write-Host "`n Dump naar "$ExportToCSV "`n"
}
}
Write-Host "Total keys " $TotalKeys
$Enum|Export-CSV $ExportToCSV -NoTypeInformation -Ap
Remove-Item $ExportRAW -Fo -ErrorA SilentlyContinue;Remove-Item $Temp -Fo -ErrorA SilentlyContinue