mapObj.nextLabel() can be used only once
As mapObj.nextLabel() contains a static variable in its body (see below), it
cannot be invoked several times to retrieve labelCacheMemberObj objects of a
map. And due to the same reason, it cannot be used in multithreaded environment.
Is it possible to implement something like labelCacheObj.getLabel(index) to
access labelCacheMemberObj objects through mapObj.labelcache or modify
nextLabel() to allow at least to reset an index in it?
By the way, there is already labelCacheObj.labels holding all
labelCacheMemberObj objects. It could be nice to have a couple of set/get for it.
// nextLabel() in question
static labelCacheMemberObj *nextLabel(mapObj *self) {
static int i = 0;
if (i < self->labelcache.numlabels)
return &(self->labelcache.labels[i++]);
else
return NULL;
}
Change History
(13)
Component: |
MapScript-SWIG → MapScript-PHP
|
Owner: |
changed from sdlime to mapserverbugs
|
Status: |
assigned → new
|
Description: |
modified (diff)
|
Milestone: |
→ 5.0 release
|
Owner: |
changed from mapserverbugs to dmorissette
|
Milestone: |
5.0 release → 5.2 release
|
Milestone: |
5.2 release → 5.4 release
|
Milestone: |
5.4 release → 6.0 release
|
Cc: |
dmorissette added
|
Owner: |
changed from dmorissette to aboudreault
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Cc: |
jmckenna added
|
Component: |
MapScript-PHP → MapServer Documentation
|
mapscript/swiginc/map.i