Hi Sun,
to highlight a street..
I am trying the second solution you suggest: "return the WKT of the feature found in the call back method (the Test() method above) to the client side, and add this WKT to a vector layer by OpenLayers to display it"
I am having problem displaying the feature on the client side..
it finds the feature of the street, returns the WKT of it
it receives that from the client side and does like the following
/*wkt is returned be webserver .. e.g. MULTILINESTRING((-13707598.2315822 6306247.50580723,-13707633.8538192 6306250.91203384,-13707715.1170475 6306267.94318751))*/
function temp (wkt)
{
if(wkt !="")
{
var vectorLayer = new OpenLayers.Layer.Vector("Street");
var wktParser = new OpenLayers.Format.WKT();
var geometry = wktParser.read(wkt);
var feature = new OpenLayers.Feature.Vector(geometry);
vectorLayer.addFeatures(feature);
Map1.GetOpenLayersMap().addLayers(vectorLayer);
vectorLayer.display =true; //or something else??
}
nothing happens.. do you have any idea what's the problem is? Thanks a lot!
Roson