<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Geospecialling &#187; FDO</title>
	<atom:link href="http://www.geospecialling.com/index.php/tag/fdo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geospecialling.com</link>
	<description>Being a (G)IS Developer...</description>
	<lastBuildDate>Thu, 26 Jan 2012 04:11:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mapguide Enterprise &#8211; Cannot Select Items in DWF and AJAX viewer &#8211; Again</title>
		<link>http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 04:41:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Dynamic Authoring]]></category>
		<category><![CDATA[FDO]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/</guid>
		<description><![CDATA[I had another problem with Mapguide Enterprise 2009 recently pertaining to objects not being selectable.&#160; Unlike my previous post on errors caused by invalid FDO filter conditions while dynamically authoring layers, no errors were logged to the Mapguide server logs.&#160; This problem is very likely specific to the enterprise version, as I was using the [...]]]></description>
			<content:encoded><![CDATA[<p>I had another problem with Mapguide Enterprise 2009 recently pertaining to objects not being selectable.&#160; Unlike my previous post on errors caused by <a title="cannot select items with an invalid FDO where condition" href="http://www.webrade.com/blogs/darrin/Trackback.aspx?guid=70cd1029-9f82-408f-b738-f25fe743e7dd" target="_blank" rel="tag">invalid FDO filter conditions while dynamically authoring</a> layers, no errors were logged to the Mapguide server logs.&#160; This problem is very likely specific to the enterprise version, as I was using the Autodesk FDO Provider for Oracle.</p>
<p>So a data connection was created pointing to the Oracle 10g schema.&#160; This database contained a number of tables containing Lat/Long point geometry entities.&#160; I created a layer pointing to the table in question.&#160; I created a layer pointing to that data connection.&#160; At this point the entities showed up as expected in the both the DWF and the AJAX viewers.&#160; Once again, I could not select any of the entities.&#160; I checked the server logs, no errors were reported.</p>
<p>In troubleshoot mode, I tried just about everything I could think of but nothing would work.&#160; I simplified the theme, created new layers, removed all other layers from them map.&#160; Eventually I created a new layer from another table.&#160; Luckily, the entities on this layer could be selected.&#160; It must be a problem with the underlying data.&#160; On a hunch, I checked the table definitions &#8211; specifically looking at primary keys.&#160; The selectable layer had a primary key defined, the problem layer did not.&#160; (Good thing I cannot take credit for creating this source data =))</p>
<p>So, I created a primary key on the problem table, did a touch on the layer definition (opening the definition in Studio and saving it without any changes) and then left for twenty minutes.&#160; I&#8217;m thinking there is some sort of caching going within the server, and I&#8217;m not sure how it works.&#160; Immediately reloading the map after adding the primary key did not work &#8211; the entities were still not selectable.&#160; When I came back &#8211; the items in the viewers were now selectable.</p>
<p>So long story short, if again you cannot select map entities using the Autodesk FDO Provider for Oracle ensure that the source table has a primary key defined.&#160; Hopefully this saves someone some grief =)</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:529a75cc-4fc2-418c-ade5-92e424b5f309" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/FDO" rel="tag">FDO</a>,<a href="http://technorati.com/tags/Mapguide+Enterprise" rel="tag">Mapguide Enterprise</a>,<a href="http://technorati.com/tags/Mapguide+Authoring" rel="tag">Mapguide Authoring</a>,<a href="http://technorati.com/tags/Oracle+Spatial" rel="tag">Oracle Spatial</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cannot Select Entities in Mapguide Enterprise 2009 Viewer</title>
		<link>http://www.geospecialling.com/index.php/2008/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/#comments</comments>
		<pubDate>Thu, 08 May 2008 09:27:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[FDO]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/</guid>
		<description><![CDATA[I recently encountered a frustrating problem in my Mapguide travels.&#160; When the map in my application came up, I could not select any entities.&#160; Both window and single selections just did nothing.&#160; I had recently setup my map tier on my Vista x64 box so I was not sure if I had missed something in [...]]]></description>
			<content:encoded><![CDATA[<p>I recently encountered a frustrating problem in my <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank" rel="tag">Mapguide</a> travels.&#160; When the map in my application came up, I could not select any entities.&#160; Both window and single selections just did nothing.&#160; I had recently setup my <a title="Manually configure Mapguide 2009 Web Tier on Vista x64 IIS7" href="http://www.geospecialling.com/index.php/2008/05/manually-configure-mapguide-2009-web-tier-on-vista-x64-iis7/" target="_blank" rel="tag">map tier on my Vista x64 box</a> so I was not sure if I had missed something in the configuration there.&#160; In addition to this, my application is doing some dynamic authoring and adding a bunch of layers to the map before the viewer loads it up.</p>
<p>I saved a copy of the dynamically generated maps and layers to the library repository.&#160; Everything checked out.&#160; The layers were marked as selectable.</p>
<p>Next step was to check out the server logs on my Mapguide server.&#160;&#160;&#160; We have a nice error occurring a lot: Error: An exception occurred in FDO component. String does not represent a valid filter. </p>
<p>So into the code I go.&#160; I ripped out all my dynamic authoring calls, and the map loads and selects no problem.&#160; As I was starting to suspect, my code was to blame &#8211; and there is something specific to my filters on the layers:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> newLayer.VectorLayerDefinition.Filter = <span style="color: #006080">&quot;BLDG_ID = &quot;</span><span style="color: #006080">&quot;&quot;</span> &amp; szBldgID &amp; <span style="color: #006080">&quot;&quot;</span><span style="color: #006080">&quot; AND BLDG_FLOOR &quot;</span><span style="color: #006080">&quot; IN(0,&quot;</span> &amp; nFloorNumber.ToString &amp; <span style="color: #006080">&quot;)&quot;</span><span style="color: #006080">&quot;&quot;</span></pre>
</p></div>
</div>
<p>&#160;</p>
<p>I had assumed that FDO had an IN clause, did a quick check in Mapguide Studio&#8217;s condition builder and didn&#8217;t see one.&#160; Fair enough, in this case I can get by with two equals conditions in my select as the list of conditions will only ever consist of two values.</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> newLayer.VectorLayerDefinition.Filter = <span style="color: #006080">&quot;BLDG_ID = &quot;</span> &amp; szBldgID &amp; <span style="color: #006080">&quot; AND (BLDG_FLOOR = 0 OR BLDG_FLOOR = &quot;</span> &amp; nFloorNumber.ToString &amp; <span style="color: #006080">&quot;)&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> 'newLayer.VectorLayerDefinition.Filter = <span style="color: #006080">&quot;BLDG_ID = &quot;</span> &amp; szBldgID &amp; <span style="color: #006080">&quot; AND BLDG_FLOOR  IN(0,&quot;</span> &amp; nFloorNumber.ToString &amp; <span style="color: #006080">&quot;)&quot;</span><span style="color: #006080">&quot;&quot;</span></pre>
</p></div>
</div>
<p>
  <br />Long story short, if you are selecting items in the map viewer that are supposed to be selectable, check your server logs.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7bbff4f2-31de-4ffd-bbef-2315558181c6" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/FDO" rel="tag">FDO</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

