[mapserver-users] Re: WFS GetFeature on Mapserver doesn't work

2010-04-15 Thread sunny74

Hi Rahkonen,

I finally got two map files to work.
The first one I created using your technique i.e copy paste sample code from
wfs_server.html and then made necessary changes.

The first which uses shape file as data source is as follows:

NAME "Rail_WFS"
STATUS ON
SIZE 600 600
SYMBOLSET "symbols.sym"
EXTENT 67.440106 17.379867 78.390250 25.122977
UNITS METERS
SHAPEPATH "C:/ms4w/apache/htdocs/Shape"
IMAGECOLOR 255 255 255
FONTSET "fonts.txt"
CONFIG "PROJ_LIB" "C:\ms4w\proj\nad"


WEB
  IMAGEPATH "/ms4w/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
  METADATA
"wfs_title""GMap WFS Demo Server"  ## REQUIRED
"wfs_onlineresource"   "http://127.0.0.1/cgi-bin/mapserv.exe?";  ##
Recommended
"wfs_srs"   "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326"  ##
Recommended
#"ows_schemas_location" "http://ogc.dmsolutions.ca";  ## Optional
  END
END

PROJECTION
  "init=epsg:4326"
END

LAYER
  NAME "state"
  METADATA
"wfs_title""state" ## REQUIRED
"gml_featureid" "ID" ## REQUIRED
"gml_include_items" "all"  ## Optional (serves all attributes for layer)
  END
  TYPE POLYGON
  STATUS DEFAULT
  DATA state
  PROJECTION
"init=epsg:4326"
  END
  DUMP TRUE   ## REQUIRED
  CLASS
NAME "state"
STYLE
  COLOR 200 255 0
  OUTLINECOLOR 120 120 120
END
#TEMPLATE "Demo_query_body_state.html"
  END
END # Layer

END # Map File

The second mapfile is the one about which I had made this post.I had
struggled a lot with this since yesterday.
Finally it started working after making a lot of changes.

The second mapfile is given below:

# Map file created from QGIS project file D:/QGIS
1.3/projects/delhi_trial.qqs.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
  NAME Delhi1_postgres.map
  # Map image size
  SIZE 600 600
  UNITS METERS
  SYMBOLSET 'C:\ms4w\Apache\htdocs\Delhi\Symbols.sym'
  FONTSET 'C:\ms4w\Apache\htdocs\Delhi\fonts.txt'
  EXTENT 76.507859 27.613907 78.439621 28.941223
  CONFIG "PROJ_LIB" "C:\ms4w\proj\nad"
  IMAGECOLOR 192 192 192

  # Background color for the map canvas -- change as desired
  
  
  # Legend
 
  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH "/ms4w/tmp/ms_tmp/"


# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL "/ms_tmp/"


# WMS server settings
METADATA
"wfs_title""GMap WFS Demo Server"  ## REQUIRED
"wfs_onlineresource"   "http://127.0.0.1/cgi-bin/mapserv.exe?";  ##
Recommended
"wfs_srs"   "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326"  ##
Recommended
#"wfs_request_method""GET"
#'queryable'  'true'
#"wfs_feature_info_mime_type" "gml"
END

#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See
MapServer documentation
  END

  LAYER
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=DelhiDB user=postgres 
password=postgres
port=5432"
DATA "the_geom FROM delhi_district USING UNIQUE gid USING 
SRID=4326"

NAME "delhi_district"
TYPE POLYGON
LABELITEM "polygon_nm"
CLASSITEM "polygon_nm"
 METADATA
"wfs_title""delhi_district" ## REQUIRED
"wfs_version" "1.0.0"
#"wfs_srs" "EPSG:4326"
#"wfs_typename" "delhi_district"
#"wfs_service" "WFS"
"wfs_featureid" "Polygon_nm"
"gml_include_items" "all"

 END

STATUS DEFAULT
#HEADER   ../templates/Demo_header.html
#TEMPLATE ../templates/Demo_query_body1.html
#FOOTER ../templates/Demo_footer.html
 PROJECTION
"init=epsg:42304"
 END
DUMP TRUE
#TRANSPARENCY 100
   
CLASS
   EXPRESSION 'Ghaziabad' 
   NAME 'Ghaziabad' 
   GROUP 'Ghaziabad'
   STYLE
 SYMBOL "quadrat" 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 255 0 127
   END
END
CLASS
   EXPRESSION 'Gautam Buddha Nagar' 
   NAME 'Gautam Buddha Nagar' 
   GROUP 'Gautam Buddha Nagar'
   STYLE
 SYMBOL "quadrat" 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 0 0 255
   END
END

CLASS
   EXPRESSION 'North West' 
   NAME 'North West' 
   GROUP 'North West'
   STYLE
 SYMBOL "quadrat" 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 255 0 255
   END
END
CLASS
   EXPRESSION 'South West' 
   NAME 'South West' 
   GROUP 'South West'
   STYLE
 SYMBOL "quadrat" 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 255 170 0
   END
END
CLASS
   EXPRESSION 'West' 
   NAME 'West' 
   GROUP 'West'
   STYLE
 SYMBOL "quadrat" 
  

[mapserver-users] Re: WFS GetFeature on Mapserver doesn't work

2010-04-15 Thread sunny74

Hi Rahkonen,

Thanks for your reply.
You are right again.The Getcapabilities is showing the layer and there is
one layer only.
But Getfeature is showing the same thing it had shown earlier i.e it is NOT
showing the features and the details of those features.

GetFeatures O/p

http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=delhi_district&OUTPUTFORMAT=XMLSCHEMA";>
−

missing



Another interesting thing.Although I have given REQUEST=GetFeature the
output is showing REQUEST=DescribeFeatureType.
Is it because mapserver is unable to find the features within the layer and
so it is changing the type of request?
What changes do I make so as to get GetFeatures working?

Thanks for your continued support.


-- 
View this message in context: 
http://n2.nabble.com/WFS-GetFeature-on-Mapserver-doesn-t-work-tp4905757p4906583.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: WFS GetFeature on Mapserver doesn't work

2010-04-15 Thread sunny74

Hi Rahkonen,

Thanks for your reply.
You had rightly pointed out that DUMP TRUE was missing.
On inserting it The output of GetFeature changed to the following:

http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=delhi_district&OUTPUTFORMAT=XMLSCHEMA";>
−

missing



Still I don't get to see the features
Although I have put a template file it is an HTML template.
So do I need to put a XML template.If so pls send me an example.
Do I need to put all the three templates i.e HEADER,TEMPLATE & FOOTER.
If yes pls send example for all three.

You have said "Feature List is empty" and so it doesn't appear in the
Getcapabilities.
What corrections are required in the layer settings for it to appear in the
Getcapabilities?

Thanks again.
-- 
View this message in context: 
http://n2.nabble.com/WFS-GetFeature-on-Mapserver-doesn-t-work-tp4905757p4906094.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] WFS GetFeature on Mapserver doesn't work

2010-04-14 Thread sunny74

Dear Friends,

I am trying to get WFS working on Mapserver but both Getcapabilities and
GetFeature are giving me errors.

I am firing the following urls directly in the browser:

Getcapabilities(map from DB )

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&SERVICE=WFS&VERSION=1.0.0&&REQUEST=GETcapabilities

GetFeature

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GETfeature
&typename=delhi_district

delhi_district is the name of my table in the postgres DB.

The o/p from Getcapabilities is:

http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd";>
−

−

MapServer WFS
GMap WFS Demo Server
−

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&;


−

−

−

−

−

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&"/>


−

−

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&"/>



−

−



−

−

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&"/>


−

−

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&"/>



−

−



−

−

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&"/>


−

−

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&"/>





−

−




−

−

−













−


−









The o/p from GetFeature is:

http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd";>
−


msWFSGetFeature(): WFS server error. TYPENAME 'delhi_district' doesn't exist
in this server.  Please check the capabilities and reformulate your request.
  



So none of the outputs are proper

My map File is as below:

# Map file created from QGIS project file D:/QGIS
1.3/projects/delhi_trial.qqs.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
  NAME Delhi1_postgres.map
  # Map image size
  SIZE 600 600
  UNITS dd
  SYMBOLSET 'C:\ms4w\Apache\htdocs\Delhi\Symbols.txt'
  FONTSET 'C:\ms4w\Apache\htdocs\Delhi\fonts.txt'
  EXTENT 76.507859 27.613907 78.439621 28.941223
  CONFIG "PROJ_LIB" "C:\ms4w\proj\nad"
  PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 192 192 192
  IMAGEQUALITY 95
  IMAGETYPE png
  OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/png'
#IMAGEMODE PC256
EXTENSION 'png'
  END
  # Legend
  LEGEND
  IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
  TYPE BITMAP
  SIZE MEDIUM
  COLOR 0 0 89
