Enabling Markdown and other JSDoc improvements
This change enables GitHub flavored markdown for APIdoc comments. The code example in map.js shows how to use markdown for code snippets. doc/index.md is now included again as start page for the docs. Everything in the doc/tutorials directory will also be added to the docs as tutorial. As an example, I moved the ol3.md file with the architecture to the tutorials directory. Currently properties and methods annotated with @inheritDoc or @override won't be documented at all. This is a known issue, so I added a custom JSDoc plugin with a hack to avoid this.
This commit is contained in:
@@ -110,6 +110,26 @@ ol.MapProperty = {
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
* The map is the core component of OpenLayers. In its minimal configuration it
|
||||
* needs a view, one or more layers, and a target container:
|
||||
*
|
||||
* var map = new ol.Map({
|
||||
* view: new ol.View2D({
|
||||
* center: new ol.Coordinate(0, 0),
|
||||
* zoom: 1
|
||||
* }),
|
||||
* layers: [
|
||||
* new ol.layer.TileLayer({
|
||||
* source: new ol.source.MapQuestOSM()
|
||||
* })
|
||||
* ],
|
||||
* target: 'map'
|
||||
* });
|
||||
*
|
||||
* The above snippet creates a map with a MapQuest OSM layer on a 2D view and
|
||||
* renders it to a DOM element with the id 'map'.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.Object}
|
||||
* @param {ol.MapOptions} mapOptions Map options.
|
||||
|
||||
Reference in New Issue
Block a user