require('../node_modules/openlayers/dist/ol.css');
require('./index.css');

var ol = require('openlayers');

var map = new ol.Map({
  controls: ol.control.defaults({attributionOptions: {collapsible: false}}),
  target: 'map',
  layers: [
    new ol.layer.Tile({
      source: new ol.source.OSM()
    })
  ],
  view: new ol.View({
    center: ol.proj.fromLonLat([16.373064, 48.20833]),
    zoom: 13
  })
});

@@ -64,25 +64,24 @@
 ndex.css');%0A
-%0A
 var ol = req
@@ -104,301 +104,1552 @@
 ');%0A
-%0Avar map = new ol.Map(%7B%0A  controls: ol.control.defaults(%7BattributionOptions: %7Bcollapsible: false%7D%7D),%0A  target: 'map',%0A  layers: %5B%0A    new ol.layer.Tile(%7B%0A      source: new ol.source.OSM()%0A    %7D)%0A  %5D,%0A  view: new ol.View(%7B%0A    center: ol.proj.fromLonLat(%5B16.373064, 48.20833%5D),%0A    zoom: 13%0A  %7D
+var send = require('./feedback_send');%0A%0Avar url = 'http://student.ifip.tuwien.ac.at/geoserver/wfs';%0Avar layer = 'feedback';%0Avar prefix = 'g04_2015';%0Avar featureNS = 'http://g04/2015';%0Avar form = document.getElementById('feedback');%0A%0Avar feedbackPoints = new ol.source.Vector(%7B%0A  features: new ol.Collection(),%0A%7D);%0A%0Avar map = new ol.Map(%7B%0A  controls: ol.control.defaults(%7BattributionOptions: %7Bcollapsible: false%7D%7D),%0A  target: 'map',%0A  layers: %5B%0A    new ol.layer.Tile(%7B%0A      source: new ol.source.OSM()%0A    %7D),%0A    new ol.layer.Tile(%7B%0A      source: new ol.source.TileWMS(%7B%0A        url: url,%0A        params: %7BLAYERS: prefix + ':' + layer%7D%0A      %7D)%0A    %7D),%0A    new ol.layer.Vector(%7B%0A      source: feedbackPoints%0A    %7D)%0A  %5D,%0A  view: new ol.View(%7B%0A    center: ol.proj.fromLonLat(%5B16.373064, 48.20833%5D),%0A    zoom: 13%0A  %7D)%0A%7D);%0A%0Avar feature = new ol.Feature();%0Afeature.setGeometryName('geom');%0Afeature.setGeometry(new ol.geom.Point(map.getView().getCenter()));%0AfeedbackPoints.addFeature(feature);%0Avar modify = new ol.interaction.Modify(%7B%0A  features: feedbackPoints.getFeaturesCollection()%0A%7D);%0Amap.addInteraction(modify);%0A%0Avar geolocation = new ol.Geolocation(%7B%0A  projection: map.getView().getProjection(),%0A  tracking: true%0A%7D);%0Ageolocation.once('change:position', function(evt) %7B%0A  feature.getGeometry().setCoordinates(geolocation.getPosition());%0A  map.getView().setCenter(geolocation.getPosition());%0A%7D);%0A%0Asend(form, feature, url, %7B%0A  featureType: layer,%0A  featurePrefix: prefix,%0A  featureNS: featureNS,%0A  srsName: map.getView().getProjection().getCode(
 )%0A%7D)

Update index.js