1 var WGS84 = new OpenLayers.Projection("EPSG:4326");
2 var Mercator = new OpenLayers.Projection("EPSG:900913");
5 view: new OpenLayers.StyleMap({
6 "default": new OpenLayers.Style({
15 var map = new OpenLayers.Map('map', {
16 controls: [ new OpenLayers.Control.Attribution() ],
19 baseLayer = new OpenLayers.Layer.OSM("OSM", null, { attribution: SyjStrings.osmAttribution }),
21 layerOptions = {format: OpenLayers.Format.WKT,
23 styleMap: styleMap.view,
24 attribution: SyjStrings.geomAttribution },
26 viewLayer = new OpenLayers.Layer.Vector("View Layer", layerOptions),
27 wkt = new OpenLayers.Format.WKT({ internalProjection: Mercator, externalProjection: WGS84 });
29 map.addLayers([baseLayer, viewLayer]);
30 viewLayer.addFeatures([wkt.read(gInitialGeom.data)]);
31 extent = viewLayer.getDataExtent();
33 map.zoomToExtent(extent);
37 if (window.addEventListener) {
38 window.addEventListener("load", init, false);
40 window.attachEvent("onload", init);