Hi

Could anyone point me to a good example on how can I display a 
multilinestring in openlayers?

I used the code from pgRouting example, but is does now work (with some 
modifications), here is a part of my javascript:

// routeStyle is defined as a red line
redRoute = new OpenLayers.Layer.Vector(" Route ", {style: routeStyle});

parser = new OpenLayers.Format.WKT();
var wkt = " MULTILINESTRING((-0.0299018 51.4500794,-0.0299125 
51.4498053,-0.0298696 51.4495245,-0.0298696 51.4493774))"
var geometry = parser.read(wkt);

var feature = new OpenLayers.Feature.Vector(geometry);

redRoute.addFeatures(feature);

function init(){
           
// map is diplayed in element id = "map"
                map = new OpenLayers.Map(document.getElementById("map"));
                var goog= new OpenLayers.Layer.Google("Google ");
                map.addLayers([goog,markers, redRoute]);
}

Please c could you help me and explain what is wrong?

Thanx

Yatzek


_______________________________________________
Routing mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/routing

Reply via email to