END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/tmp/'

# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'

# WMS server settings
METADATA
"wfs_title""GMap WFS Demo Server"  ## REQUIRED
"wfs_onlineresource"  
"http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map";  ##
Recommended
"wfs_srs"   "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326"  ##
Recommended
"wfs_request_method""GET"
 'queryable'  'true'
 "wfs_feature_info_mime_type" "gml"
END

#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See
MapServer documentation
  END

  LAYER
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=DelhiDB user=postgres 
password=postgres
port=5432"
DATA "the_geom FROM delhi_district as foo USING UNIQUE gid USING
SRID=4326"

NAME 'delhi_district'
TYPE POLYGON
LABELITEM "polygon_nm"
CLASSITEM "polygon_nm"
 METADATA
"wfs_title""WFS Map" ## REQUIRED
"wfs_version" "1.0.0"
"wfs_srs" "EPSG:4326"
"wfs_typename" "delhi_district"
"wfs_service" "WFS"
"gml_featureid" "gid"
 END

STATUS DEFAULT
HEADER   ../templates/Demo_header.html
TEMPLATE ../templates/Demo_query_body1.html
FOOTER ../templates/Demo_footer.html

TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
CLASS
   EXPRESSION 'Ghaziabad' 
   NAME 'Ghaziabad' 
   GROUP 'Ghaziabad'
   STYLE
 SYMBOL "quadrat" 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 255 0 127
   END
END
CLASS
   EXPRESSION 'Gautam Buddha Nagar' 
   NAME 'Gautam Buddha Nagar' 
   GROUP 'Gautam Buddha Nagar'
   STYLE
 SYMBOL "quadrat" 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 0 0 255
   END
END

CLASS
   EXPRESSION 'North West' 
   NAME 'North West' 
   GROUP 'North 

[mapserver-users] Re: mapserver not generating proper map

2010-03-22 Thread sunny74

Hi BrainDrain,

Thanks for your reply.
Your solution doesn't work.

the code relating to the info control is the culprit.
It started giving errors, then I commented it but after that the map was not
getting displayed.
Finally after a lot of effort I got the map but with problems stated
earlier.
After applying your code I find that the background is occupying 600 * 600
but the actual layers are coming small even though magnification level is 6
or more.

I think it is Openlayer 2.8 which is causing the problem.So I need to go
back to OL2.7.
But then is it possible to hav Get Feature Info in 2.7 from shape files? 
If you know how to do it pls send code across.




-- 
View this message in context: 
http://n2.nabble.com/mapserver-not-generating-proper-map-tp4776875p4779918.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapserver not generating proper map

2010-03-22 Thread sunny74

Hi,

I am generating a simple map but mapserver is not generating a proper map.
In fact initially it produced a proper one but after that due to code
changes or some other reason started producing this one.
My code to call mapserver is:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml";>


  
  
  var mapview, layer, layer1, map;

 function init() {

 //alert("in init");
 map = new OpenLayers.Map('<%=map.ClientID%>');

 //
 layer = new OpenLayers.Layer.WMS("OpenLayers WMS",
"http://172.16.0.144:9000/cgi-bin/mapserv.exe?";, { map:
'Shape/newwr1.map', layers: 'STATE', 'format': 'png' });

 //layer1 = new OpenLayers.Layer.WMS("RLine",
"http://172.16.0.144:9000/cgi-bin/mapserv.exe?";, { map: 'Shape/newwr1.map',
transparent: 'true', layers: 'RailwayStations', 'format': 'png' });

 highlightLayer = new OpenLayers.Layer.Vector("Highlighted
Features", {
 displayInLayerSwitcher: false,
 isBaseLayer: false
 }
);
 map.addLayers([layer]);
 map.setCenter(new OpenLayers.LonLat(73.25, 20.35), 6);
 //for (var i in infoControls) { 
 //infoControls[i].events.register("getfeatureinfo",
this, showInfo);
 //map.addControl(infoControls[i]); 
 //}

 map.addControl(new OpenLayers.Control.LayerSwitcher());
 map.zoomToMaxExtent();
 //infoControls.click.activate();



 }  
  
  
  









and my map file is:

# Map file created from QGIS project file D:/QGIS/newwr.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
  NAME newwr.map
  # Map image size
  SIZE 600 600
  UNITS dd
  EXTENT 67.440106 17.379867 78.390250 25.122977
  FONTSET 'D:\ms4w\Apache\cgi-bin\Shape\font.txt'
  PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
  END
  
  
  # Background color for the map canvas -- change as desired
  IMAGECOLOR 192 192 192
  IMAGEQUALITY 95
  IMAGETYPE gif
  OUTPUTFORMAT
NAME GIF
DRIVER 'GD/gif'
MIMETYPE 'image/gif'
#IMAGEMODE PC256
EXTENSION 'gif'
  END
  
  # Legend
  LEGEND
  IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
  TYPE BITMAP
  SIZE MEDIUM
  COLOR 0 0 89
END
  END
  
  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/tmp/'

# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'

# WMS server settings
METADATA
  'wms_title'   'newwr.map'
  'wms_onlineresource' 
'http://my.host.com/cgi-bin/mapserv?map=wms.map&;'
  'wms_srs' 'EPSG:4326'
END

#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See
MapServer documentation
  END

  LAYER
NAME 'STATE'
TYPE POLYGON
DATA 'D:\ms4w\Apache\cgi-bin\Shape\STATE.shp'

METADATA
  'wms_title' 'STATE'
END
STATUS DEFAULT
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'STATE' 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 255 255 127
   END
END
  END

  LAYER
NAME 'WaterBody'
TYPE POLYGON
DATA 'D:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
METADATA

But when my map comes up it is having a BBOX size of 256 * 256.
the url of the generated map is as follows:

http://172.16.0.144:9000/cgi-bin/mapserv.exe?MAP=Shape%2Fnewwr1.map&LAYERS=STATE&FORMAT=png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0,-90,180,90&WIDTH=256&HEIGHT=256

Why does it happen?
Is it because of some wrong openlayers code I have written or some bug?
What should I do to get back to the desired size i.e 600 * 600

Thanks for your attention & efforts.

-- 
View this message in context: 
http://n2.nabble.com/mapserver-not-generating-proper-map-tp4776875p4776875.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] getting Feature Info data directly from .shp files

2010-03-19 Thread sunny74

Dear Friends,

I want to get the Feature Info data directly from .shp files i.e shape
files.
Previously I had put all data into the database (postgres) then ran queries
on the DB
and the data returned is shown in a pop up.

But now I want to get all the column information of all the layers by
directly firing query on the individual .shp files.

How to do it?
Pls give me a working example.

Thanks for your replies.
-- 
View this message in context: 
http://n2.nabble.com/getting-Feature-Info-data-directly-from-shp-files-tp4763187p4763187.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] shapefile manipulation

2009-12-22 Thread sunny74

Hi,

I have got several shapefiles from which I am able to display map using
mapserver.
But the problem is that it has a srid value of -1 i.e no projection.
As a result of this several functionalities which uses geometry are not
working.
I think the default srid value is 4326.Pls confirm.

I want to convert the srid value from -1 to 4326.
How can I do this using QGIS?
I know this is possible using GEOMEDIA Web 6.0.

If anybody has any idea or tutorial regarding .shp manipulation using
Geomedia pls send it across.

Thanks for ur replies.

sunny74 
-- 
View this message in context: 
http://n2.nabble.com/shapefile-manipulation-tp4207328p4207328.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] symbol problem

2009-11-02 Thread sunny74

Dear Friends,


I have created a map file using QGIS and after that the symbols had to be
changed once.So I imported the symbols into QGIS and created a fresh map
file. But now again the symbols need to be changed and I followed the above
process.
But this time although symbols r getting imported into QGIS  and map is
created but it does not show up in the map. The smbols this time are a bit
bigger and do not confirm to a particular shape  like circle,ellipse etc.
The map file is showing symbol as "circle".

So where is the exact problem and how to overcome it.

The other issue is about how does mapserver know the path of the .svg file
when the only thing i.e written in the map file is "circle","ellipse".
How how it gets the entire path to the svg files for showing?

Thanks for ur reply.

Thanks for ur replies. 
-- 
View this message in context: 
http://n2.nabble.com/symbol-problem-tp3933418p3933418.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapserver not showing symbols

2009-10-29 Thread sunny74

Dear Friends,


I have created a map file using QGIS and after that the symbols had to be
changed once.So I imported the symbols into QGIS and created a fresh map
file. But now again the symbols need to be changed and I followed the above
process.
But this time although symbols r getting imported into QGIS  and map is
created but it does not show up in the map. The smbols this time are a bit
bigger and do not confirm to a particular shape  like circle,ellipse etc.
The map file is showing symbol as "circle".

