I'll email you example code off list. Chad Killingsworth
On May 6, 7:13 am, Jack Berberette <[email protected]> wrote: > Hi Chad, > > I do have a quick question about the XSLT you have...and please forgive me > my newbiness :-) How would I call something > likehttps://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashxinto the XSLT you have > to create the JSON object....and how would I call the output object. Does > the XSLT have a place to put in a URL and a place to name the output JSON? > > Sorry....just really new to this. > > Jack > > On Tue, May 4, 2010 at 7:22 PM, Chad Killingsworth < > > > > > > [email protected]> wrote: > > Technically the v2 API will load on an iPhone, but it horribly slow. > > Seehttp://www.youtube.com/watch?v=zI8at1EmJjAfor information on > > exactly how slow. > > > Were I implementing this, I would read the XML file on the server and > > change it into a JSON object. I just happen to have an XSLT to change > > XML into JSON:http://calendar.missouristate.edu/feed/json.xsl- > > you'll need to specify the callback variable and the array elements > > variable at the top of the XSL. The array elements variable lists out > > any nodes that can occur more than once. For RSS you might use "|item| > > category|". Seehttp://code.google.com/apis/gdata/docs/json.htmlfor > > more information on how this works. > > > Once you have a JSON object, you simply loop through the items and > > place them on the map. > > for(var i = 0; i < JSONObj.rss.channel.item.length; i++) { > > var latLng = new > > google.maps.LatLng(parseInt(JSONObj.rss.channel.item[i].geo$lat, 10), > > parseInt(JSONObj.rss.channel.item[i].geo$long, 10)); > > //create marker with latLng ... > > } > > > Good luck, > > Chad Killingsworth > > > On May 3, 9:22 pm, Jack Berberette <[email protected]> wrote: > > > Hi Chad, > > > > Thanks for the quick response. Is it possible to do this with an XML > > feed. > > > If not...can this be done with v2? > > > > Thanks, > > > > Jack > > > > On Mon, May 3, 2010 at 8:50 PM, Chad Killingsworth < > > > > [email protected]> wrote: > > > > The v3 API doesn't currently support KML data. It is however listed on > > > > the development roadmap. > > > > > Chad Killingsworth > > > > > On May 3, 12:56 pm, Jack Berberette <[email protected]> wrote: > > > > > I tried that link but could not find the answer. I searched but > > couldn't > > > > > find anything relevant. > > > > > > I don't understand v2 v.s. v3 but all I'm trying to do is get this > > piece: > > > > > var geoXml = new GGeoXml(" > > > >https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx"); > > > > > > to show up as markers on the following code and don't know how to do > > > > it...I > > > > > have commented out my attempts. As soon as I un-comment them I get a > > > > blank > > > > > screen. The site is athttp://www.gamecarver.com/maptest2.html...Iam > > > > > really stuck and don't know what to do: > > > > > > <html> > > > > > <head> > > > > > <meta name="viewport" content="initial-scale=1.0, user-scalable=no" > > /> > > > > > <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> > > > > > <title>Google Maps JavaScript API v3 Example: iPhone > > Geolocation</title> > > > > > <script type="text/javascript" src=" > > > >http://maps.google.com/maps/api/js?sensor=true"></script> > > > > > <script type="text/javascript"> > > > > > var initialLocation; > > > > > var statepolice = new google.maps.LatLng(37.502168, -77.542212); > > > > > // var geoXml = new GGeoXml(" > > > >https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx"); > > > > > > function initialize() { > > > > > var myOptions = { > > > > > zoom: 14, > > > > > mapTypeId: google.maps.MapTypeId.ROADMAP > > > > > }; > > > > > var map = new > > google.maps.Map(document.getElementById("map_canvas"), > > > > > myOptions); > > > > > > // Safari supports the W3C Geolocation method > > > > > if(navigator.geolocation) { > > > > > navigator.geolocation.getCurrentPosition(function(position) { > > > > > initialLocation = new > > > google.maps.LatLng(position.coords.latitude,position.coords.longitude); > > > > > > var placeMarker = new google.maps.Marker({ > > > > > position: initialLocation, > > > > > map: map, > > > > > }); > > > > > // map.addOverlay(geoXml); > > > > > map.setCenter(initialLocation); > > > > > }, function() { > > > > > handleNoGeolocation(browserSupportFlag); > > > > > }); > > > > > } else { > > > > > // Browser doesn't support Geolocation > > > > > handleNoGeolocation(); > > > > > } > > > > > > function handleNoGeolocation() { > > > > > initialLocation = statepolice; > > > > > map.setCenter(initialLocation); > > > > > }} > > > > > > </script> > > > > > </head> > > > > > <body style="margin:0px; padding:0px;" onload="initialize()"> > > > > > <div id="map_canvas" style="width:100%; height:100%"></div> > > > > > </body> > > > > > </html> > > > > > > On Mon, May 3, 2010 at 1:04 PM, Jack Berberette <[email protected]> > > > > wrote: > > > > > > Thanks Rossko....is there a way to do this with v3. Would it be > > better > > > > to > > > > > > do it that way? > > > > > > > Jack > > > > > > > On Mon, May 3, 2010 at 1:02 PM, Rossko <[email protected] > > > > > wrote: > > > > > > >> You're using API v2. That has its own group - > > > > > >>http://groups.google.com/group/Google-Maps-API > > > > > > >> -- > > > > > >> You received this message because you are subscribed to the Google > > > > Groups > > > > > >> "Google Maps JavaScript API v3" group. > > > > > >> To post to this group, send email to > > > > > >> [email protected]. > > > > > >> To unsubscribe from this group, send email to > > > > > >> [email protected]<google-maps-js-api-v3%2B > > > > > >> [email protected]><google-maps-js-api-v3%2B > > [email protected]><google-maps-js-api-v3%2B > > > > [email protected]> > > > > > >> . > > > > > >> For more options, visit this group at > > > > > >>http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > > > > > > PR: wait... I: wait... L: wait... LD: wait... I: wait... > > wait... > > > > Rank: > > > > > > wait... Traffic: wait... Price: wait... C: wait... > > > > > > PR: wait... <javascript:{}> I: wait... <javascript:{}> L: > > > > > wait...<javascript:{}> LD: > > > > > wait... <javascript:{}> I: wait... <javascript:{}>wait... > > <javascript:{}> > > > > Rank: > > > > > wait... <javascript:{}> Traffic: wait... <javascript:{}> Price: > > > > > wait...<javascript:{}> C: > > > > > wait... <javascript:{}> > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Google Maps JavaScript API v3" group. > > > > > To post to this group, send email to > > > > [email protected]. > > > > > To unsubscribe from this group, send email to > > > > [email protected]<google-maps-js-api-v3%2B > > > > [email protected]><google-maps-js-api-v3%2B > > [email protected]> > > > > . > > > > > For more options, visit this group athttp:// > > > > groups.google.com/group/google-maps-js-api-v3?hl=en. > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Google Maps JavaScript API v3" group. > > > > To post to this group, send email to > > > > [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]<google-maps-js-api-v3%2B > > > > [email protected]><google-maps-js-api-v3%2B > > [email protected]> > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Google Maps JavaScript API v3" group. > > > To post to this group, send email to > > [email protected]. > > > To unsubscribe from this group, send email to > > [email protected]<google-maps-js-api-v3%2B > > [email protected]> > > . > > > For more options, visit this group athttp:// > > groups.google.com/group/google-maps-js-api-v3?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Maps JavaScript API v3" group. > > To post to this group, send email to > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-maps-js-api-v3%2B > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > PR: wait... <javascript:{}> I: wait... <javascript:{}> L: > wait...<javascript:{}> LD: > wait... <javascript:{}> I: wait... <javascript:{}>wait... <javascript:{}> > Rank: > wait... <javascript:{}> Traffic: wait... <javascript:{}> Price: > wait...<javascript:{}> C: > wait... <javascript:{}> > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" 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 > athttp://groups.google.com/group/google-maps-js-api-v3?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
