Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Create an app to create stylx file #287

Closed
3 tasks done
topowright-zz opened this issue Aug 28, 2018 · 11 comments
Closed
3 tasks done

Create an app to create stylx file #287

topowright-zz opened this issue Aug 28, 2018 · 11 comments

Comments

@topowright-zz
Copy link
Contributor

From @csmoore on March 14, 2018 18:29

Background

The stylx creation process has changed since Pro 1.2.

At Pro 2 support was added for

  1. Directly add SVG to styles
  2. Mobile Styles that are supported both in Pro and Runtime

The old process at: https://github.com/Esri/military-features-data/tree/dev/military-symbology-styles/utils-and-source-data/style-creation-utilities

is no longer necessary (in addition to being overly complex and error-prone).

Current State

The currently documented style creation process should be updated to use Pro 2

Steps to Reproduce / Requirement / Workflow

Use Pro 2 to create Mobile Style(stylx) from metadata and SVG icons

Expected Results / Behavior

  • An Style Creation app to create a Mobile Style (stylx) from metadata and SVG icons
  • A documented process/updates to repo readme for using the Style Creation App
  • A Mobile Style created from the app

Version

The app / stylx will target:

Pro 2.2-2.3
Runtime 100.4
Server 10.7

Copied from original issue: Esri/military-features-data#296

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 15, 2018 18:24

@dfoll @topowright - a quick app to create a new Pro Style from SVGs is now available to test at: https://esri.box.com/s/s042ujvrzrhtx7kufz6o8srxcweibeaq

Install the app from ...\GenerateSVGStyle\bin\Debug

This App takes as input:

  1. The SVGs provided to us by the symbol committee - available at: https://github.com/Esri/military-features-data/tree/csm/app6d-dev/military-symbology-styles/utils-and-source-data/svg
  2. A CSV file that matches the desired style specification available at:
    https://github.com/Esri/military-features-data/tree/csm/app6d-dev/military-symbology-styles/utils-and-source-data/style-source-files/app6d/imagefile_name_category_tags
    1. IMPORTANT: this file must be edited (IMPORTANT2: NOT in Excel, because this changes some of the data) to change the string "{Symbols_Root}" to the local location of the SVGs (no longer needed)

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 16, 2018 15:11

@topowright @dfoll

Updated addin app is now available to test at: https://esri.box.com/s/s042ujvrzrhtx7kufz6o8srxcweibeaq

Should look like this now and eliminate the edit-csv step (I crossed out above):

image

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 26, 2018 14:24

The style creation addin app has been updated to add the step of merging the lines-area-labels style and point style:

This eliminates this step in the old process: Merge - part of Overall Process

image

image

Updated app at: https://esri.box.com/s/s042ujvrzrhtx7kufz6o8srxcweibeaq

I believe the only remaining steps for this task are:

  1. Update the process to set the LabelRules for the Unit frames
  2. Update the current docs/readmes
  3. Test the new process for creating mil2525d / app6d styles

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 27, 2018 16:20

I looked at some different approaches to setting the LabelRules in the stylx (and see if these are exposed in any way in Pro):

That is - this column is the style that is not exposed:

image

That associates a style item with this table/entry:
image

And I think the most flexible way to do this until it is exposed by Pro is to keep this as a sql script that gets executed as part of the new process/addin. Currently working on adding this step to the addin

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 28, 2018 14:37

Added a step to addin to update/add the label rules to the style:

image

  • 2 icons are failing to import into the style - these 2 should be investigated further and reported to Core as an issue (we may also try to remove the unsupported SVG)

Tasks to finish this item

  • Update the current docs/readmes
  • Test the new process for creating mil2525d / app6d styles
  • Test the created style in Runtime+Pro

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 29, 2018 14:20

I hit a snag on this task L24 when testing the final/resulting style in Runtime/Pro - the final style was not compatible with runtime (i.e. crashed Pro / doesn't draw in Runtime) - I just need make a few changes to ensure each step of the process is working with a mobile style.

Also the 2 bad icons mentioned above were actually repeated unique keys, so this was an input data problem.

I'll update once I have a fully working style and have tested in Runtime/Pro

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 29, 2018 20:17

After ensuring we are using a mobile style everywhere and looking at this problem closer - I think there is an issue with Pro that we won't be able to workaround creating these styles.

To be compatible with Runtime, the mobile-compatible symbols are supposed to vectorize the text, but that does not appear to be happening - so any symbols with text are not drawing in Runtime (and causing Pro to crash):

Here is an example of CIM that is not compatible that is showing up in the mobile style

{"type":"CIMTextSymbol","blockProgression":"TTB","countryISO":"USA","depth3D":1,"drawSoftHyphen":true,"extrapolateBaselines":true,"fontEffects":"Normal","fontEncoding":"Unicode","fontFamilyName":"Arial","fontStyleName":"Regular","fontType":"TTOpenType","haloSize":1,"height":115,"hinting":"Default","horizontalAlignment":"Left","kerning":true,"languageISO":"eng","letterWidth":100,"ligatures":true,"lineGapType":"ExtraLeading","symbol":{"type":"CIMPolygonSymbol","symbolLayers":[{"type":"CIMSolidFill","enable":true,"color":[0,0,0,255]}]},"textCase":"Normal","textDirection":"LTR","verticalAlignment":"Baseline","verticalGlyphOrientation":"Right","wordSpacing":0,"billboardMode3D":"FaceNearPlane"},"textString":"MIL"}]

I'll write up the details of this issue and pass on to the PEs (FYI @ACueva @topowright @dfoll ) to coordinate with Core.

This likely means we won't be able to use Pro to author these mobile styles, but Core might be able to point us to a workaround in the short term.

@topowright-zz
Copy link
Contributor Author

From @csmoore on March 30, 2018 20:41

This task is impeded due to the issue reported in last comment - opened new issue #324 that should be reported to Core. @topowright @ACueva @dfoll

@topowright-zz
Copy link
Contributor Author

From @csmoore on July 20, 2018 15:40

Created PR: #335 to address the original issue and some recommended enhancements/feedback this week:

  1. Add Addin source+prebuilt app to the repo
  2. Move documentation on using the app to the wiki ( https://github.com/Esri/military-features-data/wiki/Creating-Dictionary-Renderer-Style-Files )

The only 2 issues I have noticed using this app/process/stylx-created are noted in:

  1. #226 - Add App6d support #324 - Runtime 100.3 is not displaying the text from these styles (but Pro 2.2 is so they can be tested)
  2. Addresses new issue in #327 #334 - A dozen of the SVGs are failing to import at Pro 2.2 - just hit "OK" when you recieve the warning for these on the app (vs. "Cancel" which will abort the app)

@topowright-zz
Copy link
Contributor Author

moved this issue to the new repo for situational awareness down the road. This issue will be closed.

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

No branches or pull requests

1 participant