Creating a WebGL map
In the first example, called ch07_webgl
, we will create our first WebGL map. We bring our application to its limits, displaying more than 200,000 points on a single map. If you haven't performed this test already, you must be thinking that the magnitude of features will render our application totally unresponsive and useless. Let's make an attempt to perform this test, though. For this example, we only have to modify our map constructor using our new vector layer and the WebGL renderer:
var map = new ol.Map({ target: 'map', layers: [ […] new ol.layer.Vector({ source: new ol.source.Vector({ format: new ol.format.GeoJSON({ defaultDataProjection: 'EPSG:4326' }), url: '../../res/switzerland_points_osm.geojson', attributions: [ new ol.Attribution({ html: 'Switzerland Points © OpenStreetMap Contributors' ...