public static Layer GetGML(string layerName, string fileName, bool visibility) { return(new Layer(layerName, string.Format(@"new OpenLayers.Layer.GML('{0}', '{1}', {{projection: {2}, visibility: {3}, format: OpenLayers.Format.KML, formatOptions: {{extractStyles: true, extractAttributes: true}}, 'sphericalMercator': true}})", layerName, fileName, ProjectionFactory.GetGoogle(), visibility ? "true" : "false"), true)); }