Git Product home page Git Product logo

milsymbol's People

Contributors

agmt5989 avatar beslisbeth avatar joebayles avatar kjellmf avatar mattshawphoto avatar multum avatar mwaddell avatar okwolf avatar r3mi avatar spatialillusions avatar thw0rted avatar unkn0wncat avatar yevhenii-username 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  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

milsymbol's Issues

Expand the MS.buildingblocks

To be able to build more complex extentions to milsymbol there will be a change to the MS.buildingblock. This will be an API change, but I don't know of any users that has used the possiblity to extend the symbols so I will release it without creating a new major version.
The change will be minor and if you have built your own extentions it will be easy to migrate.

Please comment if this would be a major problem for you.

API: Add method setOptions({options})

Got an idea that the API should have an setOptions method, this to add more functionality to chain methods together, and it will also make it possible to write cleaner more compact code.

sym.setOptions({fill:false}).getSymbol().XML

Add functionality to patch/replace icons

In some cases the issue of replacing some of the icons used for the symbols.
For example there are cases where a developer want to replace all icons showing crosses with half moons.

I will try to add code that makes it possible to patch the current version of milsymbol using code.

Tactical graphics

milsymbol dosen't draw tactical graphics and except a few point symbols that are referenced in other appendixes. If I would implement tactical graphics it would probably be done in another library, so that it will be easy to choose if you want to import it or not.

I have for quite some time been collecting ideas for how I would be able to create tactical graphics, and unfortunately my time might be too limited to implement the whole tactical graphics appendix, but I have some ideas that I might try out.

My idea is to start out with some, maybe five or ten, different graphics and see how it works out. If anyone has any input, wishes, questions, please post them here and I'll try to answer. (And if you need this done faster, you can always take me in as a consultant.)

Dash length on suspect units and suspected position

The standards shows that the dash length should be different for suspect units and units with suspected position, at the moment this isn't implemented and the same dash length is used. I have contacted my symbol gurus to figure out how a unit that is both should be rendered and plan to update the code once this is solved.

Speed

Milsymbol is in version 0.4.4 a bit slow if you want to use thousands of symbols. I'm working on a rewrite of the code that will speed up things a lot! Got a working prototype, but need to fix a bunch of regressions before commit.

Speed in canvas drawing

The canvas draws slow because fill and stroke is called a lot of times. I should try to optimize this in some way to make fewer calls and in that way try to make it faster.

Convert documentation to markdown

To make it simple to update documentation it should be migrated to markdown. Might move to JSDoc or similar in the future, but markdown is a start.

Offer Minified Version

Would it be possible to also offer a milsymbol.min.js as many other JavaScript libraries offer for saving space when distributing for production use? You can use UglifyJS or whatever method works easiest for your build. Please keep the milsymbol.js version for use during development however.

Split library into multiple files/modules

The MilSymbol library is currently one big file. It is easier to maintain if you split it into multiple files. You can always use a build tool like Gulp or Grunt to combine and compress all the files for deployment. This will probably also make it possible to create custom versions of MilSymbol. For example, if you don't need support for MILSTD 2525D, you don't need to include it in the project.

69+ errors found in the code.

