I created some layers and upload it to PostGIS and then GeoServer and then styled it using GeoExplorer. I have done all this in localhost. I used the iframe generated in GeoExplorer and used it in my webpage. So I can open it in my computer. But I don't understand how to keep this in remote server so that everyone can access it. I used OpenGeoSuite for doing all this. Is the data I uploaded in PostGIS and GeoServer just located in my computer or in remote server? Please help!!
Question Extension
This is the code that I am trying to run. But it's not working even in the same machine:
var map;
function init() {
map = new OpenLayers.Map('map_element', {});
var road_name = new OpenLayers.Layer.WMS(
"IIRS:river_canal_project - Tiled",
"http://localhost:8080/geoserver/IIRS/wms",
{
LAYERS: 'IIRS:river_canal_project',
STYLES: '',
format: format,
tiled: true,
tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom
},
{
buffer: 0,
displayOutsideMaxExtent: true,
isBaseLayer: false,
yx : {'EPSG:4326' : true}
}
);
Var industrial_park = new OpenLayers.Layer.WMS(
"IIRS:future_industrial_project - Tiled",
"http://localhost:8080/geoserver/IIRS/wms",
{
LAYERS: 'IIRS:future_industrial_project',
STYLES: '',
format: format,
tiled: true,
tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom
},
{
buffer: 0,
displayOutsideMaxExtent: true,
isBaseLayer: false,
yx : {'EPSG:4326' : true}
}
);
var land_use = new OpenLayers.Layer.WMS(
"http://localhost:8080/geoserver/IIRS/wms",
{
LAYERS: 'IIRS:current_landuse_project',
STYLES: '',
format: format
},
{
singleTile: true,
ratio: 1,
isBaseLayer: true,
yx : {'EPSG:4326' : true}
}
);
map.addLayers([land_use, industrial_park, road_name]);
if(!map.getCenter()){
map.zoomToMaxExtent();
}
}
Along with the code, I inserted openlayers.js in script and only that. I found myself some mistakes and now I that can load the map but..the images are not loading. This is my edited code :
map = new OpenLayers.Map('map_element', {});
// setup tiled layer
var tiled = new OpenLayers.Layer.WMS(
"earth:ne_10m_railroads - Tiled",
"http://localhost:8080/geoserver/earth/wms",
{
LAYERS: 'earth:ne_10m_railroads',
STYLES: '',
format: OpenLayers.Format.WMSGetFeatureInfo,
tiled: true,
tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom
},
{
buffer: 0,
displayOutsideMaxExtent: true,
isBaseLayer: true,
yx : {'EPSG:900913' : false}
}
);
map.addLayer(tiled);
var bounds = new OpenLayers.Bounds(
-135.326858520508, -30.5615100860596,
179.357788085938, 69.604377746582
);
map.zoomToExtent(bounds);
}
