Index: /applications/editors/josm/plugins/irsrectify/build.xml
===================================================================
--- /applications/editors/josm/plugins/irsrectify/build.xml	(revision 24996)
+++ /applications/editors/josm/plugins/irsrectify/build.xml	(revision 24997)
@@ -33,5 +33,5 @@
     <property name="commit.message" value="New plugin - irsrectify" />
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="3000" />
+    <property name="plugin.main.version" value="3715" />
 
 
@@ -65,5 +65,5 @@
     <target name="compile" depends="init">
         <echo message="compiling sources for  ${plugin.jar} ... "/>
-        <javac srcdir="src" classpath="${josm};../../dist/wmsplugin.jar" debug="true" destdir="${plugin.build.dir}">
+        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
             <compilerarg value="-Xlint:deprecation"/>
             <compilerarg value="-Xlint:unchecked"/>
@@ -106,5 +106,4 @@
                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
-		<attribute name="Plugin-Requires" value="wmsplugin"/>
             </manifest>
         </jar>
Index: /applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java
===================================================================
--- /applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java	(revision 24996)
+++ /applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java	(revision 24997)
@@ -2,9 +2,12 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+
 import javax.swing.JOptionPane;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
@@ -14,4 +17,5 @@
 import org.openstreetmap.josm.gui.JosmUserIdentityManager;
 import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.gui.layer.ImageryLayer;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -19,5 +23,4 @@
 import org.openstreetmap.josm.plugins.PluginInformation;
 import org.openstreetmap.josm.tools.Shortcut;
-import wmsplugin.WMSLayer;
 
 public class IRSRectifyPlugin extends Plugin {
@@ -45,12 +48,11 @@
 
         public void actionPerformed(ActionEvent e) {
-            WMSLayer wms = findWMSLayer();
-            if( wms == null )
+            ImageryLayer l = findImageryLayer();
+            if( l == null )
                 return;
 
             // calculate offset from wms layer
-            double ppd = wms.getPPD();
-            int dx = wms.getImageX(0);
-            int dy = wms.getImageY(0);
+            double dx = l.getDx();
+            double dy = l.getDy();
             if( dx == 0 && dy == 0 ) {
                 JOptionPane.showMessageDialog(Main.parent, tr("This option creates IRS adjustment layer and a little way inside it. You need to adjust WMS layer placement first.\nResulting layer is to be saved as .osm and sent to Komzpa (me@komzpa.net) with [irs rectify] in subject."));
@@ -59,5 +61,5 @@
             // create an offset way and add to dataset
             Node center = new Node(frame.mapView.getCenter());
-            Node offset = new Node(center.getEastNorth().add(dx/ppd, dy/ppd));
+            Node offset = new Node(center.getEastNorth().add(dx, dy));
             Way way = new Way();
             way.addNode(center);
@@ -67,6 +69,4 @@
             if( userName != null )
                 way.put("user", userName);
-            if( Math.abs(dx) < 10 && Math.abs(dy) < 10 )
-                way.put("note", tr("Zoom level was not enough to record an offset precisely"));
 
             OsmDataLayer data = findOrCreateDataLayer();
@@ -78,10 +78,10 @@
         }
 
-        private WMSLayer findWMSLayer() {
+        private ImageryLayer findImageryLayer() {
             if( frame == null || frame.mapView == null )
                 return null;
             for( Layer l : frame.mapView.getAllLayers() )
-                if( l instanceof WMSLayer )
-                    return (WMSLayer)l;
+                if( l instanceof ImageryLayer )
+                    return (ImageryLayer)l;
             return null;
         }
@@ -120,5 +120,5 @@
         @Override
         protected void updateEnabledState() {
-            setEnabled(findWMSLayer() != null);
+            setEnabled(findImageryLayer() != null);
         }
     }