So where is the exact problem and how to overcome it.

Thanks for ur replies.
-- 
View this message in context: 
http://n2.nabble.com/mapserver-not-showing-symbols-tp3917157p3917157.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] maploading problem

2009-10-06 Thread sunny74

Dear Friends,

The map from a mapserver takes enormously long time to load about 5 mins
when the server machine on which it works is set to accept public IP i.e
uses DHCP.
Most of the time it does not load at all - only a pink background is seen in
place of the map.
After changing a machine IP to public I also change the httpd file in conf
folder of Apache to
localhost:8085.
But despite this the above problem occurs.

Can someone tell me the cause of the problem and how to resolve?

Whether it can be solved by implementing mapfish?

Thanks for your responses.
-- 
View this message in context: 
http://n2.nabble.com/maploading-problem-tp3774596p3774596.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] SV: display feature name beside feature

2009-09-30 Thread sunny74

Hi,

Thanks for your reply.

Thanks to all of you for the support.

Warm Regards,

sunny.

Mads Helgi Poulsen wrote:
> 
> Read this: http://mapserver.org/mapfile/label.html
> 
> <http://mapserver.org/mapfile/label.html>and note the FORCE parameter.
> 
> On Wed, Sep 23, 2009 at 7:13 PM, sunny74  wrote:
> 
>>
>> What are the label attributes that make this happen?
>> What shud I do if I need to see all of the Labels at at single scale i.e
>> zoomin level.
>>
>> Thanks a lot for your support.
>>
>>
>>
> -- 
> Mads Helgi
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/display-feature-name-beside-feature-tp3668538p3747061.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] SV: display feature name beside feature

2009-09-23 Thread sunny74

Hi Lars,Steve

Thanks for your suggestions.
I am now  able to see the Label but not not at the base scale at which the
page loads for the first time.
I am able to see a few at the next zoomin level, followed by next set of
labels at a still higher zoomin level and so on.
What are the label attributes that make this happen?
What shud I do if I need to see all of the Labels at at single scale i.e
zoomin level.

Thanks a lot for your support.






Lars Westerlind wrote:
> 
> Try removing "CLASSITEM" from the layer with the label. As you have no
> expression, I think the class does not match. I also expect a warning for
> this in the log file. 
> 
> /Lars
> 
> -Ursprungligt meddelande-
> Från: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] För sunny74
> Skickat: 23 September 2009 06:58
> Till: mapserver-users@lists.osgeo.org
> Ämne: Re: [mapserver-users] display feature name beside feature
> 
> 
> Hi Steve,
> 
> Thanks for your reply.
> Regarding the railway points I was able to see the points before doing all
> this.
> I did all this just to see the Labels i.e names of the railway stations
> beside the points
> But I am not able to see this.
> Can u tell me where the problem is?
> 
> What am I doing wrong?
> 
> Thanks again.
> 
> Steve Lime wrote:
>> 
>> And you can see the railway points?
>> 
>>>>> On 9/21/2009 at 7:34 AM, in message
>>>>> <1253536453758-3684929.p...@n2.nabble.com>,
>> sunny74  wrote:
>> 
>>> Hi Lars,
>>> 
>>> I have added the fontset file and also the Label and other definitions
>>> at
>>> the appropriate places but still the Labels are not being displayed for
>>> the
>>> layer RailwayStation.
>>> 
>>> My map file now looks like this:
>>> 
>>> # Map file created from QGIS project file D:/QGIS/newwr.qgs
>>> # Edit this file to customize for your map interface
>>> # (Created with PyQgis MapServer Export plugin)
>>> MAP
>>>   NAME newwr.map
>>>   # Map image size
>>>   SIZE 600 600
>>>   UNITS dd
>>> 
>>>   EXTENT 67.440106 17.379867 78.390250 25.122977
>>>   FONTSET 'c:/ms4w/Apache/cgi-bin/shape/fonts.txt'
>>>   PROJECTION
>>> 'proj=longlat'
>>> 'ellps=WGS84'
>>> 'datum=WGS84'
>>> 'no_defs'
>>> ''
>>>   END
>>> 
>>>   # Background color for the map canvas -- change as desired
>>>   IMAGECOLOR 192 192 192
>>>   IMAGEQUALITY 95
>>>   IMAGETYPE gif
>>>   OUTPUTFORMAT
>>> NAME gif
>>> DRIVER 'GD/GIF'
>>> MIMETYPE 'image/gif'
>>> #IMAGEMODE PC256
>>> EXTENSION 'gif'
>>>   END
>>>   # Legend
>>>   LEGEND
>>>   IMAGECOLOR 255 255 255
>>> STATUS ON
>>> KEYSIZE 18 12
>>> LABEL
>>>   TYPE BITMAP
>>>   SIZE MEDIUM
>>>   COLOR 0 0 89
>>> END
>>>   END
>>> 
>>>   # Web interface definition. Only the template parameter
>>>   # is required to display a map. See MapServer documentation
>>>   WEB
>>> # Set IMAGEPATH to the path where MapServer should
>>> # write its output.
>>> IMAGEPATH '/tmp/'
>>> 
>>> # Set IMAGEURL to the url that points to IMAGEPATH
>>> # as defined in your web server configuration
>>> IMAGEURL '/tmp/'
>>> 
>>> # WMS server settings
>>> METADATA
>>>   'wms_title'   'newwr.map'
>>>   'wms_onlineresource' 
>>> 'http://my.host.com/cgi-bin/mapserv?map=wms.map&;'
>>>   'wms_srs' 'EPSG:4326'
>>> END
>>> 
>>> #Scale range at which web interface will operate
>>> # Template and header/footer settings
>>> # Only the template parameter is required to display a map. See
>>> MapServer documentation
>>>   END
>>> 
>>>   LAYER
>>> NAME 'STATE'
>>> TYPE POLYGON
>>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'
>>> LABELITEM 'STATE'
>>> CLASSITEM 'STATE'
>>> METADATA
>>>   'wms_title' 'STATE'
>>> END
&g

Re: [mapserver-users] display feature name beside feature

2009-09-22 Thread sunny74

Hi Steve,

Thanks for your reply.
Regarding the railway points I was able to see the points before doing all
this.
I did all this just to see the Labels i.e names of the railway stations
beside the points
But I am not able to see this.
Can u tell me where the problem is?

What am I doing wrong?

Thanks again.

Steve Lime wrote:
> 
> And you can see the railway points?
> 
>>>> On 9/21/2009 at 7:34 AM, in message
>>>> <1253536453758-3684929.p...@n2.nabble.com>,
> sunny74  wrote:
> 
>> Hi Lars,
>> 
>> I have added the fontset file and also the Label and other definitions at
>> the appropriate places but still the Labels are not being displayed for
>> the
>> layer RailwayStation.
>> 
>> My map file now looks like this:
>> 
>> # Map file created from QGIS project file D:/QGIS/newwr.qgs
>> # Edit this file to customize for your map interface
>> # (Created with PyQgis MapServer Export plugin)
>> MAP
>>   NAME newwr.map
>>   # Map image size
>>   SIZE 600 600
>>   UNITS dd
>> 
>>   EXTENT 67.440106 17.379867 78.390250 25.122977
>>   FONTSET 'c:/ms4w/Apache/cgi-bin/shape/fonts.txt'
>>   PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>>   END
>> 
>>   # Background color for the map canvas -- change as desired
>>   IMAGECOLOR 192 192 192
>>   IMAGEQUALITY 95
>>   IMAGETYPE gif
>>   OUTPUTFORMAT
>> NAME gif
>> DRIVER 'GD/GIF'
>> MIMETYPE 'image/gif'
>> #IMAGEMODE PC256
>> EXTENSION 'gif'
>>   END
>>   # Legend
>>   LEGEND
>>   IMAGECOLOR 255 255 255
>> STATUS ON
>> KEYSIZE 18 12
>> LABEL
>>   TYPE BITMAP
>>   SIZE MEDIUM
>>   COLOR 0 0 89
>> END
>>   END
>> 
>>   # Web interface definition. Only the template parameter
>>   # is required to display a map. See MapServer documentation
>>   WEB
>> # Set IMAGEPATH to the path where MapServer should
>> # write its output.
>> IMAGEPATH '/tmp/'
>> 
>> # Set IMAGEURL to the url that points to IMAGEPATH
>> # as defined in your web server configuration
>> IMAGEURL '/tmp/'
>> 
>> # WMS server settings
>> METADATA
>>   'wms_title'   'newwr.map'
>>   'wms_onlineresource' 
>> 'http://my.host.com/cgi-bin/mapserv?map=wms.map&;'
>>   'wms_srs' 'EPSG:4326'
>> END
>> 
>> #Scale range at which web interface will operate
>> # Template and header/footer settings
>> # Only the template parameter is required to display a map. See
>> MapServer documentation
>>   END
>> 
>>   LAYER
>> NAME 'STATE'
>> TYPE POLYGON
>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'
>> LABELITEM 'STATE'
>> CLASSITEM 'STATE'
>> METADATA
>>   'wms_title' 'STATE'
>> END
>> STATUS DEFAULT
>> TRANSPARENCY 100
>>
>> PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>> END
>> CLASS
>>NAME 'STATE' 
>>STYLE
>>  SYMBOL 0 
>>  SIZE 2 
>>  OUTLINECOLOR 0 0 0
>>  COLOR 255 255 127
>>END
>> END
>>   END
>> 
>>   LAYER
>> GROUP 'basic1'
>> NAME 'WaterBody'
>> TYPE POLYGON
>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
>> METADATA
>>   'wms_title' 'WaterBody'
>> END
>> STATUS OFF
>> TRANSPARENCY 100
>> PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>> END
>> CLASS
>>NAME 'WaterBody' 
>>MAXSCALEDENOM 200
>>MINSCALEDENOM 150
>>STYLE
>>  SYMBOL 0 
>>  SIZE 2 
>>  OUTLINECOLOR 0 0 0
>>  COLOR 150 123 90
>>END
>> END
>>   END
>> 
>>   LAYER
>&g

