Comments (6)
From @tombatossals on December 29, 2014 12:20
Hi @rtp-calpoly, really nice plugin MovingMarkers, I think it would be great to integrate it with angular-leaflet-directive.
I have registered some unregistered projects in bower, there's no problem about that. You could notice the author in github about this after that, he/she will agree with it for sure.
Unfortunately there's no guide about integrating plugins, some of them are really easy to integrate and others more complicated. I think this would be not much complicated, we can talk about how to integrate it here if you want.
First of all, I would decide how are you going to declare the movement inside a marker object, and after that, you can make use of the MovingMarker plugin to accomplish it. What do you think about this as a starting point?
markers: {
london: {
lat: 51.5,
lng: 0,
movement: {
path: [{
lat: 51.507222,
lng: -0.1275
}, {
lat: 48.8567,
lng: 2.3508
},
duration: 4000
}
}
}
If you like it we can continue integrating it inside angular-leaflet.
from ui-leaflet.
From @rtp-calpoly on December 29, 2014 19:35
HI @tombatossals!
First of all, thanks for the quick reply and for the help! I think that the steps that you propose are the proper ones, so I will try to register the MovingMarker project within Bower as a first step.
For the structure, it looks good but I would also include the following options:
- moving markers require the durations in between all the points of the path, therefore movement.duration should better be an array;
- this library permits the following additional boolean parameters: loop and autostart;
- I am also binding a label to the moving markers, so maybe including the options for the standard marker could also be an asset;
- the initial latlng for the marker is the first element of the positions array.
Pretty much, the structure should look like your original one:
markers: {
london: {
label: {
message: "Moving marker",
options: {
noHide: true
}
},
movement: {
path: [{
lat: 51.507222,
lng: -0.1275
}, {
lat: 48.8567,
lng: 2.3508
}],
durations: [
4000
]
}
}
}
Let me know what you think. I have already taken a look at your code for the angular-leaflet-directive project and my idea is to use the way you integrate the markers as an example. Do you think that that would be a good example to follow?
from ui-leaflet.
From @tombatossals on December 30, 2014 7:42
It looks perfect to me, I only would re-add the "lat/lng" properties with the marker starting point into the marker root, so a moving marking could be compatible with a static marker, and viceversa. Maybe it's redundant but this way we will not need to change actual markers code. So this could be the structure:
markers: {
london: {
lat: 51.507222,
lng: -0.1275,
label: {
message: "Moving marker",
options: {
noHide: true
}
},
movement: {
path: [{
lat: 51.507222,
lng: -0.1275
}, {
lat: 48.8567,
lng: 2.3508
}],
durations: [
4000
]
}
}
}
Next step would be what you say, make a simple example with the new marker structure, and after that make it work :)
- Add MovingMarkers into bower.json
- Create the example: "markers-moving-markers-example.html" (or some name like that).
- Start coding.
I'm going to create a new branch into the project calling "movingmarkers". We could start pushing code there if this looks good to you.
from ui-leaflet.
From @rtp-calpoly on December 30, 2014 7:49
Ok, looks great! I have already forked the repository and sent a message (through an issue) to the owner. I will start working on my forked code and, if in a couple of days I do not receive a reply, I will try to reach him through email directly.
Thanks for the advices! It looks like a good plan!
from ui-leaflet.
From @jar04h on August 11, 2015 11:51
Hi ya'll. What is the status on this? I saw a commit to a branch named movingmarkers (afce4c5) but nowhere could I find the documentation on how to use the MovingMarker plugin with the ng-leaflet directive.
Sincerely,
from ui-leaflet.
From @rtp-calpoly on August 12, 2015 6:40
Hi all,
I actually stopped working on this issue since I found it a bit complicated for the amount of time that I can potentially spend on it.
Best, Ricardo.
from ui-leaflet.
Related Issues (20)
- leafletData.getDirectiveControls
- Dynamically add data to geoJSONShape HOT 1
- Migration to Angular 4 HOT 1
- Changin markers on scope, the model is different HOT 2
- Markers not showing in second (or more) maps HOT 4
- Travis CI seems to be broken HOT 1
- Add Custom Styles To Google Maps
- layercontrol - More than 1 map on the DOM
- IE 11: US Map mouse over highlighting beside state(s)
- <Security Issue> Slack token need to be encrypted
- Fitbounds and markercluster zoom issue
- Marker in not updating its position on the map, when its value is updated
- Nor working in angular 1.6.4 HOT 2
- Popup closes when changing marker icon
- ui-leaflet analog for bindLabel functionality? HOT 1
- Could anyone propagate this commit to the 2.0.x tag version?
- MBTiles
- Disable auto center adjust after change marker coordinates programmatically
- Is this project still active ?
- Issue with Clickable Marker Content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui-leaflet.