truemagic-coder / meteor-leaflet Goto Github PK
View Code? Open in Web Editor NEWLeaflet.js for Meteor.js
Leaflet.js for Meteor.js
Integrate https://www.npmjs.com/package/geojson
should include leaflet locate-control in this repo (using npm) - very handy when creating map apps.
https://github.com/Leaflet/Leaflet.draw
Drawing vectors - hmm - maybe?
https://github.com/stefanocudini/leaflet-search
https://www.npmjs.com/package/leaflet-search
I use this in all my map apps.
This was brought up in #28 - maybe it should be built in as a helper - maybe I could have a custom collection type? Not sure.
complete project features as a go to make easier.
This leads to much better versioning. That being said as Meteor puts images in a custom folder has to keep using my modded css file (maybe).
The mrt version was the pre 1.0 version of this package - it wasn't showing up in atmosphere but in google - so I un-migrated it again. And filed 2 issues with Meteor meteor/meteor#4687 & meteor/meteor#4686
Running meteor 1.0.5 - while attempting to install the plugin - $ meteor add beavanhunt:leaflet
received the following -
=> Errors while parsing arguments:
While adding package beavanhunt:leaflet:
error: no such package
The most user requested feature #1 - it is about time it was built-in to this library.
As a result of meteor discontinuing their free hosting.
I don't know how to replicate the error, but one day the marker just shows a missing image icon.
Here is the code in the .js file:
var maxZoom = 18;
var latlng = null;
var marker = null;
L.Icon.Default.imagePath = 'packages/bevanhunt_leaflet/images';
map = L.map('map', { //map is a global variable
center: [56.00, 10.00],
zoom: 5
});
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA',
maxZoom: 18
}).addTo(map);
//register eventlistener to map
map.on('click', function(e) {
latlng = e.latlng;
var zoom = map.getZoom();
//if zoom is equal or less than 18
if(zoom < maxZoom){
map.panTo(latlng);
map.setZoom(map.getZoom()+2);
}
if(zoom == maxZoom){
if(!marker){
marker = L.marker(latlng).addTo(map);
}else{
map.removeLayer(marker);
marker = L.marker(latlng).addTo(map);
}
}
});
It seems like the path 'packages/bevanhunt_leaflet/images' stopped working, because when I moved the images to the projects public folder, the pointer showed up again.
nothing says awesome map app more than having custom markers. My only concern is the deps - best to keep this as a separate repo/meteor lib. See https://github.com/bevanhunt/meteor-leaflet-awesome-markers/issues/3
Hi,
Any ideas on how to render a meteor template into a popup (I also want events bound on the template to work)?
I'm unable to open a popup with a dom fragment `frag = Meteor.render(Template.details(an_event)).
Cheers,
Write basic guide - good reference for myself and team members.
After upgrading to V0.7.3 the layer control icon has disappeared.
I do have layers.png, layer-icon.png and [email protected] in /public/images as before, but the icon does not show on the map anymore.
Any idea's ?
Errors while initializing project:
While building package bevanhunt:leaflet:
error: No plugin known to handle file 'images/layers-2x.png'. If you want this
file to be a static asset, use addAssets instead of addFiles; eg,
api.addAssets('images/layers-2x.png', 'client').
error: No plugin known to handle file 'images/layers.png'. If you want this
file to be a static asset, use addAssets instead of addFiles; eg,
api.addAssets('images/layers.png', 'client').
error: No plugin known to handle file 'images/marker-icon-2x.png'. If you want
this file to be a static asset, use addAssets instead of addFiles; eg,
api.addAssets('images/marker-icon-2x.png', 'client').
error: No plugin known to handle file 'images/marker-icon.png'. If you want
this file to be a static asset, use addAssets instead of addFiles; eg,
api.addAssets('images/marker-icon.png', 'client').
error: No plugin known to handle file 'images/marker-shadow.png'. If you want
this file to be a static asset, use addAssets instead of addFiles; eg,
api.addAssets('images/marker-shadow.png', 'client').
Hello, I'm loving using this package for my app but running into a challenge with limiting the collection based on what's displayed on the map. Essentially I would like to pan/zoom around the map and have the collection items listed along side the map limited to just the markers that are displayed on the map.
Can anyone help out with how I would do this conceptually?
Thanks
Simply running "mrt add leaflet" will install meteor-leaflet at version "v0.1.8". I don't know what the best move is; update atmosphere, or to update my project with a custom github commit ref?
Leaflet 0.6.2 was released on June 28, 2013 and 0.5.1 was released on February 6, 2013.
Hi there,
I am currently using your package (thanks by the way !) and trying to add a nice fly effect when I change map position. On leaflet doc, I found the flyto method but it seems that it is only available from leaflet 1.0.0.
When I try to access it with your plugin I get 'Uncaught TypeError: map.flyTo is not a function'. I think it's because I am using leaflet 0.7.7...
In the doc you mention the 1.0.0-beta2 version of leaflet associated to your plugin version 1.3.1.
Should I downgrade to 1.3.2 to use flyTo ?
If not, what should I do to use the flyto method ?
Thank you
Control Layers (http://leafletjs.com/reference.html#control-layers) assume that layers.png is in styles/images/.
I fixed it adding api.add_files('styles/images/layers.png', 'client'); to package.json and copying layers.png file.
Hope this note can help.
Please make a pull request against the gh-pages
of the Leaflet repo, in order to include meteor-leaflet in http://leafletjs.com/plugins.html#frameworks--build-systems
I use this in all of my apps and I think most users would want it included - very handy.
Hi, as I see it there's the wrong version number in the leaflet.js file (in the comment in the head)?
It says 1.7.1 but should be 0.7.1 I think (as that's the leaflet library's version, right)?
Its visible in the minified sourcecode below the comment as well.
Thanks and best wishes!
Include them as deps in this package.
The ability to animate markers enables a whole new set of applications that can be built. This combines well with Meteor's real-time collections. This is the link ot the library https://github.com/openplans/leaflet.animatedmarker
Hey
will you update the package to the new meteor package system?
and maintain the package?
I could help if you need some.
layers.png file path on client is:
url(packages/bevanhunt_leaflet/styles/images/layers.png)
but actual path is packages/bevanhunt_leaflet/images/layers.png
https://www.npmjs.com/package/leaflet-geojson-stream
Should build a similar feature but different code for this project.
Huge performance improvements - contains breaking changes - so should up this package to 1.0.0 - must test locally with all other included libraries.
My app has some strange zooming behaviour: when zooming out, the drawn polygon moves south-east and returns to its correct postion when the zoom operation ends. When zooming in, the drawn polygon moves north-west and returns to its correct postion when the zoom operation ends.
this is my app:
Template.map.rendered = function() {
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: "© <a href='http://openstreetmap.org/copyright'>OpenStreetMap</a> contributors"
}).addTo(map);
var polygon = L.polygon([
[51.509, -0.08],
[51.503, -0.06],
[51.51, -0.047]
]).addTo(map);
};
If I replace your (V1.0.0 beta2) package bevanhunt:leaflet with fuatsengul:leaflet (V0.7.3) everything is ok again.
Probably nothing to do with your package, but I could not find this problem in the leaflet github issues.
Any suggestions?
There is a leaflet map using div tag inside a slide within a slide box. The map shows up but will not allow any panning although zoom works. This looks like the swipe ability of the slide box is interfering with the swipe of the map. The swipe for the slide box has been disabled using the slide box delegate's enableSlide method. Remove slide box tags and the map can pan. This is within an angular-meteor app using ionic and bevanhunt:leaflet package.
https://forum.ionicframework.com/t/unable-to-pan-a-leaflet-map-inside-an-ionic-slide-box/38280
I had the issue, that without adding the style:
#map {
min-height: 350px;
min-width: 100%;
}
my <div id='map' class="map"></div>
would not show up. Maybe its good to add this to the documentation?
Would be nice to have only one, well-maintained, Leaflet package on Atmosphere, similar to the Bootstrap-3 initiative.
CC @boustanihani, author of https://github.com/boustanihani/meteor-leaflet
CC @Ore4444 of https://github.com/Ore4444/meteor-leaflet/ (last update 1yr ago)
Authors who no longer wish to maintain their package can hide them from Atmosphere search results while still letting them be installable by existing apps and dependent packages by running
meteor admin set-unmigrated
There's a leading /
missing in the README on line 48:
L.Icon.Default.imagePath = 'packages/bevanhunt_leaflet/images/';
It should read as: /packages/bevanhunt_leaflet/images/
. If I add this leading slash then it fixes the problem I was seeing where the icon was not being found.
Support both current 1 beta2 and 0.7.7 - make sure to update readme.
after I'm added this pkg in place of old leaflet 0.7.3, show this error in console at startup:
Uncaught TypeError: Cannot read property 'trim' of undefined
old commit for latest version 0.3.8 in mrt smart.lock. styles css have not been changed
Anyone run into this issue?
TypeError: latlng is undefined meteor.js:888:11
L.Projection.SphericalMercator.project@http://127.0.0.1:8000/packages/bevanhunt_leaflet.js?b696c1f6418c4dcd41cddbe44d079f0c00516fcf:1475:7
Integrate this library https://atmospherejs.com/meteorhacks/inject-initial
Idea from https://github.com/waeltken/leaflet-prefer-canvas/
cc @Waelken
Leaflet-distance-marker requires leaflet.geometryutils.js
The problem is that I don't know how to import meteor-leaflet and use it in this other package (leaflet.geometryutils.js).
Uncaught Error: Cannot find module 'leaflet'
at require (modules-runtime.js?hash=0969a31…:133)
at leaflet.geometryutil.js:9
at meteorInstall.client.lib.js.leaflet.geometryutil.js (leaflet.geometryutil.js:2)
// Node/CommonJS
// L = require('leaflet'); // this is default, but provides above error
L = require('meteor/bevanhunt:leaflet'); //this does not work either
console.log(L);
module.exports = factory(L);
Hi
This could be a noob question, but i just cant make my map appears.
it should be simply but it dont works.
here is the link to the repo.
https://github.com/Ethaan/mexico-tourism
and more further here is the .js file.
and the .html
If you have the time and clone this repo and run it, and then inspect the element you will see that the map is there loaded on the html, but it dosnt show up.
Bests
For Meteor 0.9.0 the public images path has changed. The mrt:leaflet module generally works but the marker images are missing.
I have configured:
L.Icon.Default.imagePath = 'packages/leaflet/images'
which is not working any more. Until now I couldn't find a working path for the images in the migrated leaflet package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.