Hi Pamela- Yes, I was looking for code to parse out the element "latlng". Now it could. http://japonyol.net/maps/swf/sismo.swf Thanks for your kindness always.
Seis Pesos, Yokohama JP On 1月13日, 午前4:30, "pamela (Google Employee)" <[email protected]> wrote: > Hi Seis- > > I think you're looking for code to parse out the element with > "geo:lat" as the tag name instead. > > I'd suggest something like the following, based on my GeoRSSParser code: > > var geo_ns = new Namespace("http://www.w3.org/2003/01/geo/wgs84_pos#"); > var lat = new Number(item.geo_ns::lat); > var lng = new Number(item.geo_ns::long); > var latlng = new LatLng(lat, lng); > > That creates the GeoRSS namespace and tells Flash to look for "lat" > and "long" tabs with that namespace. > - pamela > > 2009/1/7 Seis Pesos <[email protected]>: > > > > > Thanks pamela, but I still have some misapprehension... > > > public function readXml(event:Event):void{ > > var channelXML:XML = new XML(event.target.data); > > var channel:XMLList = channelXML..item; > > var channelCount:int = channel.length(); > > trace(channelXML); > > trace(channelCount); > > trace(channelxml..item[...@name); > > var i:Number; > > for (i=0; i < channelCount; i++) { > > var item:XML = channel[i]; > > var title:String = it...@title; > > var description:String = it...@description; > > var myArray = item.split("geo:lat"); > > var lat = myArray[1]; > > var yourArray = item.split("geo:long"); > > var lng = yourArray[1]; > > var latlng:LatLng = new LatLng(lat, lng); > > createMarker(latlng, title, description); > > } > > } > > > On 1月7日, 午後12:03, "pamela (Google Employee)" <[email protected]> > > wrote: > >> Hi Seis - > > >> To extract the bit after the colon, I'd do: > > >> var myArray = myString.split(":"); > >> var lat = myArray[1]; > > >> - pamela > > >> On Wed, Jan 7, 2009 at 1:56 PM, Seis Pesos <[email protected]> wrote: > > >> > In javascript, we can convert colon (":"). > >> > For example: "geo:lat" to "lat", also "geo:long" to "lng". > >> > See;http://japonyol.net/editor/small-sismo2.html > > >> > In case of Flash (mxml), how to write it? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
