I can create markers on the map but is there a way to make a button that makes a click create a marker to a maximum of two markers and then be able to reverse geo code the markers?
Nevermind i figured out how to do it on map click, but im having trouble finding my reverse geo coding function here is my code to get to it
if (document.getElementById(‘checkedmarker’).checked) {
var params = { x: d.worldXY.lon, y: d.worldXY.lat, scale: olMap.getScale() };
Map1.ajaxCallAction(“Home.mvc”, ‘reverseGeoCoding’, params, function (result) {
window.alert(‘back’);
});
}
then i need to create the marker and geo code it
[MapActionFilter]
public Collection<
Feature
> reverseGeoCoding(object[] args)
{
PointShape inputLocation = new PointShape(double.Parse(args[0].ToString()), double.Parse(args[1].ToString()));
PointShape p = new PointShape();
ShapeFileFeatureLayer streetLayer = new ShapeFileFeatureLayer();
streetLayer.Open();
Collection<
Feature
> resultFeatures = streetLayer.QueryTools.GetFeaturesNearestTo(inputLocation, GeographyUnit.DecimalDegree, 1, ReturningColumnsType.AllColumns);
return resultFeatures;
}