3

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);
}
2

The Answer depends on what you mean by remote server.

Ideally, you would have a server connected to the internet (or maybe intranet only, dependent on your need). You would then install the OpenGeo suite on it, and copy your data into the Postgresql database on the Server.

You would then configure Geoserver to serve this data as WMS/WFS services, just like you have done on your development machine.

After this you would copy your JavaScript Application onto a webserver on that server, making sure that it is pointing to the geoserver on that machine, and is accessible from clients.

  • I used OpenGeoSuite account for GeoServer and GeoExplorer...and there is no option anywhere how to publish it to remote GeoServer or even if I connected to internet and IIS Serveices enabled, I can't open it in other computer. It says webpage can not be loaded. I think there is someother way! – GP92 Feb 15 '13 at 14:29
  • 2
    OpenGeoSuite is a server product. You are supposed to install it on the server. You could install it on your machine for development purposes,but you need a similar setup for the deployment/production server. – Devdatta Tengshe Feb 15 '13 at 14:32
  • oh..I understand now..but even if I want to use my machine as server, my doubt is the link or the iframe it generated doesn't have any unique address...then how can it open and also it is not opening. For suppose here is the link and right now I shut down my OpenGeoSuite so I dont think it will work but see the address once...anybody can generated a similar address. – GP92 Feb 15 '13 at 14:37
  • "localhost:8080/cssteap/viewer/#maps/2" – GP92 Feb 15 '13 at 14:38
  • 1
    The first step is to access it using the server name. so your link should be http://<serverName>:8080/cssteap/viewer.. Then your system needs to be on the network. Only after that can people access the application using the Link. And Yes, your OpenGeo Suite needs to be running. – Devdatta Tengshe Feb 15 '13 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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