Re: [mapserver-users] display feature name beside feature

2009-09-21 Thread sunny74
 STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 144 50 207
 COLOR 0 0 0
   END
END
  END

  LAYER
GROUP 'basic2'
NAME 'Rail_Side_Line'
TYPE LINE
DATA 'C:\ms4w\Apache\cgi-bin\Shape\Rail_Side_Line.shp'
METADATA
  'wms_title' 'Rail_Side_Line'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'Rail_Side_Line'
   MAXSCALEDENOM 150
   MINSCALEDENOM 100
 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 170 115 90
 COLOR 0 0 0
   END
END
  END

  LAYER
GROUP 'basic'
NAME 'RailwayLine'
TYPE LINE
DATA 'C:\ms4w\Apache\cgi-bin\Shape\RailwayLine.shp'

METADATA
  'wms_title' 'RailwayLine'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'RailwayLine'
   
 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 255 0 0
 COLOR 255 0 0
   END
END
  END

  LAYER
GROUP 'basic2'
NAME 'LANDMARKS'
TYPE POINT
DATA 'C:\ms4w\Apache\cgi-bin\Shape\LANDMARKS.shp'
METADATA
  'wms_title' 'LANDMARKS'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'LANDMARKS' 
   MAXSCALEDENOM 150
   MINSCALEDENOM 100

   STYLE
 SYMBOL 'CIRCLE' 
 SIZE 8 
 OUTLINECOLOR 0 0 0
 COLOR 229 210 191
   END
END
  END

  LAYER
GROUP 'basic'
NAME 'RailwayStations'
TYPE POINT
DATA 'C:\ms4w\Apache\cgi-bin\Shape\RailwayStations.shp'
CLASSITEM 'S_NAME'
LABELITEM 'S_NAME'
METADATA
  'wms_title' 'RailwayStations'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'RailwayStations' 
   STYLE
 SYMBOL 'CIRCLE' 
 SIZE 8 
 OUTLINECOLOR 0 0 0
 COLOR 255 0 0
   END
LABEL
COLOR 132 31 31
SHADOWCOLOR 218 218 218
SHADOWSIZE 2 2
TYPE TRUETYPE
FONT arial-bold  
SIZE 12
ANTIALIAS TRUE
POSITION CL
PARTIALS FALSE
MINDISTANCE 300
BUFFER 4
  END # end of label 
   
END

  END

  LAYER
GROUP 'basic3'
NAME 'LC_Gate'
TYPE POINT
DATA 'C:\ms4w\Apache\cgi-bin\Shape\LC_Gate.shp'
METADATA
  'wms_title' 'LC_Gate'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'LC_Gate'
   MAXSCALEDENOM 100
   MINSCALEDENOM 50
 
   STYLE
 SYMBOL 'CIRCLE' 
 SIZE 8 
 OUTLINECOLOR 0 0 0
 COLOR 15 155 200
   END
END
  END

  LAYER
GROUP 'basic3'
NAME 'Bridges_Minor'
TYPE POINT
DATA 'C:\ms4w\Apache\cgi-bin\Shape\Bridges_Minor.shp'
METADATA
  'wms_title' 'Bridges_Minor'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'Bridges_Minor'
   MAXSCALEDENOM 100
   MINSCALEDENOM 50
 
   STYLE
 SYMBOL 'CIRCLE' 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 43 253 114
   END
END
  END

  LAYER
GROUP 'basic3'
NAME 'Bridge_Major'
TYPE POINT
DATA 'C:\ms4w\Apache\cgi-bin\Shape\Bridge_Major.shp'
METADATA
  'wms_title' 'Bridge_Major'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'Bridge_Major'
   MAXSCALEDENOM 100
   MINSCALEDENOM 50
 
   STYLE
 SYMBOL 'CIRCLE' 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 97 136 146
   END
END
  END

  

Re: [mapserver-users] display feature name beside feature

2009-09-20 Thread sunny74

Hi Michael,

Thanks for your reply.
I had gone thru' the links you have given before making this post.But I am
having the problems given in the link below:

http://n2.nabble.com/font-error-while-trying-to-show-Label-on-map-td3654455.html#a3654455
When using truetype I get the error probably bec' I am not able to specify
the fontset file.
So I need to know the following:
1) What kind of file is the fontset file?I think it is a text file
2) Where do I keep the fontset file - in the same folder as the map file or
in different folder.If different folder how do I specify the path in the map
file.
3) Where do I keep the fonts? Is it okay if I keep it in the Windows Font
Folder i.e C:/Windows/Fonts
4)How do I specify the path of the fonts in the fontset file?

Pls give ur answer so as to solve this problem.



After 

Michael Schulz wrote:
> 
> Hi,
> 
> you can use the labeling options mapserver offers. Labeling can be
> accomplished by adding a label section to a class of a layer. You can
> define the labelitem aka. a fieldname of a shape's attributes or a
> database table, that mapserver takes the value from to actually label
> a feature.
> 
> Read on here:
> - http://mapserver.org/introduction.html#label
> - http://mapserver.org/mapfile/label.html
> 
> If you want to have the labeling as a separate layer, that can be
> turned on and off, you should have a look at the annotation layer
> type.
> 
> Cheers, Michael
> 
> 2009/9/18 sunny74 :
>>
>> Hi,
>>
>> I have  a number of features(Layers) in my map.One of the feature is a
>> Water
>> Body.
>>
>> How can I display the feature name beside the feature?
>> Is there anything in the map file which can do this or do I have to do
>> this
>> thru' coding in js?
>> I am using mapserver v 5.0.0 with openlayers.
>>
>> If anybody has a solution pls mention in detail.
>>
>> Thanks for your reply.
>> --
>> View this message in context:
>> http://n2.nabble.com/display-feature-name-beside-feature-tp3668538p3668538.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> 
> 
> 
> -- 
> ~~~
> Besuchen Sie uns auf der INTERGEO 2009: 22.09. - 24.09.2009 in Karlsruhe;
> Halle 1, Stand 1.417
> ~~~
> Aufwind durch Wissen!
> 
> Qualifizierte Open Source Schulungen bei der
> http://www.foss-akademie.de/
> ~~~
> 
> ---
> Michael Schulz
> msch...@webgis.de
> 
> in medias res
> Gesellschaft für Informationstechnologie mbH
> 
> +++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++
> 
> Schwimmbadstraße 2
> D-79100  Freiburg i. Br.
> 
> Tel:  +49 (0)761 705798-102
> Tel:  +49 (0)761 705798-0
> Fax: +49 (0)761 705798-09
> 
> +++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++
> 
> http://www.webgis.de / http://www.zopecms.de
> --
> Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
> Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/display-feature-name-beside-feature-tp3668538p3681031.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] display feature name beside feature

2009-09-18 Thread sunny74

Hi,

I have  a number of features(Layers) in my map.One of the feature is a Water
Body.

How can I display the feature name beside the feature?
Is there anything in the map file which can do this or do I have to do this
thru' coding in js?
I am using mapserver v 5.0.0 with openlayers.

If anybody has a solution pls mention in detail.

Thanks for your reply.
-- 
View this message in context: 
http://n2.nabble.com/display-feature-name-beside-feature-tp3668538p3668538.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] display feature name beside feature

2009-09-18 Thread sunny74

Hi,

I have  a number of features(Layers) in my map.One of the feature is a Water
Body.

How can I display the feature name beside the feature?
Is there anything in the map file which can do this or do I have to do this
thru' coding in js?
I am using mapserver v 5.0.0 with openlayers.

