[mapguide-users] Intermittent MapGuide issue

Gordon Luckett gordon.luckett at arrowgeomatics.com
Thu May 18 07:32:51 PDT 2023


I wonder if it's a timing issue.  There might be a lag between a
refresh/select etc.  Can you pause for 1 second (1000 ms)?

On Thu, May 18, 2023 at 10:22 AM David Bowen <dbowenrci at gmail.com> wrote:

> Thanks Gord. Unfortunately, that didn't resolve the issue.
>
> On Wed, May 17, 2023 at 5:39 PM Gordon Luckett <
> gordon.luckett at arrowgeomatics.com> wrote:
>
>> Strangely, I sometime do this:
>>
>> $mySel = $sel->ToXml();
>> $this->originalSel = $mySel;
>>
>> and I find that works better..
>>
>>
>>
>> On Wed, May 17, 2023 at 2:17 PM David Bowen <dbowenrci at gmail.com> wrote:
>>
>>> Our application has functionality where a user can search for an address
>>> and then click on a button to return data, when available, from a selection
>>> of layers. We're encountering an issue where there is data present, however
>>> when the user clicks the button, MapGuide returns an error saying no valid
>>> objects are selected. If the user clicks the button a second time, results
>>> are returned. This seems like a MapGuide error and I've been attempting to
>>> troubleshoot it without success.
>>> This issue is intermittent and only seems to exist in our Development
>>> environment, however I can recreate it if I export the Development package
>>> from Maestro and import it into another environment.
>>>
>>> The relevant section of code that seems to be failing is:
>>>
>>> $myMap = $this->MapGuideObject->getMap();
>>> $session = $this->mgSessionId;
>>> $mapName = $this->mgMapID;
>>> $objkeys = '';
>>> $errorMsg = null;
>>> $siteConnection = $this->MapGuideObject->getSiteConnection();
>>> // Get an instance of the Resource and Mapping Services and use them to
>>> open
>>> // the map and initialize a selection object.
>>> $resourceSrvc = $this->MapGuideObject->getResourceService();
>>> $featureSrvc = $this->MapGuideObject->getFeatureService();
>>> //Get selected map layers.
>>> $sel = new MgSelection( $myMap );
>>>
>>> $sel->Open( $resourceSrvc, $mapName );
>>>
>>> $this->originalSel = $sel->ToXml();
>>> $selLayers = $sel->GetLayers();
>>> //Check to see if no objects are selected.
>>>
>>> It appears that the line $this->originalSel = $sel->ToXml(); is the
>>> issue as there are times where it returns data but other times it's an
>>> empty string. Has anyone encountered an issue like this, or would anyone
>>> have an idea of how to resolve it?
>>> Alternatively, what would be the best way to try to catch a potential
>>> MapGuide error that is being generated? I believe that we have all error
>>> logging turned on but nothing has appeared in the log files.
>>>
>>> Thanks,
>>> David
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapguide-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20230518/6d1bb697/attachment.htm>


More information about the mapguide-users mailing list