openlayers-8.x-4.x-dev/src/Plugin/Interaction/Draw/js/draw.js

src/Plugin/Interaction/Draw/js/draw.js
Drupal.openlayersPluginManager.register({
  fs: 'openlayers.Interaction:Draw',
  init: function(data) {

    var featureOverlay = new ol.FeatureOverlay({
      style: new ol.style.Style({
        fill: new ol.style.Fill({
          color: 'rgba(255, 255, 255, 0.2)'
        }),
        stroke: new ol.style.Stroke({
          color: '#ffcc33',
          width: 2
        }),
        image: new ol.style.Circle({
          radius: 7,
          fill: new ol.style.Fill({
            color: '#ffcc33'
          })
        })
      })
    });
    featureOverlay.setMap(data.map);

    data.opt.features = featureOverlay.getFeatures();
    data.opt.type = 'Point';

    data.map.on('moveend', function(evt){
      var WKT = new ol.format.WKT();
    });

    return new ol.interaction.Draw(data.opt);
  }
});

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc