Home > Net >  How hot is added in the picture?????
How hot is added in the picture?????

Time:09-20

My demand is this:
A picture shows a floor plan, I can add on a lot of hot spots (like baidu map marker), there are many kinds of color, this hot spot can (or moves to the above), when the mouse click can display detailed information about the hot spots,
At the same time when zooming, hot also keep moving,,,,

Want to a night didn't know what good idea, don't write code for a long time, haven't got the,,, you don't too few,,,,,,,,,, -- -- -- -

CodePudding user response:

This is a similar map platform or the development of CAD platform, controls inherit from usercontrol, equivalent to in the white paper on development, realize the images load, scale development, realize the hot spots to add, delete development, is based on the need to implement the coordinate transformation development,

CodePudding user response:

Establish such a data structure,
Public class hot information
{
Public Button obj.//control is used to display the hotspot, what controls can casually, can be in either shape or a picture box control
Public Point p;//control the upper left corner the coordinates relative to the parent control
Public string tip;//message
}

1, when creating a hot, a hot information dynamically generated classes, a hot information added to the class of the collection,
2, when moving the mouse on the map, traverse a collection, to see if a hot
If (x> Class=hot information. P.x & amp; & xY> Class=hot information. P.y & amp; & Y{
//hot hit, and then display the information
}
3, when zooming, according to the dynamic scaling change all hot information class p
New p.x=old p.x * (new width/old map width);
New p.y=old p.y * (new height/old map height);

To provide a train of thought, can help to this,

CodePudding user response:

reference 1st floor qq1277874734 response:
this is a similar map platform or the development of CAD platform, controls inherit from usercontrol, equivalent to in the white paper on development, realize the images load, scale development, realize the hot spots to add, delete development, is based on the need to implement the coordinate transformation development,


Thank you, I see you in the screenshot, is similar to the function of control right now?
  •  Tags:  
  • C#
  • Related