forked from gwaldron/osgearth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeature_labels_script.earth
55 lines (45 loc) · 1.5 KB
/
feature_labels_script.earth
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!--
osgEarth Sample
This shows how to label point features with an attribute (with some extra zing).
-->
<map name="Feature Geometry Demo" type="geocentric" version="2">
<image name="world" driver="gdal">
<url>../data/world.tif</url>
</image>
<model name="cities" driver="feature_geom">
<features name="cities" driver="ogr">
<url>../data/world.shp</url>
</features>
<styles>
<script profile="full">
function addSomeExcitement() {
feature.properties.name = '***' + feature.properties.cntry_name + '!!!';
feature.save();
}
</script>
<style type="text/css">
cities {
icon: "../data/placemark32.png";
icon-placement: centroid;
icon-scale: 1.0;
icon-occlusion-cull: false;
icon-occlusion-cull-altitude: 8000;
icon-declutter: true;
text-script: addSomeExcitement();
text-content: [name];
altitude-offset: 100;
altitude-clamping: terrain;
altitude-technique: scene;
}
</style>
</styles>
</model>
<options lighting="false"/>
<screen_space_layout>
<out_animation_time> 0.0 </out_animation_time>
<in_animation_time> 0.25 </in_animation_time>
<min_animation_scale> 0.45 </min_animation_scale>
<min_animation_alpha> 0.35 </min_animation_alpha>
<sort_by_priority> true </sort_by_priority>
</screen_space_layout>
</map>