Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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);
}
share|improve this question
    
You can use your IP address (instead of localhost) to have others access it. –  Mapperz Feb 15 '13 at 14:37
    
so will it change everytime I use a different internet connection? –  Jeevan Patnaik Feb 15 '13 at 14:39
1  
It depends how your network is set up. You will need to have a static IP address (rather than DHPC en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol) - I use Oracle Virtual Box on the same PC/Laptop just using static IP –  Mapperz Feb 15 '13 at 14:49
1  
1  
I use the settings in the virtual box to map a drive to the local pc or vice-versa - see operating-systems.wonderhowto.com/how-to/… –  Mapperz Feb 15 '13 at 15:50

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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! –  Jeevan Patnaik 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. –  Jeevan Patnaik Feb 15 '13 at 14:37
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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