there are some source on net when you googling. you can check following links for some information.
1.Graphserver - The open-source multi-modal trip planner.
2.pgRouting III: PHP + OpenLayers Interface
3.pgRouting 1.01 with OpenLayers 2.5 on Ubuntu 7.10
4.Getting the OpenLayers-Code for the Routing-application
EDIT:
if you search ready to use service of routing you can use ArcGIS Online locator and routing services. For some information you should read this. But you must know that you are restirected with European Routing and North American Routing.It has multi - language support.
For north Amerikan support the service details are there and when you want to use this you shoul write your details here
So from arcgis service you can add json result to openlayers in this way. i have my routing service on arcgis and i âm using this way for routing....
i hope it helps you
you can catch your opened(active) popup with this way:
map.popups[a]
you can change so update its content:
map.popups[a].contentHTML = 'Test Content';
map.popups[a].redraw();
or
map.popups[a].setContentHTML = 'Test Content'
you can show or hide your popup:
map.popups[a].show();
map.popups[a].hide();
you can update position of your popup:
map.popups[a].lonlat.lon = 10;
map.popups[a].lonlat.lat = 10;
map.popups[a].updatePosition();
for openlayers cluster you should check out Cluster Strategy Example here. Only one thing you should do is that define fillColor or externalGraphic for your cluster.
var style = new OpenLayers.Style({
pointRadius: "${radius}",
fillColor: "${getColor}",
fillOpacity: 0.8,
strokeColor: "#cc6633",
strokeWidth: 2,
strokeOpacity: 0.8
}, {
context: {
radius: function(feature) {
return Math.min(feature.attributes.count, 7) + 3;
},
getColor: function(feature) {
return // Your color selection logic;
}
}
});
As the last question, i dont understand very well what you want? but try to use removeFeatures instead of destroyFeatures....
i hope it helps you...
Best Answer
I always use ASP.NET Handler (.ashx) for object requests. Web Services may look older technology than WCF services,but in technique they are similar.You can use them as well.
If I wish to present json in ASP.NET,I think of two ways:
One of which,If I wish to change the content of my json by adding properties to each feature etc.,then I simply create a class containing all values of my content and serialize JSON and serve within my handler as response.
Second one is,serve directly from your database as json string with or without using services (simple get request would be enough) by implementing stored procedures and functions,I use one in Oracle for SDO_Geometry that I hope there are similar one in MSSQL Spatial.
For performance:
Best Regards
Myra