Git Product home page Git Product logo

grav-plugin-leaflet's Introduction

Hi there πŸ‘‹

  • I'm presales πŸ’°:
  • I'm specialist with data and business intelligent πŸ“ˆ
  • 🌟 I was web developer ...
  • πŸ’¬ Ask me about music
  • I ❀️ to write code.
  • πŸ‘» Pronouns: cyp
  • ⚑ Fun fact: Love sticker
  • πŸͺ΄Grow up between 331 PPM & 369 PPM

My GitHub stats powered by github-readme-stats:

Magikcypress's GitHub stats

grav-plugin-leaflet's People

Contributors

cyptest avatar flaviocopes avatar magikcypress avatar neodarz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

grav-plugin-leaflet's Issues

Disabling scroll

Is there a way to disable scroll with the plugin.
For instance, I'd like to do something like described here: https://gis.stackexchange.com/questions/200189/cant-continue-scrolling-on-mobile-devices-when-a-map-occupy-all-the-screen

The aim is to prevent page scrolls resulting in map zooming

I tried adding a variable in the leaflet.php and map options but it doesn't have any effect:

...
$this->template_vars      = [
                        'id'        => $this->config->get('id') . '-' . self::$instances,
                        'width'     => $this->config->get('width'),
                        'height'    => $this->config->get('height'),
                        'class'     => $this->config->get('class'),
                        'lat'       => $this->config->get('lat'),
                        'lng'       => $this->config->get('lng'),
                        'lat_marker'       => $this->config->get('lat_marker'),
                        'lng_marker'       => $this->config->get('lng_marker'),
                        'zoom'      => $this->config->get('zoom'),
                        'address'   => $this->config->get('address'),
                        /* added dragging variable */
                        'dragging'      => $this->config->get('dragging'),
                        'scrollWheelZoom'  => $this->config->get('scrollWheelZoom'),
                        'instances' => self::$instances
                ];
...
{{ leaflet({'class': 'map', 'width': '100%', 'height': '400', 'lat': '-33.05', 'lng': '150.8', 'lat_marker': '-33.6', 'lng_marker': '150.8', 'address': 'location', 'dragging': 'false', 'scrollWheelZoom': 'false'}) }}

1.0.2? 1.1.0? release

Dont you want to release the new version?
The map is not rendered under https, as long as the css and js URL is cdn.leafletjs.com and not cdnjs.cloudflare.com.

Please release, it is a critical bug!

Multiple maps on a page

I have leaflet in my template and show a map with every page in a collection of blog items. This means that the map should be shown multiple times.

However, only the first item in the collection show a map, all next ones don't.

Looking under the hood, the second item only has the outer container div and nothing more.

Coordinates not understood with non-dot decimal separators

The French language uses β€œ,” as the decimal separator. As a consequence, when I write this:

leaflet:
    lat: 47.22536
    lng: -1.52307
    lat_marker: 47.22536
    lng_marker: -1.52307

numbers are read, and given to Javascript as 47,22536 and -1,52307 β‡’ This fails.

To make β€œleaflet” work, I had to change to this:

leaflet:
    lat: '47.22536'
    lng: '-1.52307'
    lat_marker: '47.22536'
    lng_marker: '-1.52307'

(strings instead of numbers)

Please either change all the examples accordingly (using strings), or keep numbers but force the locale to en_US or the like while inserting these numbers into the Javascript.

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.