If anybody has a solution pls mention in detail.

Thanks for your reply.
-- 
View this message in context: 
http://n2.nabble.com/display-feature-name-beside-feature-tp3668528p3668528.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] turning on layers at a particular zoom level

2009-09-06 Thread sunny74

Hi Bill,

Thanks for your reply.

I am now loading the layers in groups instead of individually.
First I am loading the base layer followed by 4 groups of layers, first
group contains 2 while others contain 3 each.

But the problem now is that at PageLoad for the first time the layers of
group1 are not visible because it is getting overlapped by the other layers.
The other layers are also not visible bec' they are mandated to be visible
at higher zoomin levels because of max/min scaledom.

Now if I load the group1 layers last then not only is it visible at initial
zoom level but also at higher zoom levels bec' in that case it is
overlapping the other layers mandated to be visible at that level.

So how to tackle the problem.

Can it be solved by changing the z-index of the first group at initial
PageLoad.

Pls provide some solution to this problem.


Bill Thoen wrote:
> 
> sunny74 wrote:
>> Hi,
>>
>> Thanks for ur reply.
>> 1)What is the syntax for send request against a Group?
>> 2)If I just write the name of the group within  layer then will it be
>> placed
>> against the group?
>> 3) What is the syntax for checking the zoom level of a map so that once a
>> zoom level is reached I can call a group of layers?
>>   
> 1. You call it just like you do a layer. Just use the group name instead 
> of the file name.
> 
> 2. Yes.
> 
> 3. Just make separate LAYERs as you do normally, but do a set for each 
> scale zone, and then assign MAX ansd MIN SCALEDENOM for each one so that 
> when you only one set is active at any scale. (i.e., don't overlap scale 
> intervals)
> 
> I don't know happens at the transition points though. For example,  
> suppose you have your large scale symbology visible from a MINSCALEDENOM 
> of 1 to a MAAXSCALEDENOM of 100,000. Then at 100,000, your small scale 
> symbology layers take over. But what happens at 100,000? Do you get both 
> layer sets, or neither? Or does  it do something clever like 
> MINSCALEDENOM starts right on the value and up, while the MAXSCALEDENOM 
> goes up to, but never equals the specified value?
> 
> Maybe while you're at it, could you check that and let us know?
> 
> Also, you ought to look this over: http://www.mapserver.org/mapfile/ In 
> particular, check out MIN and MAXSCALEDENOM under "LAYER".
> 
> 
> Good luck!
> - Bill Thoen
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/turning-on-layers-at-a-particular-zoom-level-tp3534156p3593710.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] check if a layer exists and remove it

2009-09-02 Thread sunny74

Hi,

I am declaring a layer at PageLoad in the following way:
choice_features = new OpenLayers.Layer.Vector("choice_features", { style:
v_style });

Then I am adding the layer in a different function as below:
map.addLayer(new OpenLayers.Layer.GML("choice_features",
"XML1/FeatureGML.xml")); 

But I want to check if this layer exists and remove it before adding it to
the map using the addLayer function. This will ensure that the layer is
created afresh with every fresh request.

For this I have done the following but it doesn't work:

if (map.getLayersByName("choice_features") != null) {
 
map.layers["choice_features"].removeFeatures(map.layers["choice_features"].features);
  //alert("layer removed");
}

But I get error in the getLayersByName() function.It says object doesn't
support this property.

Can u suggest an alternative method.

Thanks.
-- 
View this message in context: 
http://n2.nabble.com/check-if-a-layer-exists-and-remove-it-tp3566636p3566636.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] turning on layers at a particular zoom level

2009-09-02 Thread sunny74

Hi,

Thanks for ur reply.
1)What is the syntax for send request against a Group?
2)If I just write the name of the group within  layer then will it be placed
against the group?
3) What is the syntax for checking the zoom level of a map so that once a
zoom level is reached I can call a group of layers?

Regards.

Rahkonen Jukka wrote:
> 
> Hi,
> 
> Collect the layers to one GROUP, and send requests against the GROUP
> instead of the original scale dependent layers.  Mapfile may have
> something like this inside:
> 
> LAYER
> GROUP "group"  
> NAME "scale1"
> MAXSCALEDENOM 10
> .
> .
> .
>  END 
>
> LAYER
> GROUP "group"  
>   NAME "scale2"
>   TYPE POLYGON
>   MAXSCALEDENOM 100
>   MINSCALEDENOM 10
>   .
>   .
>   .
>  END
> 
> 
> sunny74 wrote:
>> 
>> 
>> Hi,
>> 
>> Thanks for the reply.
>> 
>> 1) Can u tell me how to sandwich all the layers and make one 
>> WMS call to the server and request all of the layers in one 
>> image/call.
>> Presently I am calling the layers separately as below:
>> 
>> function init() {
>> 
>>  //alert("in init");
>>  map = new OpenLayers.Map('<%=map.ClientID%>');
>> 
>>  //
>>  layer = new OpenLayers.Layer.WMS("OpenLayers WMS",
>> 
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, { map:
>> 'Shape/newwr1.map', layers: 'STATE', 'format': 'png' });
>> 
>>  layer1 = new OpenLayers.Layer.WMS("Rail Main",
>> 
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, { map:
>> 'Shape/newwr1.map', transparent: 'true', layers: 'Railwayline' });
>> 
>> // layer2 = new OpenLayers.Layer.WMS("Rail WaterBody",
>> //
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, { map:
>> 'Shape/newwr1.map', transparent: 'true', layers: 'WaterBody' });
>> 
>> // layer3 = new OpenLayers.Layer.WMS("Rail Rail_Buffer",
>> //
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, { map:
>> 'Shape/newwr1.map', transparent: 'true', layers: 'Rail_Buffer' });
>> 
>> // layer4 = new OpenLayers.Layer.WMS("Roads",
>> //
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, { map:
>> 'Shape/newwr1.map', transparent: 'true', layers: 'Roads' });
>> 
>> // layer5 = new OpenLayers.Layer.WMS("Diversions",
>> //   
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, {
>> map: 'Shape/newwr1.map', transparent: 'true', layers: 'Diversions' });
>> 
>> // layer6 = new OpenLayers.Layer.WMS("Rail Side_Line",
>> //   
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, {
>> map: 'Shape/newwr1.map', transparent: 'true', layers: 
>> 'Rail_Side_Line' });
>> // layer7 = new OpenLayers.Layer.WMS("LANDMARKS",
>> //   
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, {
>> map: 'Shape/newwr1.map', transparent: 'true', layers: 'LANDMARKS' });
>>  layer8 = new OpenLayers.Layer.WMS("RailwayStations",
>>
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, { map:
>> 'Shape/newwr1.map', transparent: 'true', layers: 'RailwayStations' });
>> // layer9 = new OpenLayers.Layer.WMS("Bridges_Minor",
>> //   
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, {
>> map: 'Shape/newwr1.map', transparent: 'true', layers: 
>> 'Bridges_Minor' });
>> // layer10 = new OpenLayers.Layer.WMS("Bridge_Major",
>> //   
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, {
>> map: 'Shape/newwr1.map', transparent: 'true', layers: 
>> 'Bridge_Major' });
>> // layer11 = new OpenLayers.Layer.WMS("LC_Gate",
>> //   
>> "http://172.16.128.173:8085/cgi-bin/mapserv.exe?";, {
>> map

RE: [mapserver-users] turning on layers at a particular zoom level

2009-09-02 Thread sunny74
NSCALEDENOM and MAXSCALEDENOM at either the layer or
> class level (on a current version of MapServer).  So, it looks like they
> are in an appropriate place.  The real test is to use MapServer to draw
> the layer for you.  Does it turn on and off at the scales that you want it
> to?  
> 
> 2.  Yes, it can apply to both the layer or class properties.  I assume
> that you looked here:  http://www.mapserver.org/mapfile/class.html#class
> 
> 3.  MapServer has nothing to do with when things load.  This all happens
> on your client.  It sounds like you modified your client to request each
> layer individually.  If you just want to sandwich them all together, why
> not just make one WMS call to the server and request all of the layers in
> one image/call.  This question is really more appropriate for the
> OpenLayers list.
> 
> 4.  I would consult the TileCache or OpenLayers list for this one.
> 
> David.
> 
> 
> -Original Message-
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of sunny74
> Sent: Saturday, August 29, 2009 2:01 AM
> To: mapserver-users@lists.osgeo.org
> Subject: RE: [mapserver-users] turning on layers at a particular zoom
> level
> 
> 
> 
> Hi David,
> 
> Thanks for your reply.
> I wanted to have 3 layers displayed b/w scale of 1.2M and 1.15M and so I
> have added set MAXSCALEDENOM /MINSCALEDENOM as follows:
> 
>  LAYER
> NAME 'WaterBody'
> TYPE POLYGON
> DATA 'C:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
> METADATA
>   'wms_title' 'WaterBody'
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> ''
> END
> CLASS
>NAME 'WaterBody' 
>MAXSCALEDENOM 200
>MINSCALEDENOM 150
>STYLE
>  SYMBOL 0 
>  SIZE 2 
>  OUTLINECOLOR 0 0 0
>  COLOR 150 123 90
>END
> END
>   END
> 
> 1)Pls tell me whether I hav added the things at the correct place.
> 2) Can I also add it within the layer properties?
> 3) I find that the layers are being added at PageLoad.This I found out by
> looking at the number of items being added at the bottom left corner of
> IE. The number of items has nearly doubled due to the addition of the 3
> layers. Is there any way by which I can stop the layers from being added
> at PageLoad i.e they should be added only when the desired scale is
> reached.
> 
> 4) How to use TileCache or GeoWebCache i.e js code?
> 
> Thanks again.
> 
> Fawcett, David wrote:
>> 
>> I assume the 'M' stands for million.
>> 
>> If you want the layer to be only visible when 'zoomed in' beyond 1:2M, 
>> I would set a MAXSCALEDENOM of 200.
>> 
>> If you want the layer to be only visible when 'zoomed out' beyond 
>> 1:2M, I would set a MINSCALEDENOM of 200.
>> 
>> If you only want the layer to be visible between resolutions of 
>> 1:10 and 1:20, you would set:  both MINSCALEDENOM 10 and 
>> MAXSCALEDENOM 20
>> 
>> These values go in either a LAYER or CLASS of LAYER in your MapServer map
>> file.   
>> 
>> 
>> -Original Message-
>> From: mapserver-users-boun...@lists.osgeo.org
>> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of sunny74
>> Sent: Friday, August 28, 2009 8:45 AM
>> To: mapserver-users@lists.osgeo.org
>> Subject: Re: [mapserver-users] turning on layers at a particular zoom 
>> level
>> 
>> 
>> 
>> Hi,
>> 
>> Thanks for your reply.
>> I went thru the link and read about MAXSCALEDENOM/MINSCALEDENOM. So 
>> MINSCALEDENOM is the minimum scale level at which a layer will become 
>> visible. But I am a bit confused.When the map loads for the first time 
>> it has a zoom level of 7 as given in the code below.
>> 
>> map.setCenter(new OpenLayers.LonLat(74.25, 20.35), 7);
>> 
>> In terms of scale it is showing 1:3M.
>> What is M? 
>> If I increase the zoom level i.e do zoom in, scale becomes 1:856K and
>> 1:256K etc i.e scale decreases. So If want a layer to be visible at a
>> scale level of 1:2M what do I write in the mapfile?
>> 
>> How to use TileCache or GeoWebCache?Pls give the js code.
>> 
>> 
>> Rahkonen Jukka wrote:
>>> 
>>> Hi,
>>> 
>>> Mapserver is somehow documented, about adjusting visibility according
>>> to scale

