Giter Club home page Giter Club logo

google-maps-plugin's Introduction

Google Maps plugin

It shows your clients' location at Google maps!

Installation

  1. Get the archive with the plugin sources. You can download it from the official site or build the plugin from sources.

  2. Untar/unzip the plugin's archive.

  3. Put files of the plugins to the <Mibew root>/plugins folder.

  4. Add plugins configs to "plugins" structure in "<Mibew root>/configs/config.yml". If the "plugins" stucture looks like plugins: [] it will become:

    plugins:
        "Mibew:GoogleMaps": # Plugin's configurations are described below
            api_key: "secret API key provided by Google"
  5. Navigate to "<Mibew Base URL>/operator/plugin" page and enable the plugin.

Plugin's configurations

The plugin can be configured with values in "<Mibew root>/configs/config.yml" file.

config.api_key

Type: String

Google Maps API key that will be used to render maps. You can learn how to get the key here.

Build from sources

There are several actions one should do before use the latest version of the plugin from the repository:

  1. Obtain a copy of the repository using git clone, download button, or another way.
  2. Install node.js and npm.
  3. Install Gulp.
  4. Install npm dependencies using npm install.
  5. Run Gulp to build the sources using gulp default.

Finally .tar.gz and .zip archives of the ready-to-use Plugin will be available in release directory.

License

Apache License 2.0

google-maps-plugin's People

Contributors

faf avatar justblackbird avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

google-maps-plugin's Issues

Use right IP when IP string contain more than one IP adress

Hi, my site is use free cloudflare CDN, and all users IP address in Mibew backend is x.x.x.x (x.x.x.x), we should use the IP in the parentheses.

I just review the code, and I think the problem is in this code:

            $count = preg_match_all(
                "/(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})/",
                $function['arguments']['ip'],
                $matches
            );

the $function['arguments']['ip'], can not return a IP string as x.x.x.x (x.x.x.x) format but just return the first IP (not the IP in the parentheses), but I'm not sure how to get complete IP string contain two IP address.

Lack of HTTPS support

At present time plugin calls Google Maps by http regardless of the environment. One should either switch to https for maps.googleapis.com URL or make use of the properties of the request object.

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.