Giter VIP home page Giter VIP logo

Comments (5)

guilherme-andrade avatar guilherme-andrade commented on May 29, 2024

Hi @jamwithsam,

It's not going to be easy for us to help you with this one, but we'll try.

Fixing Idea/ Proposal submission

Before you submit that idea on a map, open the browser inspector tool, click on the Console tab, and only then submit the idea. Do you see any error messages? If yes, do you see an "API key not activated" error?

We've had another deployment fail here in similar conditions, with an "Api Key Not Activated" error relative to GOOGLE_MAPS_API_KEY. If this is the case for you too, please make sure to activate your google maps API key in your google console. You probably have to add credit card details to make that happen.

The other option is not to have an api key at all. This will disable maps posting, but should run without issues. Let us know if not.

Changing Tile Provider

To change tile providers we do not have a guide yet, but here's something you can do:

  1. Get a tile url, from this source for example. Pick any value from the "tiles url" column.

  2. Change the fallback tile provider in the Front-End
    In front/app/components/UI/LeafletMap/config.ts change the value of DEFAULT_TILE_PROVIDER to "<your tile provider>".

  3. Apply this tile provider in the Back-End.

docker-compose run web rails c
# to change the default tile provider for the whole app
settings = AppConfiguration.instance.settings
settings['maps']['tile_provider'] = "<your tile provider url>"
AppConfiguration.instance.update(settings: settings)

# to change all project map configs
CustomMaps::MapConfig.update(tile_provider: "<your tile provider url>")

# or for 1 project
project = Project.find('<id of the project to change>')
project.map_config.update(tile_provider: "<your tile provider url>")

Not that if the return value of any of these operations is false, then something went wrong.

Let us know if this solved your issue!

from citizenlab.

jamwithsam avatar jamwithsam commented on May 29, 2024

Hello,

Thanks for the in-depth and thorough reply @guilherme-andrade. However I am still having issues with the map not displaying correctly and submitting an idea via the interactive map. What google maps APIs should be enabled to allow the map function working as showcased in your demo platform? I have enabled a few after googling around in addition to adding billing to activate the APIs but to no avail.

from citizenlab.

nTraum avatar nTraum commented on May 29, 2024

Hey @jamwithsam, do you still experience the issue?

from citizenlab.

jamwithsam avatar jamwithsam commented on May 29, 2024

Hey @nTraum, unfortunately the issue still exist even after different google map APIs configurations. Haven't tried it since but if you have any suggestions, I would like to try it again.

from citizenlab.

nTraum avatar nTraum commented on May 29, 2024

Hey @jamwithsam Do you have the application running somewhere where I could try this out? Are there any errors in the JS console of the browser?

from citizenlab.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.