예제 #1
0
 /// <summary>
 /// Writes a value for the <code>image</code> property as a <code>image</code> value.  The <code>image</code> property specifies the image displayed on the billboard, expressed as a URL.  For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS).  The URL may also be a <a href="https://developer.mozilla.org/en/data_URIs">data URI</a>.
 /// </summary>
 /// <param name="url">The URL of the image.  The provided ICesiumUrlResolver will be used to build the final URL embedded in the document.</param>
 /// <param name="resolver">An ICesiumUrlResolver used to build the final URL that will be embedded in the document.</param>
 public void WriteImageProperty(string url, ICesiumUrlResolver resolver)
 {
     using (var writer = OpenImageProperty())
     {
         writer.WriteImage(url, resolver);
     }
 }
예제 #2
0
        /// <summary>
        /// Writes the <code>image</code> property.  The <code>image</code> property specifies the URL of the image.
        /// </summary>
        /// <param name="url">The URL of the image.  The provided ICesiumUrlResolver will be used to build the final URL embedded in the document.</param>
        /// <param name="resolver">An ICesiumUrlResolver used to build the final URL that will be embedded in the document.</param>
        public void WriteImage(string url, ICesiumUrlResolver resolver)
        {
            const string PropertyName = ImagePropertyName;

            if (IsInterval)
            {
                Output.WritePropertyName(PropertyName);
            }
            Output.WriteValue(resolver.ResolveUrl(url));
        }