chpicker
Programmer
- Apr 10, 2001
- 1,316
Ok, I tried posting this question on the ESRI MapObjects Developer's Connection forum, and no one answered me...so I thought I'd see if anyone here had any clues. This is specific to the MapObjects Map class.
There are 2 events which are supposed to fire when the trackinglayer of the map is drawn. One is beforetrackinglayerdraw, the other is (surprise!) aftertrackinglayerdraw. The problem is that it only seems to actually fire when the layer is moved or revealed. It does NOT fire when you add or remove GeoEvents, or even if you clear the layer completely. I use this layer to track vehicle locations, and it updates their positions every 10 seconds. In the AfterDraw event I have the program adding text labels to the vehicles...but it only fires if I pan the map or move a window that was partially covering it. The obvious solution of manually calling the AfterDraw event doesn't work because the method used to draw the text labels generates an error if you try to use it anywhere that isn't a direct response to a drawing event. Basically, the labels disappear whenever the timer event fires to update the GeoEvents. They don't come back unless I move the map.
Any suggestions?
There are 2 events which are supposed to fire when the trackinglayer of the map is drawn. One is beforetrackinglayerdraw, the other is (surprise!) aftertrackinglayerdraw. The problem is that it only seems to actually fire when the layer is moved or revealed. It does NOT fire when you add or remove GeoEvents, or even if you clear the layer completely. I use this layer to track vehicle locations, and it updates their positions every 10 seconds. In the AfterDraw event I have the program adding text labels to the vehicles...but it only fires if I pan the map or move a window that was partially covering it. The obvious solution of manually calling the AfterDraw event doesn't work because the method used to draw the text labels generates an error if you try to use it anywhere that isn't a direct response to a drawing event. Basically, the labels disappear whenever the timer event fires to update the GeoEvents. They don't come back unless I move the map.
Any suggestions?