[mapguide-users] Issues selecting a feature with custom coding
Kenneth, GEOGRAF A/S
ks at geograf.dk
Thu Jan 10 10:37:38 EST 2008
The featureID is not converted into a string and then base64 encoded.
It is split into 4 bytes (C representation of an int) that are then base
33181 = 0x 00 00 81 9D = 0x 9D 81 00 00
The four bytes converted to Base64 gives nYEAAA==
Regards, Kenneth, GEOGRAF A/S
> Here are the results of both the mgos base64 value and the php base64_encode
> Actual FeatId: 33181
> MGOS Value: nYEAAA==
> base64_encode Value: MzMxODE=
> same result as the php function.
> Kenneth, GEOGRAF A/S wrote:
>> If you select the feature, you can read the WKT or BoundingBox for the
>> With this info, you can calculate the Center X,Y + Scale, and manually
>> zoom to it.
>> I have not worked enough with the selection to understand it completely.
>> However, I think you are mistaken about the Base64 functions not being
>> What appears to be different about the two encodings?
>> If they truly are different, it is very easy to write your own base64
>> encoding/decoding functions.
>> Regards, Kenneth, GEOGRAF A/S
>> nclayton skrev:
>>> Hi everyone,
>>> Here is my situation:
>>> I am hacking up the mapviewerphp files to fit the needs of the company I
>>> work for. One piece of functionality that is requried is that after a
>>> queries our database for owner information, it is displayed in a new
>>> Along with this information, there is a 'Zoom to Parcel' link. When the
>>> clicks this, it should zoom to that parcel and select it without
>>> the owner data list.
>>> My issue right now is in the selection of the parcel. I'm folling the
>>> given in the dev guide, but my $selection->ToXml() always comes out as:
>>> <?xml version="1.0" encoding="UTF-8"?><FeatureSet
>>> I am creating and passing in a query filter of "PARCEL_ID_ = '12345'"
>>> the appropriate parcel number supplied of course). I know that this
>>> PARCEL_ID_ value exists.
>>> I have tried manually creating the featureset query, since I can get the
>>> feature id of the selected parcel. The problem with that is that mgos
>>> uses a
>>> base64 encoding that doesn't match php's base64_encode() output, so
>>> that's a
>>> no-go as well.
>>> Any help and suggestions are appreciated
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapguide-users