|
|
| GeoCommunity Mailing List |
| |
| Mailing List Archives |
| Subject: | GISList: Problem in setting the coordinate system of a new layer in MapX |
| Date: |
03/06/2002 05:07:03 PM |
| From: |
Shanmugam Ganeshkumar |
|
|
Hello Listers,
I face problem in setting the cooordsys of a user draw layer in MapX.There is function called GetCoordSys for CMapXLayer's object where you can get the current coordsys but there is no function to set it. The reason why I want my user draw layer's coordinate to be changed to LatiLongi is that I need to draw a point at the longitude and latitude specified by me in the user draw layer. The default CoordSys is Map.NumericCoordSys but I want it to be Map.LatLongi. For this what I did is that I got the CoordSys of a layer already there(whose coordsys is LatiLongi) by means of layer.GetCoordSys() whish returns a LPDISPATCH and pass it as argument to layer1.AttachDispatch().But it is not working.
Can anyone find whats wrong in the logic or else provide alternate solution for the problem. =20
try { m_ctrl_map.SetZoom(0.5): CCMapXLayer layer1 =3D m_ctrl_map.GetLayers().AddUserDrawLayer("My Layer",1): CCMapXLayer layer2=3D m_ctrl_map.GetLayers().Item("USA"): =09=09 layer1.AttachDispatch(layer2.GetCoordSys(),true):
m_ctrl_map.GetLayers().SetAnimationLayer(layer1): } catch (COleDispatchException *e) { e->ReportError(): e->Delete(): } catch (COleException *e) { e->ReportError(): e->Delete(): }
Thanks for your time.
Ganesh
To unsubscribe, write to gislist-unsubscribe@geocomm.com ________________________________________________________________________ Setup a GeoCommunity Account and have access to FAST DataDownloads and Premium Career Posting at a discounted rate! https://www.geocomm.com/cgi-bin/accounts/login
On-line Archives available at http://spatialnews.geocomm.com/community/lists/
|
|

Sponsored by:

For information regarding advertising rates Click Here!
|