Hi there @spatialillusions , i try to use this library for a tiny project in Unity3D but i found that is full of bugs. A lot of ";" missing and a lot of erros on the syntax. I start correcting a few but there are a LOT. Here is the modify milsymbol.js. Unity3d (i'm using MonoDevelop 5.9.6) compiler is BOO, it say that the next errors are in the next lines:

(206,26): BCE0044: expecting (, found 'text'.
(206,35): UCE0001: ';' expected. Insert a semicolon at the end.
(226,26): BCE0044: expecting (, found 'textm1'.
(226,37): UCE0001: ';' expected. Insert a semicolon at the end.
(237,26): BCE0044: expecting (, found 'textm2'.
(237,37): UCE0001: ';' expected. Insert a semicolon at the end.
(269,177): BCE0043: Unexpected token: ,.
(269,178): UCE0001: ';' expected. Insert a semicolon at the end.
(269,179): BCE0043: Unexpected token: type.
(269,184): BCE0043: Unexpected token: path.

and the list goes on...

PS: i can't upload the complete milsymbol.js modify, if you are interested i send it to your email.

Update documentation

This includes work to move all documentation to MarkDown and build scripts to merge several MarkDown documents and convert them into HTML.

It will be done in several steps where the first one is to create new documentation in MarkDown format for things that are missing documentation today. This work has started with updating documentation for the examples.

Ideas for a validation function

In accordance to the issue #21 here is some ideas about validation of the SIDC :

  • number of letters : to few, to much, for example APP6B is 15.
  • value of categories : some categories have a fixed number of possibilities, for APP6B position 2 is affiliation from a limited number of letters, function ID from 5 to 10 values are in the standard, country code 13 and 14 ...

Thanks.

Update Examples

To make it easier to maintain and update examples, they will be migrated to bl.ocks format:
https://bl.ocks.org/-/about

They will still be included with milsymbol, but this is a part of updating the documentation and making milsymbol easier to maintain.

If you want to contribute with your own examples of milsymbol usage, simply create a pull request, all examples are welcome.

npm install fail

Hi,
it seems that npm install of milsymbol fail (on windows) with this error :
194 error enoent ENOENT: no such file or directory, chmod '\node_modules\mil-symbol\MilSymbol.js'

Thanks.

Outline of symbols

When a symbol is placed on a map there might be hard to read the symbol from the background. Using SVG filters it would be possible to add an outline to the symbols and texts.
I have a general idea or how this could be implemented, but for the moment it will only be possible in SVG and not in Canvas.

I don't know yet if I will make it part of the API or as an extension.

Code size

At the moment the uncompressed code is around 800k in size. The most of this is in the buldingblocks that makes up the symbols, so it might be hard to make it smaller, but I should at least make an effort to see if it is possible.

Possiblity to make text information in other color

Anyone interested to be able to make the text information surrounding the symbol in another color then the default icon frame color? If so let me know, I have some ideas but I don't want to implement options that won't be used.

License: MIT or BSD?

Firstly, this is a neat project. Thank you for sharing ๐Ÿ‘

On the topic of sharing, I have come across a minor issue regarding the license to be enforced on your library...

The documentation and examples page says that the milsymbol.js library is BSD and links to MIT license text. The README in the GitHub repo says MIT and includes an MIT license file (at least it is titled as such, I have not reviewed the license text as a lawyer would ๐Ÿ˜„)

Some organizations are very particular about the wording in the license and might ignore this awesome library for no good reason.

Thanks again for sharing.

Support for 2525C EMS

Working on implementing 2525C EMS, it is a lot of work and please let me know if you need this functionality and I will prioritise it.

Rendering error

Rendering error in
WAR.GRDTRK.EQT.GRDVEH.ARMD.C2V
S-G-EVAC--*****
C2V/ACV

Minor error in octagonAnchor and markerAnchor

There is a misscalculation in octagonAnchor and markerAnchor where the extra padding on the symbol isn't calculated into where the center is.

On line 1943 and 1944 extra padding is added, and it's not calculated into the computations in the following lines.

Either set the mulitplyer to 2, or change the following lines to add 0.5 strokewitdths.

Dictionary for a unit generator

Following the issue #21 it would be nice to be able to have a dictionary of possible choice to make a custom unit generator like the one included in the project.

validity

Hi,
Is there a way to tell if a symbol is valid ?
Thanks.

Speed leader support

Add support for the speed leader.
It should be able to set to a fixed pixel length independent of symbol size.
If speed leader is used the ordinary direction indicator should not be used.

Remove bower.json

To reduce the maintenance the bower.json will be remove if there isn't any specific requests to keep it.

Add support for JavaScript modules

I'm currently brushing up on my javascript skills and I'm trying to build a simple web application using the latest "state of the art" tools like npm, Typescript and webpack/browserify. I also want to use milsymbol as part of the project, but I've run into some problems integrating it with webpack and browserify. The reason for this is that webpack interprets milsymbol as CommonJS module and expects it to export variables and functions. Something like this:

module.exports = MS;

The problem is that milsymbol does not automatically make MS a global variable. This is usually a good thing, but when I use a tool like webpack, it puts milsymbol inside a function scope, so that the MS is not available outside of this scope.

One workaround I found was to add something like this to milsymbol.js (code borrowed from Leaflet):

// Code from the Leaflet project:

if (typeof module === 'object' && typeof module.exports === 'object') {
    module.exports = MS;

} else if (typeof define === 'function' && define.amd) {
    define(MS);
}

// make MS a global variable
if (typeof window !== 'undefined') {
    window.MS = MS;
}

Another option may be to use browserify and browserify-shim and build a module friendly version of milsymbol.

Any thoughts on adding support for modern javascript module loaders?

Canvas output

This might be too much work, but I'm looking into canvas output. Please comment if you are interested in this or if I will be wasting my time.

Create More Unit tests

Milsymbol has grown quite a lot since the first version and it continues to grow. This has created a need for making some kind of automated unit test to make sure that edits don't break existing functionality. So far Mocha https://mochajs.org/ is the test framework that is considered, but if anyone has any other opinions I'm still open to suggestions.

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.