ASP.NETÖд´½¨GeoRSS¶©ÔÄÔ´(2)
Dim searchFrom As String = context.Request.QueryString("SearchFrom") If Not searchFrom Is Nothing Then spName = "GetNearbyStoresGML" Dim latLong() As String = Split(searchFrom, ",", 2) cmd.Parameters.Add(New SqlParameter("Lat", latLong(0))) cmd.Parameters.Add(New SqlParameter("Long", latLong(1))) End If×¢Ò⣺Èç¹ûÇëÇó°üº¬ÃûΪ SearchFrom µÄ²ÎÊý(¼Ù¶¨Ëü°üº¬ÒÔ¶ººÅ·Ö¸ôµÄγ¶ÈºÍ¾¶È×ø±ê¶Ô)£¬´¦Àí³ÌÐò½«´Ó´Ë²ÎÊýÌáȡγ¶ÈºÍ¾¶ÈÖµ£¬²¢Ê¹Óà GetNearbyStoresGML ´æ´¢¹ý³Ì·µ»Ø GeoRSS ¶©ÔÄÔ´£¬¶©ÔÄÔ´Öаüº¬ÇëÇóµÄËÑË÷µãÖÜΧ·½Ô² 100 km ·¶Î§ÄÚµÄÉ̵ꡣ
9. ÔÚ×¢ÊÍ Specify the stored procedure name as the command text(½«´æ´¢¹ý³ÌÃû³ÆÖ¸¶¨ÎªÃüÁîÎı¾)Ï£¬Ìí¼ÓÒÔÏ´úÂë¡£
cmd.CommandText = spName
10. ÔÚ×¢ÊÍ Create an element for this rowÏ£¬Ìí¼ÓÒÔÏ´úÂëÀ´Îª´æ´¢¹ý³ÌµÄ½á¹ûÖеÄÿһÐж¼´´½¨Ò»¸ö ±ê¼Ç¡£
rssOutput.AppendLine("")
11. ÔÚ×¢ÊÍ Use columns 0 and 1 for the title and descriptionÏ£¬Ìí¼ÓÒÔÏ´úÂëÒÔ¸ù¾Ý´æ´¢¹ý³Ì·µ»ØµÄÊý¾Ý´´½¨ ", geomRdr.GetValue(0)))
rssOutput.AppendLine(String.Format("{0}", _ geomRdr.GetValue(1)))
12. ÔÚ×¢ÊÍ Add a elementÏ£¬Ìí¼ÓÒÔÏ´úÂëÀ´Îª´ËÌõÄ¿´´½¨ ÔªËØ¡£
rssOutput.AppendLine("")
13. ÔÚ×¢ÊÍ Get the geography instance GML from column 2Ï£¬Ìí¼ÓÒÔÏ´úÂ룬ÒÔ´Ó´æ´¢¹ý³Ì½á¹ûÖмìË÷ GML Êý¾Ý¡£
gml = geomRdr.GetValue(2).ToString()
14. ÔÚ×¢ÊÍ Add the elements to the output XMLÏ£¬Ìí¼ÓÒÔÏ´úÂëÒÔÏò GeoRSS ¶©ÔÄÔ´Ìí¼Ó GML Êý¾Ý¡£
rssOutput.AppendLine(gml)
15. ÔÚ×¢ÊÍ Close and elementsÏ£¬Ìí¼ÓÒÔÏ´úÂë¡£
rssOutput.AppendLine("") rssOutput.AppendLine("")
16. ÔÚ×¢ÊÍ Close the document and send it as the responseÏ£¬Ìí¼ÓÒÔÏ´úÂëÒÔÍê³É GeoRSS ¶©ÔÄÔ´²¢½«Æä·¢Ë͸øÇëÇóÈË¡£
rssOutput.Append("") context.Response.Write(rssOutput.ToString())
17. ±£´æ GeoRSSHandler.vb¡£
×¢²á HTTP ´¦Àí³ÌÐò
1. ÔÚ½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷ÖУ¬Ë«»÷ web.config ÔÚ±à¼Æ÷Öдò¿ªËü¡£
2. ÔÚ ²¿·ÖÖУ¬ÔÚ×¢ÊÍ Register the GeoRSSHandler for .georss requestsÏ£¬Ìí¼ÓÒÔÏ XML¡£
×¢Ò⣺Äú±ØÐëΪÌض¨ÎļþÀ©Õ¹Ãû×¢²á HTTP ´¦Àí³ÌÐò£¬ÒÔ±ã Internet Information Services ½«Õë¶ÔÕâЩÎļþµÄÇëÇóת·¢µ½ÕýÈ·µÄ´¦Àí³ÌÐò¡£
3. ±£´æ web.config¡£
²âÊÔ HTTP ´¦Àí³ÌÐò
1. ÔÚ½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷ÖУ¬µ¥»÷λÓÚÊ÷µÄ¸ùĿ¼ÏµÄÍøÕ¾ÏîÄ¿Îļþ£¬È»ºó°´ F4 ²é¿´ÆäÊôÐÔ¡£
2. Çë×¢Òâ¹Û²ì¶Ë¿ÚºÅÊôÐÔ¡£
3. ÔÚÍøÕ¾²Ëµ¥ÉÏ£¬µ¥»÷Æô¶¯Ñ¡Ïî¡£
4. Ñ¡ÔñÆô¶¯ URL£¬ÊäÈëÒÔÏ URL(½« port Ì滻ΪÍøÕ¾µÄ¶Ë¿ÚºÅÊôÐÔµÄÖµ)£¬È»ºóµ¥»÷È·¶¨¡£
http://localhost:/storefindersite/test.georss
5. ÔÚµ÷ÊԲ˵¥ÉÏ£¬µ¥»÷¿ªÊ¼Ö´ÐÐ(²»µ÷ÊÔ)¡£
6. µ± Microsoft Internet Explorer ® ´ò¿ªÊ±£¬²é¿´°üº¬É̵êÃû³ÆµÄ RSS ¶©ÔÄÔ´µÄÒ³Ãæ¡£
7. ÔÚ Internet Explorer ÖУ¬ÓÒ¼üµ¥»÷¸ÃÍøÒ³µÄÈÎÒâλÖã¬È»ºóµ¥»÷²é¿´Ô´ÎļþÒÔÔÚ¼Çʱ¾Öдò¿ª¸ÃÒ³µÄÔ´Îļþ¡£Çë×¢Ò⣬¸ÃÒ³µÄÔ´ÊÇÄúÇ°Ãæ´´½¨µÄ HTTP ´¦Àí³ÌÐòÉú³ÉµÄ GeoRSS ¶©ÔÄÔ´¡£
8. ¹Ø±Õ¼Çʱ¾¡£
9. ÔÚ Internet Explorer ÖеĵØÖ·À¸ÖУ¬½«ÒÔϲéѯ×Ö·û´®¸½¼Óµ½ URL ºó£¬È»ºó°´ Enter¡£
?SearchFrom=34.000000,-118.000000
10. ÑéÖ¤Éú³ÉµÄ GeoRSS ¶©ÔÄÔ´°üº¬ËÑË÷ÇøÓò¼°ÆäÖеÄËùÓÐÉ̵ꡣ
11. ¹Ø±Õ Internet Explorer¡£
ÍƼöÐÅÏ¢
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- Asp.net MVCÔ´Âë·ÖÎö--Model Validation(Se....
- .Net À¬»ø»ØÊÕ»úÖÆÔÀíºÍËã·¨£¨Ò»£©
- .netʵÌåнâ
- ·ÖÎöASP.NET¶ÁÈ¡XMLÎļþ4ÖÖ·½·¨
- »ñÈ¡ÍøÕ¾ËõÂÔͼ´úÂë
- Asp.net ¸ù¾ÝIPµØÖ·»ñÈ¡¿çÍø¶ÎmacµØÖ·º¯Êý¡¾ËѲء¿
- ¹ýÂËÃô¸Ð¹Ø¼ü×Ö¡£
- Éú³ÉÖ¸¶¨Î»ÊýµÄËæ»ú×Ö·û´®
- ¿Í»§¶Ë»ñÈ¡MACµØÖ·£¬µ½·þÎñÆ÷ÑéÖ¤
- ²½²½ÎªÓª .NETÈý²ã¼Ü¹¹½âÎö ¶þ¡¢Êý¾Ý¿âÉè¼Æ
ÆÀÂÛ