[OpenLayers-Users] vector feature transform problems
jjdoc
jjdoc at mailcity.com
Wed Sep 21 13:35:47 EDT 2011
Hi all,
I am using Openlayer 2.10 and Mapserver 5.6.
I would like to project a shapefile with lon/lat values to EPSG:900913,
and on top of that, creating a vector layer, where I can add new features.
However, I am having trouble to get it to work.
The map shows up, but the Line I draw is no where to be found on the map,
and the mouse position control seems to be showing lon/lat values, but
somewhat off by a few degrees.
If I use EPSG:4326 throughout, everything works, but of course the map's
shape is skewed due to different projections.
It appears to be a mismatch of things somewhere, but I haven't been able
to figure it out. Thanks for your help.
Here are my codes:
1. Client side:
This is my map page.
2.MapServer Mapfile:
MAP
IMAGETYPE PNG
SIZE 1200 800
EXTENT 73 15 135 54
SHAPEPATH "D:/project_data/shapefiles/CHN_adm"
IMAGECOLOR 255 255 255
UNITS meters
CONFIG "PROJ_LIB" "C:/ms4w/ms4w/proj/nad/"
PROJECTION
"init=epsg:900913"
END
FONTSET "D:/project_data/fontset/fonts.list"
##################################################################
LAYER
NAME CHN_adm1
DATA CHN_adm1
STATUS ON
TYPE POLYGON
UNITS meters
LABELITEM "NAME_1"
PROJECTION
"init=epsg:4326"
END
CLASS
NAME "xxxx"
STYLE
COLOR 20 20 20
SIZE 3
END
END
END
# End of LAYER DEFINITIONS -------------------------------
END # All map files must come to an end j
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/vector-feature-transform-problems-tp6817013p6817013.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110921/f9483cd5/attachment.html
More information about the Users
mailing list