for a while I'm using PlantUML to create sequence diagram.
Everything works fine ... but looked a bit boring and "geek"-like.
So I google for nice sprites and found PlantUML Icon-Font Sprites on GitHub.
I included the sprites successfully in my sequence diagram but as soon as I used them, I got a syntax error.
After some investigation, I discovered that PlantUML tries to create state diagrams and certain elements of the sequence diagram (like the separator) are not valid.
So my two questions:
How does PlantUML decide which diagram type to draw?
How can I change this to sequence diagrams?
Example
#startuml
!pragma teoz true
skinparam defaultTextAlignment center
!include puml-icons/common.puml
!include puml-icons/font-awesome-5/user.puml
hide footbox
/'FA5_USER(Alice, Alice)
FA5_USER(Bob, Bob)'/
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
#enduml
#startuml
!pragma teoz true
skinparam defaultTextAlignment center
!include puml-icons/common.puml
!include puml-icons/font-awesome-5/user.puml
hide footbox
FA5_USER(Alice, Alice)
FA5_USER(Bob, Bob)
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
#enduml
See How can a PlantUML document specify its diagram type?
And Examples on https://plantuml.com/commons that gives an idea how PlantUML decides what diagram to generate.
You can use hidden elements of specific type, like component for deployment diagram, to point PlantUML into right direct, when there is mix.
Related
I try to create a diagram which contains the class hierarchy as well as use cases which use the classes. I tried to use PlantUML today, but somehow one cannot mix these two diagram types. This is the simplest file I could come up with:
#startuml
class Foo
usecase Bar
#enduml
When I only have one of these lines in there, it works fine. But with both lines I get this:
❯ plantuml text.txt
Error line 5 in file: text.txt
Some diagram description contains errors
Is there some way to put both into the diagram, or is that just impossible?
I had used PlantUML 1.2021.0. This apparently doesn't contain the allowmixing feature, that the current version 1.2021.14 supports. Upgrading the software and adding allowmixing to the file cures this problem.
#startuml
allowmixing
class Foo
usecase Bar
#enduml
I have a web application with some "Help" buttons which point to my online documentation. The links to the help sections are hardcoded in the app database. Previously, the documentation was made in HTML and JS, and I could control the URLs to the section manually.
However, now that I am migrating to Sphinx and ReST, I found the automatic section URL generation great, but cannot figure out how to control this behaviour for my structure.
Is there a way to have a sort of URL alias which point to the actual URL of my documentation in order not to update the hardcoded links in the app db everytime I update the name of my chapters/sections?
For instance:
I have a subsection called "I like apples" in Chapter 1.
My hardcoded link to it would be something like
"Chapter1#I-like-apples" (I only care about the part following the #
sign)
I change the title to "I hate apples". The new link would become "Chapter1#I-hate-apples", but in my db I still need to have "#I-like-apples" which point to the same section.
See Hyperlink Targets in the docutils documentation, specifically "internal hyperlink targets".
.. _my-target:
.. _synonym-to-my-target:
My Subsection
-------------
Sphinx will generate targets for each synonym.
You could also do indirect hyperlink targets.
.. _my-target: synonym-to-my-target_
.. _synonym-to-my-target:
My Subsection
-------------
PlantUML is very powerful when you would like to create standard UML diagrams.
But I currently think about using PlantUML to document EIP routes (like the routes on these images: https://www.google.de/search?q=camel+route&safe=off&source=lnms&tbm=isch).
This would be pretty easy if you could specify another image instead of normal boxes for a class. Something like an SVG or WMF image or a shape script as in Sparx Enterprise Architect.
The only custom images I found in the documentation where those tiny sprites...
From PlantUML's Language Reference Guide
11.6 Legacy HTML
Some HTML tags are also working:
<img:file> : the file must be accessible by the filesystem
<img:http://url> : the URL must be available from the Internet
It appears that it shouldn't be a problem. There is also a PlantUML Word Plug-in, that would possibly enable you to paste images over the default ones otherwise.
The following PlantUML code renders a simple diagram - the referenced images have to be in the proper location...
object "inbound message" as m1
object "XML Splitter" as s1
m1 : <img:MessageIcon.gif>
s1 : <img:SplitterIcon.gif>
m2 : <img:MessageIcon.gif>
m1 -> s1
s1 -> m2
plantuml-icon-font-sprites allows using font-awesome icons within plantuml. It's awesome!
If you are building a diagram include allow_mixing at the top of the code.
Here is my adventure. On this page I would like to display our bicycle route.
I am using in drupal 7:
Openlayers 7.x-2.0-beta3
OpenLayers KML Layer 7.x-1.0-beta1 (I'm not sure if I need this module as well)
layer: openlayers_kml_example with the source a url to a file.
map : example_kml Example KML Map
The result is that the layer is displayed very very small on the big map. So if you zoom in to the airplane eventually you can see the track.
Map Projection set to 3857
Display Map Projection set to 4326 (the KML is made with Google earth. I think not important as there is no interaction only displaying.
LAYER SPECIFIC OPTIONS FOR KM extract styles and attributes ON.
If I put tracks on then I will miss the nice airplane icon.
I keep getting the same logs and of course no display on the page:
MESSAGE The layer cannot be reprojected to the map projection: EPSG:
MESSAGE Notice: Undefined variable: map in openlayers_layer_sanity_check() (line 399
MESSAGE Notice: Undefined property: stdClass::$name in openlayers_layer_sanity_check()
As it is not nice for people to think that I'm cycling constantly in water I would like to solve it :-)
Any suggestions?
John is correct in describing the issues but here is the solution :-)
Update drupal module openlayers to the latest version, currently 7.x-2.0-beta9.
Take care of the needed dependencies.
I reset all my layers and maps to the orginial and then adjusted the source of the kml layer to a file.
I want to do something similar to what Apple Maps does - when you select the annotation for a pin, the detail view includes an picture of the place. I cannot find any information on how we mere mortals can do this. Is this private API and I'm out of luck, or am I just searching for the wrong keywords?
You can add a mapview that doesn't allow user interaction