[mapguide-users] CRS of map and layers from database, .NET API

mighty_duck msiljegovic at gmail.com
Fri Oct 2 07:04:25 EDT 2009


Thanks Kenneth,

That is working, but I found something strange in this....when I make oracle
connection I got two coordinates systems and I overrided both of
them.....but then, when specifing second parameter 'bool bActiveOnly' as
true in method GetSpatialContexts of FeatureService class it returns empty
MgSpatialContextReader. If I specify this parameter as false then it works
fine and takes both spatial contexts....but that I would like to
avoid....and I tried to find out what is exactly meaning of this second
parameter and why setting that on true doesnt determine which context is
active, but I wasnt able to find any better explanation then it is in
MapGuide API documentations which is little bit pure.

Do you know what is behind all of this???

thanks

regards 



Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> You can read the coordinate system in the MapDefinition XML (use 
> GetResourceContent).
> Your database has specifics for dealing with coordinate systems, but it 
> varies between databases.
> You can read the SpatialContext (GetSpatialContext) for the 
> FeatureSource, which gives
> you what MapGuide thinks the CRS is. This one may be overriden by the 
> user, and the
> returned result is the overriden value.
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> 
> mighty_duck skrev:
>> Hi,
>>
>> I need to find out, from one side, what CRS is used for showing map in
>> ajaxviewer, and from the other side, database CRS of layer shown in map.
>> I
>> need to do this because I need to make appropriate CRS conversion in the
>> case that CRS used for showing map in ajaxviewer is different from
>> original
>> CRS(in database) of layer used in that map. Im not sure if this is
>> possible
>> to check on the client side (I dont see appropriate method for this) and
>> on
>> the server side Im not sure how to do this (is it possible to find out
>> CRS
>> of map through session that I retrieve on the client side using
>> getSessionId() method and how to find out CRS of specific layer in
>> database
>> using MapGuide API???)
>>
>> thanks in advance
>>
>> Regards
>>   
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/CRS-of-map-and-layers-from-database-NET-API-tp3710810p3754733.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list