Giter Site home page Giter Site logo

grav-plugin-map-marker-leaflet's People

Contributors

a---- avatar arwystli avatar dependabot[bot] avatar finanalyst avatar xerif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grav-plugin-map-marker-leaflet's Issues

Address bar to filter location

Hi,

the plugin is very interesting! Do you think it is possible to add an address bar where users can type the address and the map will update to the location (AKA geocoding https://leafletjs.com/plugins.html#geocoding)?

What I'm trying to do is to add a leaflet map with your plugin in a form page of Grav, take the lat and long values (entered by the user) and send them via email together with the other values (name, surname, and other form fields).

I'm really not a php person, but I really would like to help you with this feature (if you are interested)

Thanks

Support for gpx file type.

As of now, this plugin is able to represent markers on the map but, I am wondering how to extend its functionality to support for displaying GPX track, I found a very interesting project on this link, so can we expect to have the GPX tracks on grave via this plugin.

Icon on marker doesn't work

Hello!

I use bootstrap 3 and fontawesome 4.7.
On site my icons work fine, but on map I see square (icon don't recognized).

Code:

[map-leaflet lat=46.994520 lng=142.728313 zoom=14 height=400px mapname=neighbourhood
style=neighbourhood scale ]
[a-markers markerColor="red" iconColor="white"]
[{ "lat": "46.994520", "lng": "142.728313", "icon": "home" } ]
[/a-markers]
[/map-leaflet]

My font-awesome include line in scss is @import "~font-awesome/scss/font-awesome";

Any ideas how to fix?

Just not working

Hi. I was very keen to try this out mapping the data I get from trails.io on my phone. The data export is way more complex than your example (I can provide an example) so I cut it right down to lat and lng. Actually lng lat, because that's the order in which they are supplied, buyt that shouldn't make much difference. Anyway, I created a page like your example, and then realised that there doesn't seem to be any provision to give "type":"LineString" to indicate that I wanted a route rather than a series of markers.

I then made a page that is an exact copy of your example, but instead of a map, I just saw the code displayed on the page.

My absolute ideal would be to upload the geoJSON file I receive to the server and have that displayed, probably with a different template. The file looks like this:

{"type":"FeatureCollection","properties":{"tags":[],"title":"Early morning nordic walk","creator":{"name":"Trails","version":"4.06"},"trackId":"3901229952366592057"},"features":[{ "type": "Feature", "properties": {"time":"2018-09-14T05:38:27Z", "summaryStatistics": {"AltitudeAverage": 69.896367, "SpeedAvg": 1.757111, "PaceAverage": 0.569116, "Distance": 4339.355604, "Duration": 2469.597126, "DurationWhileMoving": 2437.991642, "SpeedAvgWhileMoving": 1.779569, "StepCountCumulated": 4683.000000, "StepCountPerMinuteAverage": 114.032754, "Ascent": 52.506265, "Descent": 56.314415}, "timeline":[{"elevation": 82.153042,"course": -1.000000,"speed": 0.000000,"time": 1536903507.006996,"cumulatedDistance": 0.000000,"coordinate":[ 12.458597, 41.887436, 82.153042 ]}

And then a lot more elements in timeline until a section of geometry, which repeats lng, lat and elevation:

"geometry":{"coordinates":[[ 12.458597, 41.887436, 82.153042 ],[ 12.458542, 41.887405, 83.039211 ],

Etc, finally ending with "type":"LineString"}

I'm not sure how possible that is as I have only just started to think about working with leaflet.js and my tracks, but I'm happy to test things if need be.

Leaflet parameters

Could you please allow us to pass leaflet map creation parameters such as scrollWheelZoom. Currently we need to modify the plugin to do this.

Spacebars in marker title not showing

Demo example:

# San Fransisco Transport
[map-leaflet lat=37.7749 lng=-122.4194 zoom=13 mapname=transd style=transport-dark ]
[a-markers markerColor="lightblue"
iconColor="white"
]
[{ "lat": 37.7749, "lng": -122.4194, "icon": "home", "title": "Home Position" } ]
[/a-markers]
[a-markers icon=""]
[  { "lat": 37.775,  "lng": -122.48 , "text": 1, "draggable": true  },
{ "lat":  37.77,  "lng": -122.414 , "text": 2, "markerColor": "pink" },
{ "lat":   37.765,  "lng": -122.409, "text": 3, "spin": true },
{ "lat":   37.76,  "lng": -122.3995, "text": 4, "spin": false },
{ "lat":   37.755,  "lng": -122.499, "icon": "coffee", "markerColor": "lightred", "title": "Lovely bistro"}
]
[/a-markers]
[/map-leaflet]

Result:
image

Another example: { "lat": 37.755, "lng": -122.499, "icon": "coffee", "markerColor": "lightred", "title": "Lovely bistro one"}

Result:
image

Using markers from other pages

I'm wondering whether it would be possible to add a way to use markers from other pages, perhaps in a taxonomy category? That way, you could include custom fields to define the latitude and longitude for a page, and then show them all on a single map on another page.

Colors, icons and popups are not working anymore

I used this plugin for the past few months without any problems. Now there seem to be some issues: I can't get any colors apart from the basic ones like blue, red, green, white and so on, to work. As soon as I try something like cadetblue, salmon or darkgreen, the marker turns red.

this used to work:
[map-leaflet lat=47.395 lng=8.039 zoom=16 mapname=neighbourhood style=neighbourhood scale] [a-markers markerColor="cadetblue" iconColor="white"] [{ "lat": 47.3962, "lng":8.03759, "icon": "robot", "title": "Prozessor" }] [/a-markers] [/map-leaflet]
But now the marker is red and there's no icon. The popup appears somewhere on the map but not close to the marker. I'm not sure if the last one used to work or was styled differently.

I also tested the examples in the readme. They had the same issues.

Template "@Var:" is not defined

Can be replicated if using bad shortcode:

[map-leaflet lat=51.505 lng=-0.09 zoom=13 mapname=neighbourhood variant=neighbourhood scale ]
[a-markers markerColor="darkblue"
iconColor="white"
]
[a-markers markerColor="beige" iconColor="darkpurple"]

Safe templates for all possible frontends

v1.1.1 works without additional tricks in plain Grav.
But for using maps in Gantry on top of Grav (in page content or in particles) all output must be additionally filtered with raw filter.
partials.zip contains polished tested templates, only filter added to body

Typo?

Since OpenStreetMap provides tiles without charge, there are limitations on use and the service should not be treated with respect.

not??

Example not present

### Example
The following code is in <path to grav>/user/map/default.md

Does not in fact exist at that location or anywhere else I can find.

Plugin doesn't work with autoescape on

If you turn on auto escaping on Grav (enabled by default in Gantry themes and usually new projects):

system.yaml

twig:
  autoescape: true

The plugin stops to work. This is because of you're doing the escaping in the wrong place.

All escaping should be done inside the template files using |e filter (read twig docs on it) when the variable is outputed ({{ var|e }}' and if the variable should not be escaped, it should have |raw` in it.

Exception on rendering map

Undefined variable: tilestanza on rendering template mapleaflet.html.twig after GPM-install of plugin and attempt to use samples from readme.
And yes, this variable defined in yaml

providers:
  openstreetmap:
    tilestanza: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'

Agency + map marker leaflet = PB

Hello,

while trying to add this plugin to my Agency-derived theme, I faced an error message.
while trying the same from a fresh new Agency skeleton, I had the same issue :

Server Error

Sorry, something went terribly wrong!

### 0 - An exception has been thrown during the rendering of a template ("Failed to read plugins://map-marker-leaflet/map-marker-leaflet.yaml: Duplicate key "tilestanza" detected at line 53 (near "tilestanza: "https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png"").").

##### For further details please review your `logs/` folder, or enable displaying of errors in your system configuration.

I used the admin method, as describe here

ahref links

Hello,

Would it be possible to inject a url link so when a click is done on a marker it redirects to another page ?

Plugin installation problem

During the installation of the plugin, messages appear that everything went well. Unfortunately, the plugin does not appear to be installed. Grav version: 1.7.42.1

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.