oops, I just saw that my colleague accidentally deleted the line that
caused the error. So, for a couple minutes one could not reproduce ther
error, recently. However, this also clearly indicates that the symbol
scaling line (line 88) causes the problem ...
This line rescales geometry within the original symbol definition.
Andreas
Andreas Neumann wrote:
Hello,
here is my second problem concerning the same prototype
http://www.carto.net/geofotos/index.svg
one can reproduce the error when zooming in (e.g. with the Plus button
in the map navigation window).
The error occurs after the following line in
http://www.carto.net/geofotos/photos.js
Line 88:
document.getElementById("cameraSmallSymbGeom").setAttributeNS(null,"transform","scale("+(myMainMap.curWidth
* 0.002)+")");
In this line I am changing the transform attribute of a geometry within
a symbol definition, to dynamically update the symbol size after a zoom
in. The involved symbol has the id "cameraSmall" and can be found in
http://www.carto.net/geofotos/index.svg
Prior to that I removed the old content (use elements of the involved
symbol) and after that line I am recreating new use elements.
The error I get is the following:
-----------
java.lang.NullPointerException
at
org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown Source)
at
org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown Source)
at
org.apache.batik.dom.events.EventSupport.dispatchEvent(Unknown Source)
at org.apache.batik.dom.AbstractNode.dispatchEvent(Unknown Source)
at
org.apache.batik.dom.AbstractElement.fireDOMAttrModifiedEvent(Unknown
Source)
at org.apache.batik.dom.AbstractAttr.setNodeValue(Unknown Source)
at org.apache.batik.dom.AbstractAttr.setValue(Unknown Source)
at org.apache.batik.dom.AbstractElement.setAttributeNS(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230)
at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191)
at org.mozilla.javascript.gen.c160.call(photos.js:88)
at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191)
at org.mozilla.javascript.gen.c158.call(photos.js:49)
at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191)
at org.mozilla.javascript.gen.c29.call(helper_functions.js:444)
at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191)
at
org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1573)
at
org.apache.batik.script.rhino.RhinoInterpreter.callMethod(Unknown Source)
at
org.apache.batik.script.rhino.WindowWrapper$GetURLObjectWrapper.getURLDone(Unknown
Source)
at org.apache.batik.bridge.ScriptingEnvironment$7.run(Unknown
Source)
at org.apache.batik.util.RunnableQueue.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
----------
This error appears around 132 times, like twice for each symbol I had in
the previous map extent.
I don't know what I am doing wrong here. Does it have to do something
with updating the symbol definition or whith removing and recreating the
symbols?
Thanks for any hint,
Andreas
--
----------------------------------------------
Andreas Neumann - Institute of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg
CH-8093 Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: [EMAIL PROTECTED]
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]