Results 1 to 5 of 5

Thread: [RESOLVED] ucGMap.ctl (Implementation of the Google-Static-API by Schmidt) ERROR

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    92

    Resolved [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
    Name:  Error-ucGmap.jpg
Views: 944
Size:  31.4 KB

  2. #2
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,253

    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

  3. #3
    Fanatic Member DrUnicode's Avatar
    Join Date
    Mar 2008
    Location
    Natal, Brazil
    Posts
    631

    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

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    92

    Re: ucGMap.ctl (Implementation of the Google-Static-API by Schmidt) ERROR

    Quote Originally Posted by DrUnicode View Post
    Adding "On Error Resume Next" seems to fix this.
    Yes ... but sometimes on top-right appear
    Code:
    Map error: g.co/staticmaperror
    Name:  2018-03-21_080940.jpg
Views: 345
Size:  16.1 KB

    This is the string:
    Code:
    http://maps.googleapis.com/maps/api/staticmap?sensor=false&format=jpg&center=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.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    92

    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
  •  



Click Here to Expand Forum to Full Width