[mapguide-users] Selecting object returns wrong primary key

marius.360 marius at osssa.co.za
Tue Mar 10 03:29:43 EDT 2009


No, these situations do not occur. The objects in question is a line, and it
is not near another object that returns the primary key on the mouseover.
The big problem is that the number the showinfo returns does not even exist
in the table. We use the fillowing code to get the selection string for the
object:

selection = new MgSelection(map, selectionXml);
    layers = selection.GetLayers();
    
    var queryOptions = new MgFeatureQueryOptions();
 
    for (var i=0; i < layers.GetCount(); i++) {        
  var layer = layers.GetItem(i)
  var layername = layer.GetName()
  
  var layerClassName = layer.GetFeatureClassName();
  selectionString = selection.GenerateFilter(layer, layerClassName);
 }

The number returned by the mouse-over is definatly correct for the object in
question, and the one returned by the code above does not even exist in the
table.

Please let me know if you need more info.



Crispin_at_1Spatial wrote:
> 
> Do you have any data that is overlaid - polygons on top of polygons? - or
> it it tessalated or lines or points?
> The default lookup-buffer for the MapGuide hover-over tooltip is pretty
> big (4 pixels + some coord transformation that can result in a wide
> search).
> Are you sure the hover-over is the correct ID as this can pick up other
> nearby IDs?
> 
> 
> 
> marius.360 wrote:
>> 
>> I select an object on the map, on the mouse over it gives me the correct
>> primary key, but when I open a capture form where attribute information
>> is displayed, another different ID is sent through, This however, does
>> not happen for all objects, only a couple of them.
>> 
>> Can anyone give me suggestions as to why this happen?
>> 
>> Thanks
>> 
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Selecting-object-returns-wrong-primary-key-tp2448893p2453681.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list