Ticket #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
Note: See
TracTickets for help on using
tickets.
