Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // -------- Defining default style settings ----------
- //
- var fill = new ol.style.Fill({
- color: 'rgba(255,255,255,0.4)'
- });
- var stroke = new ol.style.Stroke({
- color: '#3399CC',
- width: 1.25
- });
- var text = new ol.style.Text({
- text: "",
- font: "16px Calibri,sans-serif",
- fill: new ol.style.Fill({
- color: [255, 255, 255, 1]
- }),
- stroke: new ol.style.Stroke({
- color: [0, 0, 0, 1],
- width: 2.5
- })
- });
- var image = new ol.style.Circle({
- fill: fill,
- stroke: stroke,
- radius: 5
- });
- var icon = new ol.style.Icon({
- anchor: [0.5, 0.5],
- size: [52, 52],
- offset: [52, 0],
- opacity: 0.5,
- scale: 1.0,
- src: "./img/mmOrange.png"
- });
- var style = new ol.style.Style({
- image: image, // this works, but when I use image: icon, nothing is displayed
- fill: fill,
- stroke: stroke,
- text: text
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement