Open-event-frontend: google API key for geocoding exceeded usage limits

Created on 16 Oct 2019  路  10Comments  路  Source: fossasia/open-event-frontend

The eventyay.com google API key for geocoding has exceeded its usage limits. When creating an event, filling in the "Location" field, it's showing error message "This page can't load google maps correctly" :

Screenshot 2019-10-16 at 00 32 42

This in turn prevents the creation of an event in a fairly unclear way. Fill in the rest of the fields and it refuses to "Save draft" saying "Location is required"

To Reproduce
Steps to reproduce the behavior:

  1. Click to "create event" : https://eventyay.com/create
  2. Start typing in the "Location" field.

Expected behavior
It should try to geocode the textual location maybe as you type.

...although really that's a nice-to-have feature. The site would at least be functional if you could simply type in location details without that blocking on the google maps request.

Additional details (please complete the following information):

  • Tested in Chrome and Safari

Additional context
You should switch to use OpenStreetMap (e.g. via OpenCageData for geocoding)

bug help-wanted

All 10 comments

@harry-wood You can always enter the address manually by clicking on Enter Address.
Regarding G-Map Key:
cc: @iamareebjamal @mariobehling

Let's move this to frontend. And yes, it should not block in any case.

We should also switch to OpenStreetMap or MapBox dynamically with whatever key is provided.

Opened #591 and #3564 as child issues

Point to note: We are using Ember-g-map which significantly reduces our task for map. And for OSM there is no package support for ember so it would have to be done from scratch.

Again, let's not do dependency based development where if there is no dependency for a thing, we are not going to develop for it. It has been extremely detremental for server and making it client agnostic because of this approach of frontend.

And it makes for a worse user experience as well. It takes 7 seconds to load eventyay.com, where it could takes just shy of a second. A lot of those problems are tied to use whatever's easier for frontend and sacrifice the user experience. We need to move run in opposite direction.

It's trivial to integrate maps and autocomplete in even pure JS. It shouldn't matter if there is no package for it. That's why frameworks are bad and libraries are better. There were no packages for a lot of things in server, we didn't say we're not going to add event invoices because there is no flask-event-invoice package.

https://github.com/asennikov/ember-g-map

We are not using 90% of its features, we are just showing a map. You know how easy is it?

<body>
    <div id="map"></div>
    <script>
      var map;
      function initMap() {
        map = new google.maps.Map(document.getElementById('map'), {
          center: {lat: -34.397, lng: 150.644},
          zoom: 8
        });
      }
    </script>
    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
    async defer></script>
  </body>

We are pulling in entire dependency to replace 1~2 lines of code.

Besides, this issue is about geocoding, which ember-g-map does not even provide, it's just a map renderer

It's trivial to integrate maps and autocomplete in even pure JS. It shouldn't matter if there is no package for it. That's why frameworks are bad and libraries are better. There were no packages for a lot of things in server, we didn't say we're not going to add event invoices because there is no flask-event-invoice package.

Very well said, our app is already bloated with too many dependancies.

You can always enter the address manually by clicking on Enter Address

Are you sure? I tried that. Something was preventing me creating an event ("Save draft" button). Anyone else managing to create events at the moment?

You can always enter the address manually by clicking on Enter Address

Are you sure? I tried that. Something was preventing me creating an event ("Save draft" button). Anyone else managing to create events at the moment?

Yes, When you will click on the following, Address dialogue will be expanded and you can enter address manually.
Screenshot 2019-10-16 at 5 24 15 PM

PS: I tried making an event live, its working

Closed in favour of #3564

Was this page helpful?
0 / 5 - 0 ratings