RE: [mapserver-users] turning on layers at a particular zoom level

2009-08-29 Thread sunny74

Hi David,

Thanks for your reply.
I wanted to have 3 layers displayed b/w scale of 1.2M and 1.15M and so I
have added set MAXSCALEDENOM /MINSCALEDENOM as follows:

 LAYER
NAME 'WaterBody'
TYPE POLYGON
DATA 'C:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
METADATA
  'wms_title' 'WaterBody'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'WaterBody' 
   MAXSCALEDENOM 200
   MINSCALEDENOM 150
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 150 123 90
   END
END
  END

1)Pls tell me whether I hav added the things at the correct place.
2) Can I also add it within the layer properties?
3) I find that the layers are being added at PageLoad.This I found out by
looking at the number of items being added at the bottom left corner of IE.
The number of items has nearly doubled due to the addition of the 3 layers.
Is there any way by which I can stop the layers from being added at PageLoad
i.e they should be added only when the desired scale is reached.

4) How to use TileCache or GeoWebCache i.e js code?

Thanks again.

Fawcett, David wrote:
> 
> I assume the 'M' stands for million.  
> 
> If you want the layer to be only visible when 'zoomed in' beyond 1:2M, I
> would set a MAXSCALEDENOM of 200.  
> 
> If you want the layer to be only visible when 'zoomed out' beyond 1:2M, I
> would set a MINSCALEDENOM of 200.  
> 
> If you only want the layer to be visible between resolutions of 1:10
> and 1:20, you would set:  both MINSCALEDENOM 10 and MAXSCALEDENOM
> 20
> 
> These values go in either a LAYER or CLASS of LAYER in your MapServer map
> file.   
> 
> 
> -Original Message-
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of sunny74
> Sent: Friday, August 28, 2009 8:45 AM
> To: mapserver-users@lists.osgeo.org
> Subject: Re: [mapserver-users] turning on layers at a particular zoom
> level
> 
> 
> 
> Hi,
> 
> Thanks for your reply.
> I went thru the link and read about MAXSCALEDENOM/MINSCALEDENOM. So
> MINSCALEDENOM is the minimum scale level at which a layer will become
> visible. But I am a bit confused.When the map loads for the first time it
> has a zoom level of 7 as given in the code below.
> 
> map.setCenter(new OpenLayers.LonLat(74.25, 20.35), 7);
> 
> In terms of scale it is showing 1:3M. 
> What is M? 
> If I increase the zoom level i.e do zoom in, scale becomes 1:856K and
> 1:256K etc i.e scale decreases. So If want a layer to be visible at a
> scale level of 1:2M what do I write in the mapfile?
> 
> How to use TileCache or GeoWebCache?Pls give the js code.
> 
> 
> Rahkonen Jukka wrote:
>> 
>> Hi,
>> 
>> Mapserver is somehow documented, about adjusting visibility according 
>> to scale, try to find MAXSCALEDENOM/MINSCALEDENOM from 
>> http://www.mapserver.org/mapfile/layer.html#index-21
>> 
>> Mapserver does not do caching but you can use for examply TileCache or 
>> GeoWebCache between your clients and Mapserver.
>> 
>> -Jukka Rahkonen-
>> 
>> 
>> 
>>> -Alkuperäinen viesti-
>>> Lähettäjä: mapserver-users-boun...@lists.osgeo.org
>>> [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta sunny74
>>> Lähetetty: 28. elokuuta 2009 14:53
>>> Vastaanottaja: mapserver-users@lists.osgeo.org
>>> Aihe: [mapserver-users] turning on layers at a particular zoom level
>>> 
>>> 
>>> DEar Friends,
>>> 
>>> I have 12 layers in my map and it is taking to long to
>>> load.Therefore I decided to turn on only 2 layers at Page Load.
>>> 
>>> Rest of the layers I want to turn on  at a particular zoom
>>> level.How can I check the zoom level and turn on these layers.
>>> 
>>> How can make the map load faster especially on page reload? Is it 
>>> possible to cache the map or is there some other technique?
>>> 
>>> Thanks for ur reply.
>>> 
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/turning-on-layers-at-a-particular-zoom-le
>>> vel-tp3534156p3534156.html
>>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>

Re: [mapserver-users] turning on layers at a particular zoom level

2009-08-28 Thread sunny74

Hi,

Thanks for your reply.
I went thru the link and read about MAXSCALEDENOM/MINSCALEDENOM. So
MINSCALEDENOM is the minimum scale level at which a layer will become
visible.
But I am a bit confused.When the map loads for the first time it has a zoom
level of 7 as given in the code below.

map.setCenter(new OpenLayers.LonLat(74.25, 20.35), 7);

In terms of scale it is showing 1:3M. 
What is M? 
If I increase the zoom level i.e do zoom in, scale becomes 1:856K and 1:256K
etc i.e scale decreases.
So If want a layer to be visible at a scale level of 1:2M what do I write in
the mapfile?

How to use TileCache or GeoWebCache?Pls give the js code.


Rahkonen Jukka wrote:
> 
> Hi,
> 
> Mapserver is somehow documented, about adjusting visibility according to
> scale, try to find MAXSCALEDENOM/MINSCALEDENOM from
> http://www.mapserver.org/mapfile/layer.html#index-21
> 
> Mapserver does not do caching but you can use for examply TileCache or
> GeoWebCache between your clients and Mapserver.
> 
> -Jukka Rahkonen-
> 
> 
> 
>> -Alkuperäinen viesti-
>> Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
>> [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta sunny74
>> Lähetetty: 28. elokuuta 2009 14:53
>> Vastaanottaja: mapserver-users@lists.osgeo.org
>> Aihe: [mapserver-users] turning on layers at a particular zoom level
>> 
>> 
>> DEar Friends,
>> 
>> I have 12 layers in my map and it is taking to long to 
>> load.Therefore I decided to turn on only 2 layers at Page Load.
>> 
>> Rest of the layers I want to turn on  at a particular zoom 
>> level.How can I check the zoom level and turn on these layers.
>> 
>> How can make the map load faster especially on page reload?
>> Is it possible to cache the map or is there some other technique?
>> 
>> Thanks for ur reply.
>> 
>> --
>> View this message in context: 
>> http://n2.nabble.com/turning-on-layers-at-a-particular-zoom-le
>> vel-tp3534156p3534156.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/turning-on-layers-at-a-particular-zoom-level-tp3534156p3534743.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] turning on layers at a particular zoom level

2009-08-28 Thread sunny74

DEar Friends,

I have 12 layers in my map and it is taking to long to load.Therefore I
decided to turn on only 2 layers at Page Load.

Rest of the layers I want to turn on  at a particular zoom level.How can I
check the zoom level and turn on these layers.

How can make the map load faster especially on page reload?
Is it possible to cache the map or is there some other technique?

Thanks for ur reply.

-- 
View this message in context: 
http://n2.nabble.com/turning-on-layers-at-a-particular-zoom-level-tp3534156p3534156.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] layers not getting separated

2009-08-28 Thread sunny74

Hi,
Thanks for your reply.
My problem is solved.
Problem was in the map file.The status of each layer was "DEfault", so all
the layers were loading and not turning off.Then I changed the status of all
except the base to "OFF".I found that it was turning on and off.

But now I am having another issue.I have 12 layers in my map and it is
taking to long to load.Therefore I decided to turn on only 2 layers at
Page Load.

Rest of the layers I want to turn on  at a particular zoom level.How can I
check the zoom level and turn on these layers.

Thanks for ur reply.


Steve.Toutant wrote:
> 
> and your mapfile as well?
> 
> Steve Toutant, M. Sc.
> Analyste en géomatique
> Secteur environnement
> Direction des risques biologiques, environnementaux et occupationnels
> Institut national de santé publique du Québec
> 945, avenue Wolfe
> Québec, Qc G1V 5B3 
> Tél.: (418) 650-5115 #5281
> Fax.: (418) 654-3144
> steve.tout...@inspq.qc.ca
> http://www.inspq.qc.ca
>  
> 
> 
> 
> 
> Pavel Iacovlev @lists.osgeo.org 
> Envoyé par : mapserver-users-boun...@lists.osgeo.org
> 26/08/2009 09:35 AM
> 
> A
> sunny74 
> cc
> mapserver-users@lists.osgeo.org
> Objet
> Re: [mapserver-users] layers not getting separated
> 
> 
> 
> 
> 
> 
> 
> 
> Can we see your OpenLayers JS code ?
> 
> On Wed, Aug 26, 2009 at 3:46 PM, sunny74 wrote:
>>
>> Dear Friends,
>>
>> I am displaying a map using mapserver and openlayers.The map is 
> displayed
>> using a map file kept within a folder containing shape files.
>> Although the map is getting displayed, if I add more than one layer the
>> layers are not getting separated.
>> i.e I can see the layer in the Layer switcher but if I check or uncheck
>> nothing happens.
>> This means all the layers are coming as a single image.
>> I feel that there is something in the map file which I have ommitted and 
> so
>> this happens.
>> I used QGIS to create the map file.
>>
>> Looking for a solution.
>>
>> Thanks for your replies.
>> --
>> View this message in context: 
> http://n2.nabble.com/layers-not-getting-separated-tp3514899p3514899.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> 
> 
> 
> -- 
> http://iap.md, The future is open
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
> 
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/layers-not-getting-separated-tp3514899p3534120.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] layers not getting separated

