[mapguide-users] Converting SRS on the fly
joleary.public at gmail.com
Sun Mar 4 01:08:20 EST 2007
Yes, this works nicely. You must create the layer and save the markup both as
BC Albers, and then the markup shows up on the map.
And when I want to publish to Google Earth, I can use the code in
MarkupEditor::GetTransform() to transform the geometries in the map from BC
Albers into LL84.
Robert Bray-2 wrote:
> The sample was originally designed so that all markup is stored in LL84.
> Have a look in markupeditor.php and you'll find all of the AddXXX
> methods all have a line of code like:
> $point = $point->Transform($this->GetTransform());
> This is what is transforming the coordinates from BC Albers to LL. I did
> not look to closely but I think you can safely remove those lines in
> addition to the changes you describe below.
> Jim O'Leary wrote:
>> I am using the GT markup sample but I am saving a new layer in LL84 on a
>> that is in BC Albers. There must be some conversion happening on the fly,
>> because the markup on the map shows up.
>> However, when I extract the geometries to a pop up window, they are in
>> lat/lon. This window make links that zoom to the coordinates, but this
>> doesn't work as the coordinates for lat/lon are different than BC Albers.
>> I have tried changing the following line in the GT sample:
>> $sdfParams = new MgCreateSdfParams('LL84', MarkupManager::LL84WKT,
>> to these two lines
>> $WKT = $map->GetMapSRS();
>> $sdfParams = new MgCreateSdfParams('BC_Albers', $WKT, $markupSchema);
>> However, it still saves in lat / lon.
>> Is there a way to do this conversion on the fly, that is,
>> The application does it somehow. Alternatively, how would I save the new
>> layer as BC Albers?
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
View this message in context: http://www.nabble.com/Converting-SRS-on-the-fly-tf3337217s16610.html#a9293276
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users