Update tutorial description and wording; Update tutorial code indentation; Rename one tutorial;
MODIFY
tutorials/choropleth/index.pug
tutorials/choropleth/index.pug
@@ -3,7 +3,7 @@ extends ../common/index.pug
block mainTutorial
:markdown-it
# Tutorial - Choropleth Map
- First, let's create our map, add a base map, and create a feature layer. Also, to make simple, we import our data inline.
+ First, let's create our map, add a base map, and create a feature layer. Also, to keep it simple, we import our data inline.
+codeblock('javascript', 1, undefined, true).
var map = geo.map({
@@ -62,7 +62,7 @@ block mainTutorial
},
fillOpacity: 1
})
- .draw()
+ .draw();
:markdown-it
Or, we could create our choropleth map with the dedicated choropleth feature, which uses polygon feature internally.

MODIFY
tutorials/contour/index.pug
tutorials/contour/index.pug
@@ -16,7 +16,7 @@ block mainTutorial
:markdown-it
Then load some data.
- The data is grid data describing geospatial point elevation, a record of z value -9999 means it's sea level.
+ The data is grid data describing geospatial point elevation, a record of z value -9999 means there is no land data.
Since the data is relatively big, intead of adding inline data, we load asynchronously, and use [promise chain](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) to chain up the following steps.
+codeblock('javascript', 2, 1).
var promise = Promise.resolve($.ajax({
@@ -24,7 +24,7 @@ block mainTutorial
}));
:markdown-it
- Once the data is loaded. We create the contour feature with default color range. *min: 0* means only showing data with elevation.
+ Once the data is loaded. We create the contour feature with default color range. `min: 0` means only showing data with elevation.
+codeblock('javascript', 3, 2, true).
var contour = null;

RENAME
tutorials/vector_point/index.pug
tutorials/simple_point/index.pug
@@ -2,10 +2,10 @@ extends ../common/index.pug
block mainTutorial
:markdown-it
- # Tutorial - Vector point
- First, let's create our map and add a base map. Also, to make simple, we import our data inline.
+ # Tutorial - Simple point
+ First, let's create our map and add a base map. Also, to keep it simple, we import our data inline.
- +codeblock('javascript', 1, undefined, true).
+ +codeblock('javascript', 1).
var map = geo.map({
node: "#map",
center: { x: -97.67, y: 31.80 },
@@ -25,11 +25,14 @@ block mainTutorial
:markdown-it
Then create point feature and set the data.
- +codeblock('javascript', 3).
+ +codeblock('javascript', 3, undefined, true).
var feature = layer.createFeature('point')
.data(cities.features)
.position(function (city) {
- return { x: city['geometry']['coordinates'][0], y: city['geometry']['coordinates'][1] };
+ return {
+ x: city['geometry']['coordinates'][0],
+ y: city['geometry']['coordinates'][1]
+ };
})
.draw();

RENAME
tutorials/vector_point/thumb.jpg
tutorials/simple_point/thumb.jpg
RENAME
tutorials/vector_point/tutorial.json
tutorials/simple_point/tutorial.json
{
- "title": "Vector Point",
+ "title": "Simple Point",
"hideNavbar": true,
"level": 0,
"order": 0,

Update tutorial description and wording; Update tutorial code indentation; Rename one tutorial;