GeoXML is for processing KML in the browser. GML is not KML, so that won't work. You can overlay GML on Google Maps API v3 using OpenLayers. I can't find a demo link, but here is an example:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>Google Maps API v3 and WFS</title>
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css">
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/google.css" type="text/css">
<link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?v=3.5&sensor=false"></script>
<script src="http://openlayers.org/dev/lib/Firebug/firebug.js"></script>
<script src="http://openlayers.org/dev/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init() {
OpenLayers.ProxyHost= "proxy.cgi?url=";
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: google.maps.MapTypeId.TERRAIN}
);
var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
var wfs = new OpenLayers.Layer.Vector("States", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://demo.opengeo.org/geoserver/wfs",
featureType: "states",
featureNS: "http://www.openplans.org/topp"
}),
renderers: renderer
});
map.addLayers([gphy, wfs]);
// Google.v3 uses EPSG:900913 as projection, so we have to
// transform our coordinates
map.setCenter(new OpenLayers.LonLat(-98.5795, 39.828175).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
), 3);
}
</script>
</head>
<body onload="init()">
<h1 id="title">Google (v3) Layer Example + WFS</h1>
<p id="shortdesc">
Demonstrate use the Google Maps v3 API with WFS.
</p>
<div id="map" class="smallmap"></div>
</body>
</html>
A couple of caveats:
- the script pulls the stylesheets and OpenLayer.js from the OpenLayers
site, you will want to change that to your local install of
OpenLayers
- you will need to set up a proxy since you are requesting GML from a
site outside your domain, please see
http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost
- the mapping portion (init()) is often written as a separate
javascript file, but it's included here to be explicit