Giter Club home page Giter Club logo

windy-plugin-template's Introduction

Windy Plugin Template

Template for development of Windy Plugins.

Documentation at: https://docs.windy-plugins.com/

CHANGELOG

  • 3.0.0
    • Updated @windycom/plugin-devtools for client v42.2.0
  • 2.0.0
    • Completely new version of the plugin system based in Windy client v42+
  • 1.0.0
    • New rollup compiler, no more riot architecture
    • Updated examples for Windy client v39
  • 0.4.0
    • Added plugin-data-loader to the Plugins API
  • 0.3.0
    • Examples moved to examples dir
  • 0.2.0
    • Fixed wrong examples
  • 0.1.1
    • Initial version of this repo

windy-plugin-template's People

Contributors

davidryzec avatar ilblog avatar jirifranc avatar kant avatar mdorda avatar nesro avatar rittels avatar tomaszamecnik avatar vicb avatar vrana avatar

Stargazers

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

Watchers

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

windy-plugin-template's Issues

HelloWorld not working

When trying to load the Hello World example, the log console returns this:
Unhandled Promise Rejection: TypeError: map.getCenter is not a function. (In 'map.getCenter()', 'map.getCenter' is undefined)

onopen / onclose events

I have developed a plugin which is anchored to the context menu.

When the plugin is opened and closed explicitly (clicking on the close icon) the sequence of events is:

  • open
  • close

no surprise here.

However if the plugin is opened and re-opened at a different place, the sequence of event is

  • open
  • open -> no close before the second open.

This is a bit surprising and make it harder to track resources.

I think this should be fixed ?

I notice this because there is a store.on("product") called from my onopen which gets registered multiple times as the plugin is re-opened at a different location.

At first this would trigger multiple data loads when the plugin was re-opened multiple times - and this would keep going even after the plugin is closed. Until I found store.off()

My suggestions for fixing this:

  • better document store.off() ?
  • wrap the store instance and pass it to onopen. The wrapped instance would automatically cancel subscriptions when the plugin is closed.

Windows issue

V39: In compiler.js, in reloadConfig function:

async function reloadConfig() {
    const { default: dir } = await import(path.join(__dirname, srcDir, 'config.js'));
    ....

change to:

const { default: dir } = await import(path.join( 'file:', __dirname, srcDir, 'config.js'));

Examples 2 and 3 don't work

Examples 2 and 3 (window on left|right side) don't work anymore. They just display an empty space on left or right side. Their names show in the More layers menu but that's about it.

left
right

NAM forecasts in continental US ("namConus")

While both GFS and ECMWF forecasts seems to have a origTs field in the forecasts data that match the TS in the airData NAM doesn't.

For "namConus" ts and origTs are set to the same value.

Not sure if this is a bug or intended behavior as the doc is sparse.

It would be great to have a descriptions of all the forecast and air data (i.e. "namConus" does not provide "gh-...").

Coding convention

It would be nice to format the code with prettier or something similar.

Trying to respect existing conventions is hard and automatic formatting has always been beneficial for dev's sanity on projects I contribute too.

(And personal opinion: while I can understand that some people don't like ; I don't think it's very good to release exemple code without them and exemples should try to stick to whatever most popular style is when there is a clear winner).

Can't start Hello world

I forked this repository and then cloned it to my github and VScode, however I can't execute "npm i" in my VScode terminal.
image

How to use

Hello, I want to write a map like windy.com, Can I use the plugins? If I can, could you please show me a document? Thank you!

Sounding example is broken

capture d ecran de 2018-10-26 11-17-51
capture d ecran de 2018-10-26 11-17-36

Tested both on Chromium and Firefox

Target: index.html
Version: 16.13.1
Built: 2018-10-26, 05:58
Your browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/70.0.3538.67 Chrome/70.0.3538.67 Safari/537.36
WebGL particles: running

Target: index.html
Version: 16.13.1
Built: 2018-10-26, 05:58
Your browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0
WebGL particles: running

The sounding example is broken

  1. The mounting point seems to be wrong

#map_container .leaflet-popup-pane

.leaflet-popup-pane is in a sibling of #map_container

  1. Still does not work after updating config.s (with the correct container).

I see an error Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist. in the console, not sure if related

--

Doing some more investigation, it seems that https://github.com/windycom/windy-plugins/blob/02dba015e4ede153de6d4bc82bdee8a48b714beb/examples/07-multiple-files-plugin/soundingGraph.mjs#L591 always return -1

Forcing index = 0 make the sounding appear but without background (ie transparent)

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.