I have a collection of coordinates to popular repeater, with city name, latitude and longitude.
.aspx
<form id="form1" runat="server">
<div id="repetidor">
var markers = [
<asp:Repeater ID="rptMarkers" runat="server" Visible="true">
<ItemTemplate>
cidade: <%# Eval("NomeCidade")%>,
lat: <%# String.Format(System.Globalization.CultureInfo.GetCultureInfo("en-US"), "{0:D}", Eval("Latitute")) %>,
lng: <%# String.Format(System.Globalization.CultureInfo.GetCultureInfo("en-US"), "{0:D}", Eval("Longitude")) %>,
</ItemTemplate>
<SeparatorTemplate>
-
</SeparatorTemplate>
</asp:Repeater>
]
</div>
So I get the coordinates;
.aspx.cs
(...)
var address = coordenadas.NomeCidade + ", Brasil";
var locationService = new GoogleLocationService();
var point = locationService.GetLatLongFromAddress(address);
coordenadas.Latitude = point.Latitude;
coordenadas.Longitude = point.Longitude;
coordenadasColecao.Add(coordenadas);
(...)
rptMarkers.DataSource = coordenadasColecao;
rptMarkers.DataBind();
(...)
I'd like it to look like this: 46.1475292 instead of 46.1475292