2009-08-26 Thread sunny74
");
 }
 if (radio3.checked == 1) {
 //document.getElementById(dist).style.display = "block";
 var lonlat1 = map.getLonLatFromViewPortPx(e.xy);
 alert(lonlat1);
 //var lonlatarr = [2];
 //lonlatarr = lonlat1;
 //alert(lonlatarr);
 //   
 //if (lonlatarr.length == 2) {
 //wktforl[0] = GetFeat(lonlatarr[0]);
 // wktforl[1] = GetFeat(lonlatarr[1]);
 //for (var i = 0; i < 2; i++) {
 //
 //alert(wktforl[i]);
 //}
 //}


 txt1 = document.getElementById('Hidden1');
 txt2 = document.getElementById('Hidden2');
 txt3 = document.getElementById('Hidden3');
 txt4 = document.getElementById('Hidden4');
 if (txt1.value == '' && txt2.value == '') {
 txt1.value = lonlat1.lon;
 txt2.value = lonlat1.lat;
 }
 else if (txt1.value != '' && txt2.value != '' && txt3.value
== '' && txt4.value == '') {
 txt3.value = lonlat1.lon;
 txt4.value = lonlat1.lat;

 GetDist();
 }
 else {
 txt1.value = txt3.value;
 txt2.value = txt4.value;
 txt3.value = lonlat1.lon;
 txt4.value = lonlat1.lat;
 GetDist();
 }

 }
 if (radio5.checked == 1) {
 //Get the co-ordinates where user has clicked
 var lonlat2 = map.getLonLatFromViewPortPx(e.xy);
 //  alert("You clicked near " + lonlat2.lat
+ " N, " + 
 //     

lonlat2.lon + " E");
 // var msg = getmessage();
 // alert(msg);
 // var pix = new OpenLayers.Pixel(ex, ey);
 //GetFeature(lonlat2);
 //Getsum(66, 99);

 var qry = "select state,pop_tot01 from india_state where
oid=" + '1';
 var tbl = "india_state";
 //Rail.WebMap.WebMapService.GetData(tbl, qry,
SucceededCallback, FailedCallback);
 Idenfeat(lonlat2);

 }
 });
 }



Pavel Iacovlev wrote:
> 
> Can we see your OpenLayers JS code ?
> 
> On Wed, Aug 26, 2009 at 3:46 PM, sunny74 wrote:
>>
>> Dear Friends,
>>
>> I am displaying a map using mapserver and openlayers.The map is displayed
>> using a map file kept within a folder containing shape files.
>> Although the map is getting displayed, if I add more than one layer the
>> layers are not getting separated.
>> i.e I can see the layer in the Layer switcher but if I check or uncheck
>> nothing happens.
>> This means all the layers are coming as a single image.
>> I feel that there is something in the map file which I have ommitted and
>> so
>> this happens.
>> I used QGIS to create the map file.
>>
>> Looking for a solution.
>>
>> Thanks for your replies.
>> --
>> View this message in context:
>> http://n2.nabble.com/layers-not-getting-separated-tp3514899p3514899.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> 
> 
> 
> -- 
> http://iap.md, The future is open
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/layers-not-getting-separated-tp3514899p3521412.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] layers not getting separated

2009-08-26 Thread sunny74

Dear Friends,

I am displaying a map using mapserver and openlayers.The map is displayed
using a map file kept within a folder containing shape files.
Although the map is getting displayed, if I add more than one layer the
layers are not getting separated.
i.e I can see the layer in the Layer switcher but if I check or uncheck
nothing happens.
This means all the layers are coming as a single image.
I feel that there is something in the map file which I have ommitted and so
this happens.
I used QGIS to create the map file.

Looking for a solution.

Thanks for your replies.
-- 
View this message in context: 
http://n2.nabble.com/layers-not-getting-separated-tp3514899p3514899.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] map not available over the Lan or internet

2009-08-12 Thread sunny74

Hi Adrian,

I did as u suggested and next to port 8085 I see SubranilBasu:0  LISTENING
and not 0.0.0.0 or 127.0.0.1
as u have stated.


I don't understand the terms "listening on all interfaces" and "listening
only on loopback".Could u pls explain them.

Thanks for your reply.

Regards.



Adrian Popa wrote:
> 
> Make sure your server listens on all interfaces, not only on loopback. 
> You need to check apache's config for this and restart the server.
> 
> Also, you can do netstat -a (I think) on your windows system and look 
> for your port (8085). If next to it you see 0.0.0.0, it means the server 
> is listening on all interfaces. If you see 127.0.0.1, it means the 
> server is listening only on loopback.
> 
> Good luck.
> 
> 
> sunny74 wrote:
>> Hi,
>>
>> I am displaying map using mapserver and openlayers in aspx(ASP.NET) page.
>> But problem is that the map is displayed only on local machine and not
>> from
>> a remote machine on the Lan or Internet.
>> On doing some r&D i found that if the url is given as in a local machine
>> i.e
>>
>> http://localhost:8085/cgi-bin/mapserv.exe?map=WR_Shape/wrmap.map&mode=map
>>
>> Then map is displayed.
>> But if it is given like this,
>>
>> http://172.16.128.173:8085/cgi-bin/mapserv.exe?map=WR_Shape/wrmap.map&mode=map
>>
>> then it is not.
>>
>> So how can I get mapserver to display map with IP.
>>
>> Thanks for your replies.
>>   
> 
> 
> -- 
> --- 
> Adrian Popa
> NOC Division
> Network Engineer
> Divizia Centrul National de Operare Retea
> Departament Transport IP & Metro
> Compartiment IP Core & Backbone
> Phone: +40 21 400 3099
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/map-not-available-over-the-Lan-or-internet-tp3429997p3430637.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] map not available over the Lan or internet

