how to get scale index!

Apr 24, 2015 at 1:59 AM
guys. I'm using axMap1.DrawCircleEx to draw a point, it move in road about 15km/h. every thing work fine but the speed of drawpoint depend on scale (if u zoom in the speed of draw point is lower) so need to add this index to fomular. I also use axMap1.CurrentScale to assign values to variables but its not correct
Apr 24, 2015 at 7:31 PM
Drawing speed depends on the amount of data that falls within view and on characteristics of the PC. Some of the data is cached in screen buffer, some isn't. There is no way to tell in advance what drawing speed will be at particular scale. Regarding incorrect AxMap.CurrentScale: can you provide more details?

Apr 25, 2015 at 2:06 AM
Edited Apr 25, 2015 at 2:10 AM
dear Sleschinski!
firstly thankyou for quick reply !
Speed of point v = S_map/t , so we just need a correctly S_map = scale_map*S_road. So in my code
axMap1.CurrentScale =0.025;
with: 0.025 mean 125m/1 inch (you can see it in axmap1)
                0.25             1km/inch
                0.05              250m/inch  
               0.0625            250m/inch  
               0.08                   250m/inch  
I dont know the relation bettween CurrentScale and the real scale.
And 1 more question: how can i get lon/lat by click mouse even! im stuck at this
Apr 25, 2015 at 1:10 PM
Edited Apr 25, 2015 at 1:34 PM
Honestly I'm a bit confused with your current scale description. I have some suggestions though.

It's easier to do all the calculations in the map coordinates (aka projected coordinates) and convert to screen coordinates only before actual drawing with AxMap.ProjToPixel. If your map units are meters it is very easy, if they are degrees it may be a bit more complicated. For such application I'd suggest to use meters, i.e. coordinate systems like Google Mercator or appropriate UTM zone.

To get lon/lat from screen coordinates you need AxMap.PixelToDegrees. There are more functions for coordinate conversion described there. You should use them rather than doing your on calculations with AxMap.CurrentScale.

Have you checked these examples: example1, example2? They are similar to your task.

Hope it helps,
Marked as answer by pmeems on 5/19/2015 at 11:52 PM
May 1, 2015 at 9:33 AM
that is exactly what i wana say. i use axMap1.ProjToPixel to convert lon/lat coordinate to pixel coordinate then use axMap1.DrawCircleEx to draw point according pixel coordinate. so reason why i have to get scale index is:
ex: the point move on the way between 2 points, when use axMap1.ProjToPixel its mean the distant of 2 point is measured by the number of pixel but if you zoom map the pixel distant will inscrease => the the position of drawing point (axMap1.DrawCircleEx ) will be change.
PS: thanks for advice about lon/lat from screen, i did it