-
Mar 20th, 2018, 08:50 AM
#1
Thread Starter
Lively Member
[RESOLVED] ucGMap.ctl (Implementation of the Google-Static-API by Schmidt) ERROR
I try to use ucGMap.ctl from here:
http://www.vbforums.com/showthread.p...=1#post4641473
... but sometimes runs with error
Code:
"Runtime Error '5': Invalid Procedure Call or Argument"
Code:
Private Function ReadTagContent(sXML As String, Tag As String) As String
Dim Result As String
Result = Mid$(sXML, InStr(sXML, "<" & Tag & ">") + Len(Tag) + 2)
Result = Left$(Result, InStr(Result, "</" & Tag & ">") - 1)
Result = Replace(Replace(Result, vbCr, ""), vbLf, "")
ReadTagContent = Trim$(Result)
End Function
-
Mar 20th, 2018, 09:08 AM
#2
Re: ucGMap.ctl (Implementation of the Google-Static-API by Schmidt) ERROR
So, what's the value of the 'Result' variable at that point? That should give you a clue as to what went wrong...
If you don't know where you're going, any road will take you there...
My VB6 love-children: Vee-Hive and Vee-Launcher
-
Mar 20th, 2018, 09:47 AM
#3
Re: ucGMap.ctl (Implementation of the Google-Static-API by Schmidt) ERROR
Adding "On Error Resume Next" seems to fix this.
Code:
Private Function ReadTagContent(sXML As String, Tag As String) As String
Dim Result As String
On Error Resume Next
Result = Mid$(sXML, InStr(sXML, "<" & Tag & ">") + Len(Tag) + 2)
Result = Left$(Result, InStr(Result, "</" & Tag & ">") - 1)
Result = Replace(Replace(Result, vbCr, ""), vbLf, "")
ReadTagContent = Trim$(Result)
End Function
-
Mar 21st, 2018, 01:14 AM
#4
Thread Starter
Lively Member
Re: ucGMap.ctl (Implementation of the Google-Static-API by Schmidt) ERROR
Originally Posted by DrUnicode
Adding "On Error Resume Next" seems to fix this.
Yes ... but sometimes on top-right appear
Code:
Map error: g.co/staticmaperror
This is the string:
Code:
http://maps.googleapis.com/maps/api/staticmap?sensor=false&format=jpg¢er=44.3166468,23.7954246&zoom=18&size=640x640&maptype=roadmap&markers=icon:https://XXXXXX.ro/PinBloc.png%7Ccolor:0x00FF00%7Clabel:B%7C44.316626, 23.795416
Last edited by cliv; Mar 21st, 2018 at 01:28 AM.
-
Mar 21st, 2018, 02:09 AM
#5
Thread Starter
Lively Member
Re: ucGMap.ctl (Implementation of the Google-Static-API by Schmidt) ERROR
Strange. It looks like the message requires a key api
Code:
<GeocodeResponse> <status>OVER_QUERY_LIMIT</status> <error_message>You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console:
I register a new key and added but now not work at all.
Now i try in URL in browser and message is :
Code:
The Google Maps API server rejected your request. This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console
But in console every api is enabled...
SOLVED
You need to go to console.developers.google.com -> select your key -> Library -> Maps -> Then enable Google Static Maps API
WARNING:
the sensor parameter is no longer required. Remove sensor=false
Code:
SensorNotRequired Warning
The sensor parameter is no longer required for the Google Maps JavaScript API. It won't prevent the Google Maps JavaScript API from working correctly, but we recommend that you remove the sensor parameter from the script element.
https://developers.google.com/maps/d...error-messages
Last edited by cliv; Mar 21st, 2018 at 02:50 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|