<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET WebForms</title><link>https://www.dotnetzone.gr:443/cs/forums/13/ShowForum.aspx</link><description>Θέματα για web εφαρμογές, σε ASP.NET WebForms</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: ASP.NET + Google Maps + Geocoding</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/50080.aspx</link><pubDate>Tue, 14 Apr 2009 06:34:35 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:50080</guid><dc:creator>StrouMfios</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/50080.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=50080</wfw:commentRss><description>Αργεί πολύ να σου φέρει τους markers απο την στιγμή που επιλέγεις την κατηγορία?&lt;br&gt;Οι markers πόσοι είναι περίπου ανα κατηγορία?&lt;br&gt;</description></item><item><title>ASP.NET + Google Maps + Geocoding</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/49959.aspx</link><pubDate>Wed, 08 Apr 2009 21:16:35 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:49959</guid><dc:creator>Harkon</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/49959.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=49959</wfw:commentRss><description>χαίρεται,&lt;br&gt;
&lt;br&gt;
προσπαθώ να παίξω με google maps και εμφάνιση pins στον χάρτη έχοντας μόνο τις διευθύνσεις οπότε πάω στην χρήση Geocoding. &lt;br&gt;
να πω την αλήθεια το περίμενα ευκολότερο, μάλλον πιο απλό.&lt;br&gt;
&lt;br&gt;
ψάχνοντας στο διαδίκτυο δοκίμασα την λύση του &lt;a href="http://www.codeproject.com/KB/scrapbook/ask_GoogleMap_Geocoder.aspx" target="_blank"&gt;http://www.codeproject.com/KB/scrapb..._Geocoder.aspx&lt;/a&gt;&lt;br&gt;
χρησιμοποιώντας τις βιβλιοθήκες αυτές κατάφερα να το κάνω να δουλέψει&lt;br&gt;
αλλά το μεγάλο μου πρόβλημα είναι πως είναι υπερβολικά αργό!&lt;br&gt;
&lt;br&gt;
έχω ένα dropdown list που επιλέγει την κατηγορία σημείων προς εμφάνιση
και κάνει υπερβολικά πολύ να ενημερώσει. Ο κώδικας είναι παρακάτω.
Υπάρχει κάτι πιο γρήγορο γενικά ή αν βλέπετε κάποιο λάθος/βελτίωση θα
σας ήμουν υπόχρεως.&lt;br&gt;
&lt;br&gt;
ευχαριστώ.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;span style="color:Black;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SqlConnection MyConnection &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; SqlConnection(&lt;span style="font-family:Courier New;font-size:11px;font-weight:normal;"&gt;@"Data Source=..; Initial Catalog = ..; Integrated Security=true"&lt;/span&gt;);
MyConnection.Open();
&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; sql;

SqlCommand MyCommand &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; SqlCommand(sql, MyConnection);
SqlDataReader MyDataReader &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; MyCommand.ExecuteReader(CommandBehavior.CloseConnection);

GoogleMapForASPNet1.GoogleMapObject.Points.Clear();

&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;while&lt;/span&gt; (MyDataReader.Read())
        {
         
&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; xml &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; GMapGeocoder.Util.GetXml(MyDataReader[2].ToString() &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;+&lt;/span&gt; &lt;span style="font-family:Courier New;font-size:11px;font-weight:normal;"&gt;", 41500"&lt;/span&gt;, ConfigurationManager.AppSettings[&lt;span style="font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"GoogleAPIKey"&lt;/span&gt;]);
GMapGeocoder.Generated.kml kml &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; GMapGeocoder.Util.DeserializeXml(xml);

&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (kml.Response.Placemark !&lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;null&lt;/span&gt;)
            {
                &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; lan &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; kml.Response.Placemark[0].Point.coordinates;

                &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; fullAddress &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; kml.Response.Placemark[0].address;
                &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; countryCode &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; kml.Response.Placemark[0].AddressDetails.Country.CountryNameCode;
                &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; stateCode &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; kml.Response.Placemark[0].AddressDetails.Country.
                                AdministrativeArea.AdministrativeAreaName;

                &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;[] tmp &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; lan.Split(',');

                GooglePoint GP &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; GooglePoint();
                GP.ID &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; myId; &lt;span style="color:Green;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//dilomeno parapanw&lt;/span&gt;
                GP.Latitude &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; Convert.ToDouble(tmp[1].Replace('.', ','));
                GP.Longitude &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; Convert.ToDouble(tmp[0].Replace('.', ','));
                GP.InfoHTML &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"This is point "&lt;/span&gt; &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;+&lt;/span&gt; myId;
                GoogleMapForASPNet1.GoogleMapObject.Points.Add(GP);

            }&lt;span style="color:Green;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//end if&lt;/span&gt;

        }&lt;span style="color:Green;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//end while&lt;/span&gt;

MyConnection.Close();&lt;/span&gt;&lt;/pre&gt;&lt;br&gt;</description></item></channel></rss>