1

I try to add wms layer from geoserver:

var layer = new OpenLayers.Layer.WMS(name, 'http://'+ self.objSettings.ip + ':' + self.objSettings.port + self.objSettings.wms,
    {
        srs: 'EPGS:4326',
        layers: name,
        styles: '',
        transparent: true,
    },
    {
        isBaseLayer: false,
        singleTile: true,
        opacity: 0.8,
        visibility: true,
    }
);

But point appears at (0,0).enter image description here

Gdalinfo of geotiff, which I use for creating a layer:

Driver: GTiff/GeoTIFF
Files: pkmanager_295557648395020263_undefined.TIF
Size is 299, 409
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (45.163320799224309,39.151851082312362)
Pixel Size = (0.001392666663209,-0.000743564600941)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  45.1633208,  39.1518511) ( 45d 9'47.95"E, 39d 9' 6.66"N)
Lower Left  (  45.1633208,  38.8477332) ( 45d 9'47.95"E, 38d50'51.84"N)
Upper Right (  45.5797281,  39.1518511) ( 45d34'47.02"E, 39d 9' 6.66"N)
Lower Right (  45.5797281,  38.8477332) ( 45d34'47.02"E, 38d50'51.84"N)
Center      (  45.3715245,  38.9997921) ( 45d22'17.49"E, 38d59'59.25"N)
Band 1 Block=299x6 Type=Byte, ColorInterp=Red
  NoData Value=0
Band 2 Block=299x6 Type=Byte, ColorInterp=Green
  NoData Value=0
Band 3 Block=299x6 Type=Byte, ColorInterp=Blue
  NoData Value=0
Band 4 Block=299x6 Type=Byte, ColorInterp=Alpha
  NoData Value=0

Url, which is called:

http://192.168.200.67:8081/geoserver/sf/wms?height=1024&width=1024&layers=sf:pkmanager_295557648395020263_undefined&request=GetMap&service=wms&styles=raster&format_options=SUPEROVERLAY:false;KMPLACEMARK:false;KMSCORE:40;KMATTR:true;&srs=EPSG:4326&format=application/vnd.google-earth.kmz&transparent=false&version=1.1.1

6
  • You need to include the actual http reference that is used, using a Debugger to see what is actually being called. What is self.objSettings.wms, hard to answer without all the information ..Please post the actual url being called using firebug or similar .. Jul 23, 2014 at 11:26
  • Http reference look like 192.168.200.79:8081/geoserver/sf/… Jul 23, 2014 at 12:11
  • Can you add it to your question please .. it comes up as a link here .. Jul 23, 2014 at 12:22
  • I edited my question. Jul 23, 2014 at 12:37
  • Are you intending to download a kmz file? Have you styled the layer with SLD or are you trying to extract the shape file data as a Kml file which is vector data? I think you need top be a lot more specific with how you has set up the layers in geoserver. Vector data usually goes on a Vector Layer, not a WMS Layer Jul 24, 2014 at 2:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.