Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- me.imageVectorSource = new ol.source.ImageVector({
- source: new ol.source.Vector({
- features: me.features
- }),
- style: Ext.bind(me.pointStyleFunction,me)
- });
- pointStyleFunction: function(feature, resolution) {
- var currentStyles =
- [
- new ol.style.Style({
- //first icon
- image: new ol.style.Icon({
- src: 'resources/img/vehicle.test.svg',
- scale: sc,
- }),
- //text shown below
- text: new ol.style.Text({
- text: textToShow,
- scale:sc
- fill: new ol.style.Fill({
- color: 'yellow'
- }),
- offsetY: textOffset,
- stroke: new ol.style.Stroke({
- color: 'black',
- width: 4
- }),
- })
- }),
- //second icon that should be rotated
- var rpIconStyle = new ol.style.Style({
- image: new ol.style.Icon({
- src: 'resources/img/rp.svg',
- scale: sc,
- rotation: rot
- }),
- });
- ];
Add Comment
Please, Sign In to add comment