Selection and Description

Hi,
I can not running Selection and Description section code in the Cesium tutorial in visualizing spatial data section.

Please help me. I need for help so necessary.

This is my code:

<!DOCTYPE html>
<html lang="en">
<head>
  <!-- Use correct character set. -->
  <meta charset="utf-8">
  <!-- Tell IE to use the latest, best version. -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
  <title>Hello World!</title>
  <script src="../Build/Cesium/Cesium.js"></script>
  <style>
      @import url(../Build/Cesium/Widgets/widgets.css);
      html, body, #cesiumContainer {
          width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
      }
  </style>
</head>
<body>
  <div id="cesiumContainer"></div>
       <script>
    var viewer = new Cesium.Viewer('cesiumContainer');

var wyoming = viewer.entities.add({
  name : 'Wyoming',
  polygon : {
    hierarchy : Cesium.Cartesian3.fromDegreesArray([
                              -109.080842,45.002073,
                              -105.91517,45.002073,
                              -104.058488,44.996596,
                              -104.053011,43.002989,
                              -104.053011,41.003906,
                              -105.728954,40.998429,
                              -107.919731,41.003906,
                              -109.04798,40.998429,
                              -111.047063,40.998429,
                              -111.047063,42.000709,
                              -111.047063,44.476286,
                              -111.05254,45.002073]),
    material : Cesium.Color.RED.withAlpha(0.5),
    outline : true,
    outlineColor : Cesium.Color.BLACK
  }
});

viewer.zoomTo(wyoming);

   wyoming.description = '
<img
  width="50%"
  style="float:left; margin: 0 1em 1em 0;"
  src="//cesiumjs.org/images/2015/02-02/Flag_of_Wyoming.svg"/>
<p>
  Wyoming is a state in the mountain region of the Western
  United States.
</p>
<p>
  Wyoming is the 10th most extensive, but the least populous
  and the second least densely populated of the 50 United
  States. The western two thirds of the state is covered mostly
  with the mountain ranges and rangelands in the foothills of
  the eastern Rocky Mountains, while the eastern third of the
  state is high elevation prairie known as the High Plains.
  Cheyenne is the capital and the most populous city in Wyoming,
  with a population estimate of 62,448 in 2013.
</p>
<p>
  Source:
  <a style="color: WHITE"
    target="_blank"
    href="http://en.wikipedia.org/wiki/Wyoming">Wikpedia</a>';

  </script>
</body>
</html>

Hello,

Thanks for bringing this up! It looks like we forgot to escape the new lines in the example for the description. Try this instead:

wyoming.description = ’
<img
width=“50%”
style=“float:left; margin: 0 1em 1em 0;”
src="//cesiumjs.org/images/2015/02-02/Flag_of_Wyoming.svg"/>\

\ Wyoming is a state in the mountain region of the Western \ United States.\

\

\ Wyoming is the 10th most extensive, but the least populous \ and the second least densely populated of the 50 United \ States. The western two thirds of the state is covered mostly \ with the mountain ranges and rangelands in the foothills of \ the eastern Rocky Mountains, while the eastern third of the \ state is high elevation prairie known as the High Plains. \ Cheyenne is the capital and the most populous city in Wyoming, \ with a population estimate of 62,448 in 2013.\

\

\ Source: \ Wikpedia\

';

``

It should be fixed on the website shortly.

Best,

Hannah

Hi,
Your welcome, Thanks so much for your help and edit.
Can you help me to the next questions for MSc thesis?
Can I have your email?
Please send your email address for me.

Best Regards,

Sabah

Hi Sabah,

Please post any questions you have here on the forum. I’ll do my best to answer them.

Best,

Hannah