Guest User

Untitled

a guest
Jan 22nd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. me.imageVectorSource = new ol.source.ImageVector({
  2. source: new ol.source.Vector({
  3. features: me.features
  4. }),
  5. style: Ext.bind(me.pointStyleFunction,me)
  6. });
  7.  
  8. pointStyleFunction: function(feature, resolution) {
  9. var currentStyles =
  10. [
  11. new ol.style.Style({
  12. //first icon
  13. image: new ol.style.Icon({
  14. src: 'resources/img/vehicle.test.svg',
  15. scale: sc,
  16. }),
  17. //text shown below
  18. text: new ol.style.Text({
  19. text: textToShow,
  20. scale:sc
  21. fill: new ol.style.Fill({
  22. color: 'yellow'
  23. }),
  24. offsetY: textOffset,
  25. stroke: new ol.style.Stroke({
  26. color: 'black',
  27. width: 4
  28. }),
  29. })
  30. }),
  31. //second icon that should be rotated
  32. var rpIconStyle = new ol.style.Style({
  33. image: new ol.style.Icon({
  34. src: 'resources/img/rp.svg',
  35. scale: sc,
  36. rotation: rot
  37. }),
  38. });
  39. ];
Add Comment
Please, Sign In to add comment