The shape of the Earth: the geoid
You heard in primary school that the Earth is a sphere, and later you were told…
A shapefile is a collection of files. One of these is the DBF file. The DBF file may be in several different encodings. ISO-8859–1 (also called Latin1) is quite popular, but in your case it might be different. I have shapefiles in CP1253.
Sometimes you need to indicate to the user that an action is being performed in the background. For example, turning on a WMS/WFS layer can sometimes take several seconds from the time the user clicks on it on a layer switcher until the browser manages to…
OpenLayers 2 used to have a LayerSwitcher control. With it you could choose different layers to show on the map. This control is gone in OpenLayers 3.
Unlike OpenLayers 2, OpenLayers 3+ does not distinguish between base layers and overlay layers; it just has layers, drawn one on top of the other. The following code results in a map with three layers: Open Street Map, Natura biotopes, and Corine biotopes:
Pretty much the simplest way to create a map is this:
var map = new ol.Map({ target: 'map', layers: [new ol.layer.Tile({ source: new ol.source.OSM() })], view: new ol.View({ center: [0, 0], zoom: 2 })});
In OpenLayers 3+, you can add a control that shows the coordinates of the mouse position:
I’ve been struggling with GIS for years. I’ve written applications that just show some points on a map, that perform spatial integration, and that grab their data from a geographical database. I’ve only worked with free GIS software; the technologies I remember…