Giter Club home page Giter Club logo

craft-geoaddress's Introduction

OYM - Geo Address plugin for Craft CMS 5.x

Geo Address field for Craft CMS.

Requirements

This plugin requires Craft CMS 5.0.0 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require oym/craftplugin-geoaddress
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for OYM - Geo Address.

  4. In the Control Panel, go to Settings → Plugins and click the “Settings” link to insert your Google Maps Geocoding API key to increase the allowed API calls.

  5. Copy and rename the file geoaddress-sample.php to [your craft directory]/config/geoaddress.php and include the countries you want enabled. It is required to provide at least one country.

craft-geoaddress's People

Contributors

jeffreyschmitz87 avatar jerome2710 avatar jordikroon avatar mathg avatar ul8 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

craft-geoaddress's Issues

Type Error (critical)

When using the field I cannot save any entry due to this error:

tde\craft\geoaddress\services\GeoAddressService::getCoordsByAddress(): Argument #2 ($country) must be of type string, null given, called in path-to-project/app/vendor/tde/craftplugin-geoaddress/src/fields/GeoAddressField.php on line 72

Screenshot 2023-10-25 at 11 25 54

I am using a valid Google Maps key, which I entered in the plugin settings.

Craft 4.5.9
Plugin 2.0.0

Dropdown does not show countries, save fails

I installed your plugin and added the API key. Then I added the API key and created a field.

When saving a entry with that field, I get the following error:

PHP Warning – yii\base\ErrorException
file_get_contents(https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=%7B%22street%22%3A%22R%5Cu00fcdigerstrasse+10%22%2C%22zip%22%3A%228004%22%2C%22city%22%3A%22Z%5Cu00fcrich%22%7D&key= AIzaSyCF1qrSsNVGmx4sgsJ0gDx95Q-HqZD9QhE): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request

The dropdown for the country does not shiow any entries.

Address field is not a valid GraphQL field

When using the address field with the GraphQL Api, the output built from the field looks like a GeoAddress model and can't be read from GraphQL. Ideally it would be possible to split the object with subfields to extract.

{ "message": "String cannot represent value: instance of tde\\craft\\geoaddress\\models\\GeoAddressModel", "extensions": { "category": "graphql" } }

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.