Hello,
how get the map to the center of the screen without clicking the globabutton of panzoombar of mapcontrols.
please help me.
Regards,
Ravi Bokkala
Hello,
how get the map to the center of the screen without clicking the globabutton of panzoombar of mapcontrols.
please help me.
Regards,
Ravi Bokkala
Hello Ravi,
Thanks for your post. Clicking on the center point of the Pan control makes the map get the full extent. It gets the full extent based on the bounding box of all the layers that you added to your map, you can use
to make this.
wpfMap1.CurrentExtent = //bigest boundingbox of all your layer.
Or if you just want to center the map by where you clicked, you can use the code below: private void wpfMap1_MapClick(object sender, MapClickWpfMapEventArgs e)
{
wpfMap1.CenterAt(e.WorldLocation);
}
Any more questions please feel free to let us know.
Regards,
Gary