<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Map to KML display expression in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/map-to-kml-display-expression/m-p/293451#M3087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know it's been a while since this thread was posted, but in case any others have a similar problem, here's my solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Formatting the labels on screen using the built in XML Fonts isn't embedded deep enough in the program to propagate into the map to KML tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My solution utilized a brute force approach.&amp;nbsp; I had the script dig into the KMZ file using the zipfile module and manually replace the font colors in the unzipped KML using regular expressions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Never a very pretty solution, but it gets the job done.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jan 2014 21:24:44 GMT</pubDate>
    <dc:creator>MattEiben</dc:creator>
    <dc:date>2014-01-27T21:24:44Z</dc:date>
    <item>
      <title>Map to KML display expression</title>
      <link>https://community.esri.com/t5/mapping-questions/map-to-kml-display-expression/m-p/293449#M3085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to streamline a already working tool with better display functionality through Arcpy.&amp;nbsp; I'm assigning labels to ArcMap using Arc formatting tags such as &amp;lt;CLR&amp;gt;, &amp;lt;BOL&amp;gt;, and &amp;lt;ITA&amp;gt;.&amp;nbsp; The problem I'm having is that these styles work great within ArcMap, by apparently aren't embedded deep enough into the software.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example of a display expression: "&amp;lt;BOL&amp;gt;&amp;lt;CLR red='255' green='255' blue='255'&amp;gt;" + [Field1] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When the Map is exported to a KMZ through the "Map to KML" tool, the Arc formatting tags are inserted directly into the &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; KML tags and displayed as straight text in the KMZ labels.&amp;nbsp; However, when you actually use the color drop downs inside Arc instead of using the formatting display tags, the KMZ labels reflect that change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From my understanding, ArcMap takes these formatting tags and displays the text dynamically through the software.&amp;nbsp; My question is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to apply the formatting deep enough in ArcMap for the change to reflect through the Map to KML tool.&amp;nbsp; Ideally, the formatting would be applied through a python Arcpy tool.&amp;nbsp; The whole point is to not need a person to actually go into the menu and manually set the font as desired.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect this functionality just isn't built into ArcMap, but it'd be nice to know,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 16:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/map-to-kml-display-expression/m-p/293449#M3085</guid>
      <dc:creator>MattEiben</dc:creator>
      <dc:date>2013-11-12T16:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Map to KML display expression</title>
      <link>https://community.esri.com/t5/mapping-questions/map-to-kml-display-expression/m-p/293450#M3086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;KML is an XML-based specification. It has some specific tags for styling features, but I don't think it has any for labels. Might be able to use HTML (looks like it works for stuff in &amp;lt;description&amp;gt;, not sure about &amp;lt;name&amp;gt;). That technically might come down to what's interpreting the KML though. I.e. ArcMap will probably show the html tags as text and Google Maps might interpret them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Before diving too far down the rabbit hole on options, what's the usage scenario for the KML? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;KML Reference Doc if you're interested:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.google.com/kml/documentation/kmlreference"&gt;https://developers.google.com/kml/documentation/kmlreference&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 21:57:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/map-to-kml-display-expression/m-p/293450#M3086</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-11-18T21:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Map to KML display expression</title>
      <link>https://community.esri.com/t5/mapping-questions/map-to-kml-display-expression/m-p/293451#M3087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know it's been a while since this thread was posted, but in case any others have a similar problem, here's my solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Formatting the labels on screen using the built in XML Fonts isn't embedded deep enough in the program to propagate into the map to KML tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My solution utilized a brute force approach.&amp;nbsp; I had the script dig into the KMZ file using the zipfile module and manually replace the font colors in the unzipped KML using regular expressions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Never a very pretty solution, but it gets the job done.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 21:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/map-to-kml-display-expression/m-p/293451#M3087</guid>
      <dc:creator>MattEiben</dc:creator>
      <dc:date>2014-01-27T21:24:44Z</dc:date>
    </item>
  </channel>
</rss>