2009-08-12 Thread sunny74

Hi,

Your suggestion worked.
So in this case it was apache not configured properly so as to get the
response from mapserver.

Thanks a million!!! 

Rahkonen Jukka wrote:
> 
> Hi,
> 
> I am not sure what you mean with "map is not displayed". Do you mean
> that Mapserver seem to work normally but it returns an error or blank
> map, or is it impossible to reach Mapserver at all? If the latter, does
> your http server listen to the requested address? If MS4W package is
> used it is controlled in the D:\ms4w\Apache\conf\httpd.conf file.  There
> should read
> Listen 172.16.128.173:8085
> 
> -Jukka Rahkonen-
> 
> sunny74 wrote:
>  
>> Hi,
>> 
>> I am displaying map using mapserver and openlayers in 
>> aspx(ASP.NET) page.
>> But problem is that the map is displayed only on local 
>> machine and not from a remote machine on the Lan or Internet.
>> On doing some r&D i found that if the url is given as in a 
>> local machine i.e
>> 
>> http://localhost:8085/cgi-bin/mapserv.exe?map=WR_Shape/wrmap.m
>> ap&mode=map
>> 
>> Then map is displayed.
>> But if it is given like this,
>> 
>> http://172.16.128.173:8085/cgi-bin/mapserv.exe?map=WR_Shape/wr
>> map.map&mode=map
>> 
>> then it is not.
>> 
>> So how can I get mapserver to display map with IP.
>> 
>> Thanks for your replies.
>> --
>> View this message in context: 
>> http://n2.nabble.com/map-not-available-over-the-Lan-or-interne
>> t-tp3429997p3429997.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/map-not-available-over-the-Lan-or-internet-tp3429997p3430618.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] map not available over the Lan or internet

2009-08-12 Thread sunny74

Hi,

I am displaying map using mapserver and openlayers in aspx(ASP.NET) page.
But problem is that the map is displayed only on local machine and not from
a remote machine on the Lan or Internet.
On doing some r&D i found that if the url is given as in a local machine i.e

http://localhost:8085/cgi-bin/mapserv.exe?map=WR_Shape/wrmap.map&mode=map

Then map is displayed.
But if it is given like this,

http://172.16.128.173:8085/cgi-bin/mapserv.exe?map=WR_Shape/wrmap.map&mode=map

then it is not.

So how can I get mapserver to display map with IP.

Thanks for your replies.
-- 
View this message in context: 
http://n2.nabble.com/map-not-available-over-the-Lan-or-internet-tp3429997p3429997.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] coloring features on the basis of query

2009-06-18 Thread sunny74

Hi,

I am trying to implement something called "Find Feature" on a map. The user
will select parameters for a query which will be executed on the DB and the
DB will return some geometry's.
For eg, the query could be like " Select the_geom from india_state where
pop_tot01 > 100"
Now I need to know the  following:
1) What data type to use for collecting geometry returned by the above sql
query?
2) The above query will return geometry of some states.As similar query will
return geometry of some districts. For these states and districts I need to
give a different color with a Label like population > 100.How can I do
this dynamically?
3) The coloring and labeling will be temporary and will change with every
query that is fired at the database.

Thanks for ur replies
-- 
View this message in context: 
http://n2.nabble.com/coloring-features-on-the-basis-of-query-tp3113411p3113411.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] display map on aspx page

2009-05-24 Thread sunny74



Jeff McKenna wrote:
> 
> Luke Kateregga wrote:
>> Hello there,
>> Iam new to mapserver. I have installed mapserver plus the demo 
>> applications - chameleon, p_mapper etc and they are all working fine. 
>> The problem is I just cant load my own data. I've tried the  mapserver 
>> generator in mapwindow, the qgis web plugin plus Amien in Arcmap but 
>> still no success. I am currently following Web Mapping Illustrated By 
>> Tyler Mitchell, working on his very first example of global.map, 
>> global.html. When I click start map server, I get a page with a blank 
>> portion, instead of the map itself. The gif however is created in the 
>> ms_tmp folder. How do I get to display the map in the browser?
>> Can also anyone perhaps show me how I can import my own data into the 
>> already made applications like Pmapper or fusion?
>> Thanks in advance
> 
> Hello Luke,
> 
> Welcome to the world of MapServer, I think you're going to love it.
> 
> I think you should focus on your .map file first, and then worry about 
> the applications later.  To start with, you could go through the 
> MapServer workshop[1] that is given every year at the FOSS4G conference 
> - in that you will have access to data and working mapfiles.  Also, test 
> your mapfile using the shp2img commandline utility[2].  I would start 
> with a small mapfile with only one layer, test it with shp2img, and once 
> that single layer is showing in the resulting map image from that 
> command, continue adding layers.
> 
> That should get you going.  If you ever get totally frustrated, there 
> are providers out here to help, like myself, offering direct support 
> services, so keep that in mind.
> 
> Anyway good luck and have fun.
> 
> -jeff
> 
> 
> [1] 
> http://www.gatewaygeomatics.com/dl/mapserver-workshop/ms101_ms4w_package.zip
> [2] http://www.mapserver.org/utilities/shp2img.html
> 
> 
> -- 
> Jeff McKenna
> FOSS4G Consulting and Training Services
> http://www.gatewaygeomatics.com/
> 
> Hi Jeff,
> 
> Could u pls look into my problem and help solve it.
> I want to use openlayers with mapserver in ASP.NET 2.0/C# web application.
> I am looking for detailed guidance/ support in this regard and i am ready
> for alternative arrangement other than  this forum.
> If u r ready pls let me know.
> 
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/display-map-on-aspx-page-tp2950436p2964334.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] openlayers in vs2005 website

2009-05-23 Thread sunny74





Paolo Corti wrote:
> 
> 
> 
> meenu wrote:
>> 
>> dears,i created one website using mapserver in vs2005 ...now i need to
>> know how can i do openlayers in this same websiteis it possible?in
>> this same website i need to display one map with tooltip(hotspot)
>> informationfor that purpose can anybody tell me how to bind open
>> layers in vs2005 website application?
>> 
> 
> if you use OpenLayer you need to expose your mapfile as a WMS or WFS, but
> if you have placed some business logic using mapscript in ASP .NET (ex to
> make joins, to selectively exclude features...) you wouldn't be able to
> use your code.
> Basically depends on what you want to perform with your app and MapServer
> 
> best regards
> 
> 

Hi Paolo,

I am trying to use Mapserver to display map using your article for the last
few days but without success.I am stuck with one error or another.
Pls have a look at my post and reply:

http://n2.nabble.com/display-map-on-aspx-page-td2950436.html#a2957638
http://n2.nabble.com/display-map-on-aspx-page-td2950436.html#a2957638 

I want to use openlayers javascript library for doing operations like pan
zoom, rectangular select,tooltip etc.
Pls tell me in detail i.e step by step. I am looking for detailed
guidance/support in respect of this map display and I am ready for
alternative arrangement other than this forum. 
If you r ready for alternative arrangement pls let me know I shall give u my
email id.

Pls reply ASAP.
-- 
View this message in context: 
http://n2.nabble.com/openlayers-in-vs2005-website-tp2950691p2964328.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] display map on aspx page

2009-05-22 Thread sunny74



meenu wrote:
> 
> hi friend check this link...may helpful for u..
> http://n2.nabble.com/how-can-i-create-mapserver-website-in-VS-2005-%28VB%29-td2516841.html#a2567804
> 

Thanks for your reply.
I am trying to display a map using paolo corti's tutorial for the last 2
days but haven't succeeded so far yet.
The latest error I am getting is that - msLoadMap(): Unable to access file
IT is unable to access the map file. But If I put the map file URL directly
in the browser the map is being displayed. It means that Apache is properly
configured and running.The direct url which displays the map is 
http://localhost:8085/cgi-bin/mapserv.exe?mode=map&map=C:\ms4w\Apache\cgi-bin\INDIA\india.map

What should be done so that the application finds the file and displays the
map?

If this happens it will be thru' server side code.
I want to load map and do operations on it using client side javascript. I
don't know how to access the mapserver DLL's through javascript.

Pls help in this regard.


-- 
View this message in context: 
http://n2.nabble.com/display-map-on-aspx-page-tp2950436p2957638.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users