hi everyone. I have a problem which I haven’t solved it. I want to create “Pan event” whenever I pressed left mouse and move it on the map. However, I still have not solved it.
Can you help me. Thanks a lot
Hello @tiennguyen
You can set up the ExtentsChanged event, which will occur on a Pan or Zoom. But on a Pan, the Extents Width and Height will not change. So in the event, always save the previous Extents, then compare it with the current Extents Width and Height. If they have not changed, you know that the map was Panned.
Hope that helps.
Jerry.
Thank you for your answer. However, I think there is a small confusing here. My aim is that:
Each time I pressed left mouse and move mouse on axMap ( two trigger happens at the same time), I want to program my Map will be pan like Pan event of googlemap.
Can you tell me how to do it. thanks a lot.
If I’m now understanding, what you’re looking for is the Pan tool? Is this correct?
axMap1.CursorMode = tkCursorMode.cmPan;
axMap1.MapCursor = crsrMapDefault;
Yes. I want to use pan tool. However, I want to when I press left mouse down, hold and move it, map will be pan. When I realease mouse, map will not pan tool.
I try it some ways, but it has failed.
Can you suggess some idea? Thanks a lot
Did you tried Jerry’s suggestion? It should work like you need.
thank for your answer. I solved it. Thanks a lot