-
Notifications
You must be signed in to change notification settings - Fork 22
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
Render map #178
Comments
I'm not sure I understand, are you asking how to get the correct SVG, or how to render it? |
Sorry for not phrasing it correctly. |
We only use Go to generate state in the shape of e.g. JSON objects that is then used to render using JS/CSS on WebViews or browsers. It's a sad truth that SVG is a great format that is only really properly supported by browsers :/ |
@zond Thank you really much. I think I saw a project which renders them in Python but this massively increases the payload for the client. So rendering it in the browser may actually be beneficial. One question: How do you calculate where to place the units? I understand that there province-centers and supply centers marked. But how do you calculate the offset? Any suggestions for this? |
Browser or some kind of WebView, yeah. We e.g. getElementById('lon_center'), and then use the location of that element as position (with some unit model based offset) for the unit. |
Hm. Guess then I am going to do it that way too. Thank you. If I make significant progress I am going to post it here. As you might be interested in it. |
Another question, sorry for spamming: Why is the |
I don't remember :D |
Related to #95
I saw that there is now also a map. How can I render the svg?
The text was updated successfully, but these errors were encountered: