Opened 14 years ago
Closed 13 years ago
#3221 closed defect (worksforme)
map.drawQuery() - Access Violation Exception. Inline layer.
Reported by: | stepit | Owned by: | tamas |
---|---|---|---|
Priority: | normal | Milestone: | 5.6.1 release |
Component: | MapScript-C# | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | drawQuery Exception |
Cc: |
Description
Add the New Inline Layer:
layerObj layer = new layerObj(map); layer.type = MS_LAYER_TYPE.MS_LAYER_POLYGON; layer.status = mapscript.MS_ON; layer.connectiontype = MS_CONNECTION_TYPE.MS_INLINE;
Define the attribute names from the inline layer
layer.addProcessing("ITEMS=NAME,COLOR,INDEX"); .....classObj classobj = new classObj(layer); classobj.template = "query"; // making the layer queryableQuery By Attributes
if (layer.queryByAttributes(map, FieldName, ObjName.Trim(), mapscript.MS_MULTIPLE) == (int)MS_RETURN_VALUE.MS_SUCCESS) { // numresults > 0 results.numresults > 0 ..... } Draw Query map.drawQuery() ==>>> Access Violation Exception !!!!!!!!!!!!!!!!!!!
Query By Point
if (layer.queryByPoint(MyMap.Map, point, mapscript.MS_SINGLE, tolerance) == (int)MS_RETURN_VALUE.MS_SUCCESS) { resultCacheObj result = layer.getResults(); if (result.numresults > 0) { ...... } //Draw Query map.drawQuery() ==>>> Access Violation Exception too !!!!!!!! }
if layer is shapefile (*.shp) then map.drawQuery() - OK!
Sorry for my English.
Change History (2)
comment:1 by , 14 years ago
comment:2 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Closing the ticket, no feedback has received.
Note:
See TracTickets
for help on using tickets.
I couldn't reproduce this issue, it may depend on how the features are added to the map. You can use the inline example for testing (http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapscript/csharp/examples/inline.cs) by replacing map.draw() with map.drawQuery() and use the following command:
inline aggpng24 sample.png
Could you provide a more complete code sample to reproduce this?