querybypoint problem with inline layer (php/mapscript)
    Andreas Albarello 
    andreas.albarello at TERRITORIUMONLINE.COM
       
    Tue Aug 28 08:58:22 PDT 2007
    
    
  
Didrik Pinte wrote:
> Hi,
> 
> I've got a strange problem with queryByPoint on a dynamically created
> layer. I get the correct shapeindex after running the query with
> MS_SINGLE parameter. But when calling the getShape method, I always
> receive :
> 
> Fatal error: [MapServer Error]: msINLINELayerGetShape(): No inline
> feature with this index. in [...]
Didrik,
I don't think inline layers support that kind of operation. In fact, 
calling getShape on an inline layer and passing a certain value n as the 
index of the shape to retrieve does nothing else than returning the n-th 
shape of that layer (which I believe is the n-th last shape you've 
added), regardless of its index.
Your best bet would be to manually loop through all the shapes by 
calling getShape(-1, 0), getShape(-1, 1), getShape(-1, 2) and so on 
'till you find the one you are looking for.
Then again, judging from the fact that you are creating that layer and 
its shapes on the fly, it might be easier to store the information you 
need about those shapes somewhere else where it's easier accessible by 
index or id, thus completely avoiding to call getShape.
Best regards,
-- 
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development
Territorium Online srl/GmbH
Via Buozzi/Buozzistraße 12 - I 39100 Bolzano/Bozen
email: andreas.albarello at territoriumonline.com
web:   www.territoriumonline.com
--------------------------------------------------------------------
    
    
More information about the MapServer-users
mailing list