What is a « Layer »?

A Layer is, generically, any dataset that you want to display on a map. This could include:

  • Tiled imagery, e.g. a set of rectangular images that fit together to show satellite images of the earth
  • A set of « markers », each consisting of a single coordinate pair that denotes the location of something
  • A single image with geographic or Cartesian coordinates for a « bounding box » that indicates where in the map the image should be displayed

or many other kinds of data, but these three types are those primarily supported by the current version of the extension.

A map can (and usually does) contain multiple layers, which can be turned on or off by the user viewing the map so that they can see as much or as little data as they want.

Layers are stacked on the map, one on top of the other, so order matters. For example, you generally wouldn’t put a tiled imagery layer « on top of » a markers layer because it would both visually obscure the markers and also (even if the imagery layer is transparent) prevent the user from clicking on the marker icon. Partly for this reason, in OpenLayers and Semantic Layers, some layers can be designated as « Base Layers », which always appear on the « bottom » of the layer stack, and only one base layer can be viewed at a time.

[edit] Where does the data/imagery come from?

In short, OpenLayers (and hence Semantic Layers) is a BYOD (Bring Your Own Data) system. OpenLayers is a strictly Javascript based piece of software and has no server side component at all. Semantic Layers is simply « glue » code that connects OpenLayers to MediaWiki and Semantic MediaWiki. Neither software provides nifty satellite pictures or road maps to look at.

This can be both good and bad. On the plus side, since OpenLayers is not just the client part of any client-server software suite, it supports a very wide variety of data sources and formats, and is designed to be easily extensible to support more. On the down side, it’s not very useful without any data or imagery.

The good news is, there are plenty of data sources available, if you know where to look. For tiled imagery, the data protocol usually used with OpenLayers is Web Map Service, or WMS. MetaCarta, the original developer and corporate sponsor of OpenLayers, provides two imagery datasets via WMS: a simple world map with land, water bodies, and country borders, as well as a mirror of NASA’s Blue Marble imagery. Both of these datasets are preconfigured and available by default in Semantic Layers, in the Layers.js file. You can also look at http://wms-sites.com/, which maintains a catalog of publicly available WMS datasets.

The other good news is, if you want to publish your own geographic data, there are plenty of ways to do that using free open source software. Check out UMN MapServer or read about GML, which is an XML format for representing vector data that you can create by hand or with any web scripting language.

[edit] Why use OpenLayers instead of Google Maps?

That is an excellent question, and one that has gotten lots of discussion that won’t be repeated here. But primarily, the reason at the time was that Semantic Layers was originally developed for use on an internal access only intranet site. In that situation, use of Google maps was disallowed under their license (« [Google Maps] may be used only for services that are generally accessible to consumers without charge. »[1]). Other benefits of the decision, though, are evident:

  • The ability to mix multiple data sources from different formats and providers (of which Google Maps is one anyway)
  • The ability to also use the extension for other, non-geographic applications
  • Licensing, practical, and (for some at least) philosophical issues made easier with a free, open source technology
Cet article a été publié dans Uncategorized. Ajoutez ce permalien à vos favoris.

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s