Select to view content in your preferred language

Question?

2167
0
11-22-2014 12:38 PM
MilerDouglas
Deactivated User

I wrote the following code and everything run ok!

function manualPickAddress(evt){ 

map.graphics.clear();

var point = new Point(evt.mapPoint.x,evt.mapPoint.y,new SpatialReference({ wkid:2100 }));

window.alert(point.x+ ' ' + point.y);

var symbol = new SimpleMarkerSymbol().setStyle(SimpleMarkerSymbol.STYLE_SQUARE).setColor(new Color([255,0,0,0.5]));

var graphic = new Graphic(point,symbol);

graphic.setAttributes( {"XCoord":evt.mapPoint.x,"YCoord":evt.mapPoint.y,"Name":'Information'} );

map.graphics.add(graphic);

map.infoWindow.setTitle("Information");

map.infoWindow.setContent("Longtitude:" + evt.mapPoint.x+'<br />'+"Latitude:"+evt.mapPoint.y);

map.infoWindow.show(point);

}

 

The problem is that when I pick Athens Greece the long, lat, I take is not perfect or map constructor.

I want to make a map to inititalize and point to Athens Greece.

 

What should I do?

 

What values are evt.mapPoint.x and evt.mapPoint.y?

 

The event is click on the map.

0 Kudos
0 Replies