Menu

Googlemap problems

GaryT
2021-04-14
2021-04-19
  • GaryT

    GaryT - 2021-04-14

    I've finally managed to install the googlemaps module, but I'm still having a couple of issues:
    The first is that I'm a little nervous about setting up a billing account to do so. Hopefully I'll get my head around that eventually.
    The second is that that came as a bit of a surprise as there is no mention of billing in the Wiki. I guess that could do with updating. Would that be something I could help with?
    There's also no details about what the key needs to do. I guess it would make sense to restrict it, for added security?
    So - at the moment I have an API key, but no billing set up.
    If I click on (Edit geographic place locations) I get this error:

    > > Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' in /.../includes/classes/class_pgv_db.php:848 Stack trace: #0 /.../includes/classes/class_pgv_db.php(848): PDOStatement->execute(Array) #1 /.../modules/googlemap/places.php(99): PGV_DBStatement->__call('execute', Array) #2 /.../modules/googlemap/places.php(589): get_place_list_loc(0) #3 /.../module.php(96): require_once('/..') #4 {main} thrown in /.../includes/classes/class_pgv_db.php on line 848
    

    (my website edited to '...')
    Is this related to not having activated billing? or something else?

    If I then tick 'show inactive' and (view), I get into the places page. If I edit a place, or add a new one, I get a map with the 'This page can't load Google Maps correctly.' message, and a greyed map, which is understandable, given the billing issue.

    But - if I type a name into 'Place' and search all, I only ever get 'No places found', whatever I enter. I got the impression from the wiki page that the search wasn't related to google. Or is it?

    TIA.

     
  • Gerry Kroll

    Gerry Kroll - 2021-04-14

    I don't use Googlemaps. Too much trouble.

    According to the Googlemaps site: https://cloud.google.com/maps-platform/pricing The first $200 of usage per month is free. The cost is $2.00 per 1,000 requests.

    I have no idea what's causing the collation error. I suggest that you tell PhpGedView to NOT use database collation. That's in the site configuration.

     
  • GaryT

    GaryT - 2021-04-15

    Thanks Gerry.
    Did you mean the setting "Use the database to provide UTF-8 collation"? That was set to 'no'.
    I realise the first $200 is free. But there's nothing to say that might suddenly go away. $200/month is a lot of $$$. I guess it's also a lot of data, and unlikely unless I get hacked.

     
  • GaryT

    GaryT - 2021-04-15

    I didn't know anything about collations. I've learnt something.
    I delved into the tables. It turns out the pgv_placelocation tables varchars had utf8_unicode_ci collations and the pgv_places varchars were utf_general_ci. I changed the collation on the places database and the error went away. Perhaps the collations weren't explicitly specified when the tables were created?

     
  • Tomasz Babczyński

    It looks like a bug in tables creation. Could you drop a ticket about it? I have no time to deal with it now and afraid that I will not remember when I will upgrade the API (v2->v3) in the undefinable future.

     
  • GaryT

    GaryT - 2021-04-19

    Now that I realise I was using the wrong version of googlemaps, I can't be sure if it was a bug or my fault.

     
  • Gerry Kroll

    Gerry Kroll - 2021-04-19

    Let's blame it on trying to use the wrong version, and keep our fingers crossed.

    By the way:
    The "translations" forum is the wrong place for this discussion. It should have been in the "Help" forum. I'm not going to move this thread.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.