Show last authors
1 = Cartography =
2
3 To add the cartography functionality, edit the file dysoweb.properties located in the folder tomcat/webapps/dysoweb/WEB-INF/classes:
4
5 * add ",\" at the end of the last row.
6 * then add the row "com.almworks.sqlite4java" atthe end of the file.
7
8 Edit the file requeadb.xml located in dysoweb.home/config by adding the row :
9 <DbSpatial>true</DbSpatial>
10
11 In the Requea interface, go to the menu System Parameters in the item l’onglet Administrator and modify these two parameters:
12
13 * com.requea.osm.tiles.path : inform the path to the .mbtiles file
14 * com.requea.dynapage.geospatial.geomap : put the value OSM
15
16 = Use Cartography =
17 To display items on the map, you have to create an entity with a property type //spacial Geometry// and the format //2D Geodetic property// :
18 [[image:Capturedecran2015-06-02a09.35.43.png||style="font-family: sans-serif; font-size: 14px;"]]
19
20 To view the map from the .mbtiles file, create an entity derived from GeoMapView:
21 [[image:Capturedecran2015-06-01a17.54.55.png]]
22
23 Modify the script of the field Display rules or behavior in the properties sysView and sysZoom so that it point to your preferred location:
24
25 [[image:Capturedecran2015-06-01a17.55.14.png]]
26
27 [[image:Capturedecran2015-06-01a17.55.38.png]]
28
29 To display items on that map, edit the operation BuildMap with a script.
30
31 For example:
32
33 {{code language="javascript"}}
34 var map = {};
35 map.layers = [];
36 var layer;
37
38 layer = {};
39 layer.title = "Items";
40 layer.points = [];
41 layer.layers = [];
42
43 var flt = new Filter("seItem");
44
45 var iter = flt.search();
46
47 while(iter.hasNext()) {
48 var item = iter.next();
49 var pos = item.seGeoPosition;
50
51 //add the item on the map, at the position specified
52 layer.points.push({pos:pos });
53 }
54 map.layers.push(layer);
55
56 data = new Json(map);
57 }
58 {{/code}}
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation