Skip to content

Leaflet.Timedimension ; a first shot #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2015

Conversation

BibMartin
Copy link
Contributor

Not ready yet, but open for discussion ; @ocefpaf @themiurgo any comment ?

@themiurgo
Copy link
Contributor

It looks good. The only thing I would improve is putting all the html/js code in separate file(s) and handle them as small templates. This already happens in folium (see templates/polyline.js, for instance).

@BibMartin
Copy link
Contributor Author

I like having "one plugin is one file", but handling them through templates is possible and more elegant.
I've just added an env attribute in Plugin (that will be useful most probably).

Now, I cannot figure out where and how I shall put the templates:

  • Do you think I shall create one template for js and another one for html ?
  • Don't you think folium/templates may become messy if we add several new templates per plugin ?
  • Shall I createa folder folium/plugins/templates to store them ?

@themiurgo
Copy link
Contributor

These are all good questions and I don't have definite answer for all of them, but we can talk about pros/cons of each. At first thought I think, instead of "one plugin is one file" we could use it "one plugin is a directory", to get the best of both worlds. This way we keep templates dir neat and we have also a neat plugin structure. What do you think?

Probably one template for both js and html works well in this case. We might need several templates in other cases, when we add stuff to different parts of the main (root) template.

@BibMartin
Copy link
Contributor Author

Finally, I've created a timestamped_geo_json.tpl into the plugins directory and assume it won't be too messy while template names are the same as .py files.

@themiurgo
Copy link
Contributor

Good. Is the PR good to go or you want to add other stuff?

@ocefpaf
Copy link
Member

ocefpaf commented Jul 30, 2015

👍

@BibMartin I want to issue a new release with the plugin machinery (probably 0.2.0, or maybe 1.0.0 😉). Can you give me a roadmap of your thoughts on the plugins? What else are you planning to do?

@themiurgo
Copy link
Contributor

I would say, once we put to work a few plugins (3-4), we will merge this into master, and that's when we can release the new version.

@BibMartin
Copy link
Contributor Author

@themiurgo : I'm okay for this PR ; and just squashed everything.

@ocefpaf :

I want to issue a new release with the plugin machinery (probably 0.2.0, or maybe 1.0.0 😉).

I would vote for 0.2.0 if you go now ; 1.0.0 being when we have a stable plugin structure, solved #135, and cleaned-up the code (for example clusterMarker are implemented twice today).

Can you give me a roadmap of your thoughts on the plugins? What else are you planning to do?

I'm afraid I cannot be very precise. I'm in holiday right now and I'm not even sure I will keep the pace.
My future thoughts are listed above (more plugins, clean code, #135). For the moment I just have in mind to "pluginify* this: http://apps.socib.es/Leaflet.TimeDimension/examples/example10.html, so that we would have a plugin version of imageOverlay also.

@BibMartin
Copy link
Contributor Author

Check failed due to fit-bounds. Do I have to cherry-pick 8271a80, or is this ugly ?

@ocefpaf
Copy link
Member

ocefpaf commented Jul 30, 2015

Check failed due to fit-bounds. Do I have to cherry-pick 8271a80, or is this ugly ?

Nope. It is good as is.

I would vote for 0.2.0 if you go now

OK. Done in #159

for example clusterMarker are implemented twice today.

😱

I'm afraid I cannot be very precise. I'm in holiday right now and I'm not even sure I will keep the pace.

I said we had one rule but in fact we have two:

  • Avoid self-merges.
  • Enjoy your holidays!

@BibMartin
Copy link
Contributor Author

😆

@themiurgo themiurgo mentioned this pull request Jul 30, 2015
@BibMartin
Copy link
Contributor Author

To get ready for 0.2.0, I would suggest:

  • Merge this PR on the branch. Is there something missing for this ?
  • Merge the plugins branch on master. I've never done that ; one shall do the merge locally and a PR on master, isn't it ?
  • Tackle Refactor image_overlay() as a plugin #158. It's gonna be easier on the merge result.

themiurgo added a commit that referenced this pull request Aug 1, 2015
@themiurgo themiurgo merged commit 53de04b into python-visualization:plugins Aug 1, 2015
@themiurgo
Copy link
Contributor

Once we merge plugins to master, #158 would be just as urgent as other optional features that have been introduced in folium, e.g. awesome markers and so on. We probably need to make a list of what we want to convert to a plugin and find out what is the folium core.

@ocefpaf
Copy link
Member

ocefpaf commented Aug 1, 2015

... and find out what is the folium core.

You guys are basically fixing 1 year of (my-)bad development 😉

@themiurgo
Copy link
Contributor

Don't be so hard on you @ocefpaf , we are all trying to find what is folium and how to improve it 👍

@BibMartin
Copy link
Contributor Author

👍

@BibMartin
Copy link
Contributor Author

We probably need to make a list of what we want to convert to a plugin and find out what is the folium core.

@themiurgo : I agree. To me folium is something that "puts object on a map", but every object is not a plugin even though one can compute them the same way. Maybe we shall list them, decide what's core and what's plugin ; it will also benefit to documentation.

@BibMartin BibMartin deleted the plugins branch December 7, 2015 11:03
@bakerbd
Copy link

bakerbd commented Apr 20, 2016

Is there a way that we could make this a little more general. timeDimension for any given layer (imageOverlay, WMS layer, geojson what have you)

@ocefpaf
Copy link
Member

ocefpaf commented Apr 20, 2016

Is there a way that we could make this a little more general. timeDimension for any given layer (imageOverlay, WMS layer, geojson what have you)

There are ways and we would love to have that. Are you interested in tackling this problem?

@bakerbd
Copy link

bakerbd commented Apr 20, 2016

I may try to give it a wack but I'm new to folium and am still learning the overall flow of how the program is structured

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants