Matti has made some changes - thx.
But I don’t get it run ![]()
perhaps someone else has tried
r104
?
I’m doing it this way:
base layer OpenStreetMap
add WKTLayer
set some WKT coordinates as Linestring:
String wktText = “LINESTRING(8.887336 50.055967,8.888376 50.057001,8.888543 50.057247,8.888193 50.057068)”;
wktLayer.setWellKnownText(wktText);
but no map is displayed.
doing the same as a VectorLayer it works:
[font=Courier New]
Vector line = new PolyLine();
line.setCaption("Track 42");
Point[] points = new Point[4]
;
points[0]
= new Point(8.887336, 50.055967);
points[1]
= new Point(8.888376, 50.057001);
points[2]
= new Point(8.888543, 50.057247);
points[3]
= new Point(8.888193, 50.057068);
line.setPoints(points);
waypointLayer.addComponent(line);
[/font]
have all needed scripts included in gwt.xml:
[font=Courier New]
[/font]
customprojections is in public folder and contains:
[font=Courier New]
Proj4js.defs[“EPSG:4326”]
= “+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs”;
Proj4js.defs[“EPSG:900913”]
= “+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs”;
[/font]
Debug says:
EPSG:4326 → EPSG:900913
POINT(12.127891 47.85603)
POINT(1350070.6505163254 6082936.690183788)
ClassCastException: null
any idea what could be wrong ?
thx
ekke