GeoJSON feature coordinates not displaying on OpenLayers map
<p>I'm trying to display a <em>GeoJSON</em> polygon on a map. I've used the example provided by OpenLayers with the following data, but only the second polygon is displayed: </p>



<pre class="lang-js prettyprint-override"><code>var geojsonObject = {
    "type": "FeatureCollection",
    "crs": {
        "type": "name",
    },
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Polygon",
                "coordinates": [[[103.92240800000013,21.69931],[100.93664,21.66959500000013],[108.031899,18.67076]]]                
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Polygon",
                "coordinates": [[[-5e6, -1e6], [-4e6, 1e6], [-3e6, -1e6]]]                  
            }
        }
    ]
};
</code></pre>

<p>The code I'm using to parse and add the <em>GeoJSON</em> to the map is as follows: </p>

<pre class="lang-js prettyprint-override"><code>var vectorSource = new ol.source.Vector({
    features: (new ol.format.GeoJSON()).readFeatures(geojsonObject)
});

var vectorLayer = new ol.layer.Vector({
    source: vectorSource,
    style: styleFunction
});
</code></pre>

<p>I noticed different kinds of coordinates. In the second set the coordinates are represented like <code>[-5e6, -1e6]</code> with the <code>e</code> which I don't understand and in the first set - that don't work - they look like <code>[103.92240800000013, 21.69931]</code>.</p>

<p>Is this a possible reason why my polygon is not displayed?</p>