Hi,
I want to add a pin when clicking on a button from gps coordinates. And I want this pin to stay even if I zoom on the map.
Unfortunately, I tried lots of methods and it 's not working.
Could you help me please
Here is my whole code :
namespace InterfaceProjetBateau
{
public partial class Form1 : Form
{
private System.Windows.Forms.Timer timer;
public Form1()
{
InitializeComponent();
// Timer 1s (pour maj date)
timer = new System.Windows.Forms.Timer();
timer.Interval = 1000;
timer.Tick += Timer_Tick;
timer.Start();
}
private void Timer_Tick(object sender, EventArgs e)
{
// À chaque tic du minuteur, mettez à jour la date
Afficher_date();
}
private void Afficher_date()
{
// Obtenez la date actuelle
DateTime currentDate = DateTime.Now;
// Formattez la date selon votre besoin
string date = currentDate.ToString("dddd d MMMM yyyy H'h'mm'm'ss's'");
// Mettez à jour le texte de textBox_date
textBox_date.Text = date;
}
private void button1_Click(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
}
private void button_alert_page_Click(object sender, EventArgs e)
{
Alertes Defauts_form = new Alertes();
Defauts_form.Show();
}
private void gMapControl1_Load(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
axMap1.Latitude = 47.2535f;
axMap1.Longitude = -1.372f;
axMap1.CurrentZoom = 17;
}
private void axMap1_MouseDownEvent(object sender, AxMapWinGIS._DMapEvents_MouseDownEvent e)
{
}
private void button1_Click_2(object sender, EventArgs e)
{
axMap1.Latitude = 47.2535f;
axMap1.Longitude = -1.372f;
axMap1.CurrentZoom = 17;
}
private void pictureBox2_Click(object sender, EventArgs e)
{
}
private void button1_Click_3(object sender, EventArgs e)
{
axMap1.Latitude = 47.24837422208973f;
axMap1.Longitude = -1.5496057119673134f;
axMap1.CurrentZoom = 18;
}
private void button2_Click(object sender, EventArgs e)
{
//Add a pin at : lattitude = 47.25, longitude = -1.55
}
}
}