<div>Hello Everyone,</div>
<div> </div>
<div>I have started using OpenLayers since some time now.... </div>
<div> </div>
<div>I am using a ".map" file to generate a map.</div>
<div>Following is the code:</div>
<div> </div>
<div><em> map = new OpenLayers.Map( $('center') );<br> var wmsurl = "</em><a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/OpenExtMap/MyShapeFiles/MyMap.map"><em>http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/OpenExtMap/MyShapeFiles/MyMap.map</em></a><em>";<br>
var wmsmdi = new OpenLayers.Layer.MapServer( "Wards", wmsurl, {layer:'Wards'});<br> map.addLayer(wmsmdi);<br></em></div>
<div> </div>
<div>Now the map that is being displayed shows the ward numbers on each ward (since ward number is used as the value for attribute field called name).</div>
<div>Well thats fine, thats not my problem.</div>
<div> </div>
<div>The real problem is that when we zoom in and as the area of each ward increases the ward numbers are repeated on each ward at some distances.</div>
<div>This did not happen when we used the same ".map" file to generate map using C# mapscript API.</div>
<div> </div>
<div>Is it the problem of Openlayers or I need to do any changes in the map file.</div>
<div> </div>
<div>Following is the code for my map file:</div>
<div><em>NAME "iWork"<br>UNITS Kilometers<br>SIZE 700 600<br>IMAGECOLOR 250 250 210<br>IMAGETYPE gif<br>SHAPEPATH "C:\ms4w\Apache\htdocs\OpenExtMap\MyShapeFiles"<br>EXTENT 73.752230 18.424904 73.962774 18.614458<br>
WEB<br> IMAGEPATH "C:\ms4w\Apache\htdocs\OpenExtMap\MyShapeFiles\temp"<br> IMAGEURL "C:\ms4w\Apache\htdocs\OpenExtMap\MyShapeFiles\temp"<br>END<br>QUERYMAP<br> COLOR 255 0 0<br> STYLE hilite<br>END<br>
LAYER<br> NAME "Wards"<br> DATA "My_Shape"<br> STATUS on<br> TYPE polygon<br> LABELCACHE on<br> LABELITEM "NAME"<br> CLASS<br> NAME "My Wards"<br> STYLE<br> COLOR 085 107 047<br>
OUTLINECOLOR 240 230 140<br> END<br> LABEL<br> COLOR 255 255 255<br> SIZE small<br> END #end LABEL<br> END #end CLASS Ward Number<br>END #end LAYER Wards<br>LAYER<br>:</em></div>
<div><em>:</em></div>
<div><em>:</em></div>
<div><em>END #end </em></div>
<div><em>END #end mapfile</em><br clear="all"><br>-- <br>Regards,<br>Jatin Ambasana<br>iWork Technologies Pvt. Ltd.<br>Mobile:+91-9765394718<br>Visit us: <a href="http://www.iworktech.com">www.iworktech.com</a> <br></div>