[mapguide-users] Get coords from Database with PHP then zoom to location in iFrame

Howitzer khinskens at wesa.ca
Thu Jul 4 13:14:54 PDT 2013


The reason I omitted those things:

KEYNAME will always be 'LOC_ID'
ISSTRING will always be 'false'
LAYERNAME will always be 'V_Locations'
INTID is the same as KEY.

I edited the appropriate code in GETSELECTIONXML.php to account for these
values.

But alright, for the sake of getting it to work I have exactly your code.

I receive the same error:
/exception 'mguserinformation' in C:\Program
Files\OSGeo\MapGuide\Web\www\fusion\layers\MapGuide\php\GETSELECTIONXML.php:21/

This is line 21:
/$userInfo = new MgUserInformation($session);/

This is now my iframe source:
//mapguide/fusion/templates/mapguide/standard/index.html?ApplicationDefinition=Library://CLIENT/Layouts/CLIENT_Small.ApplicationDefinition&locale=en&LAYERNAME=V_Locations&KEYNAME=LOC_ID&KEY=688181806&ISSTRING=false/

This is now the URL being passed to GETSELECTIONXML.php: 
//mapguide/fusion/layers/MapGuide/php/GETSELECTIONXML.php?MAPNAME=CLIENT_small51d5d476e9d02&SESSION=6c69b2ba-e4e4-11e2-8000-005056b359e2_en_MTI3LjAuMC4x0AFC0AFB0AFA&KEYNAME=LOC_ID&LAYERNAME=V_Locations&KEY=&ISSTRING=false/


This also happened before, but I'll comment on it now...

After it posts the following data to to GetSelectionProperties.php:
/*mapname*	VALE_small51d5d548291de
*selection*	exception 'mguserinformation' in C:\Program
Files\OSGeo\MapGuide\Web\www\fusion\layers\MapGuide\php\GETSELECTIONXML.php:21
Stack trace: #0 {main}<?xml version="1.0" encoding="UTF-8"?><FeatureSet
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer
id="ec3dc68e-e4e4-11e2-8000-005056b359e2"> <Class id="dbo:V_LOCATIONS">
<ID>LtIEKVMtMTIxUFIgMgBVR0FJUwA=</ID> </Class> </Layer></FeatureSet>
*seq*	0.5145814331463241
*session*	e8ed09c2-e4e4-11e2-8000-005056b359e2_en_MTI3LjAuMC4x0AFC0AFB0AFA/

It throws this error:
/Fusion Error: 
WARNING: Exception occurred in AJAX callback.
Message: JSON.parse: unexpected character
Location: /mapguide/fusion/lib/fusion.js (786)
Response: ERROR: Problem:\nThe application encountered a problem and could
not finish the operation you just requested properly.\n\nSolution:\nIf it\'s
the first time you met this problem, try again or restart the application /
session; otherwise, describe the steps to reproduce this problem to the
server administrator for suggestions.

- MgSelectionBase_FromXml() line 14629 file MgApi_wrap.cpp/



I assume that since I still cannot instantiate a user session, the second
error will clear up once the first is fixed.

Something else I noticed in one of the URL's:
/MAPNAME=CLIENT_small51d5d476e9d02/

In Maestro the map name is CLIENT_small. Why does
/mapWidget.aMaps[0].getMapName();/ append "51d5d476e9d02"? I tried
statically setting the map name to CLIENT_small in PHP but it still throws
all the same errors.

Thank you again for your time!



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Get-coords-from-Database-with-PHP-then-zoom-to-location-in-iFrame-tp5060902p5064165.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list