Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At our scenario, there is a server which stores the feature info (coordinates, properties, etc) into a SQL database. Google Maps are used for a layer. The geoJSON data format are used for communication between our server and web mapping client. We want to create/use a WCF (Windows Communication Foundation) service as a communication protocol. Should I implement OpenLayers.Protocol.WFS as a WCF protocol because OpenLayers supports HTTP or WFS as protocol? Or which OpenLayers.Protocol (HTTP or WFS) should I prefer which design patterns provided at?

Thanks a lot for your helps and clarifications,


share|improve this question

Sorry, I never work with WCS, but I can clarify you a bit how to work with OL.

The OpenLayers.Protocol determines the way OL comunicates with the server, for example, using HTTP (OpenLayers.Protocol.HTTP) or using WFS (OpenLayers.Protocol.WFS).

The protocol class allows you to set a "format" property, which determines the way we can read/write from/to a specific data format, for example: OpenLayers.Format.KML, OpenLayers.Format.GeoJSON, etc.

You can create a OpenLayers.Protocol.HTTP instance by hand and set its format as OpenLayers.Format.GeoJSON.

At book OpenLayers Cookbook you have a recipe on "how to use protocols":

var geojsonReq = new OpenLayers.Protocol.HTTP({
    url: "URL_TO_YOUR_GeoJSON_FILE",
    format: new OpenLayers.Format.GeoJSON(),
    callback: addFeaturesFromResponse // Some function to manage features 


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.