On Aug 30, 12:33 am, Stewart <[email protected]> wrote: > Hi All - > > I'm building a webapp where I want to store a stringified > DirectionsResult into my DB, and then pull it out later on and show it > on a map at a later time.
Why not get it when you need it? > > I've got a sample application here:http://bolidian.com/samples/gmapi/test.html > > As you can guess, it's not working. :-/ > > When I first use a DirectionsService to get the DirectionsResult and > pass it to a DirectionsRenderer then, it works fine. I then stringify > the DirectionsResult and put in my DB, then pull it out, destring it > (using json2.js) and call setDirections on a DirectionsRenderer: no > response. The DirectionsRenderer doesn't show anything. > > My javascript console shows this error: > > Error: b[Kb] is not a function > Source File:http://maps.gstatic.com/intl/en_us/mapfiles/api-3/2/2/main.js > Line: 85 > > I don't understand what this error means or why it's there -- and that > JS code is heavily minified so I can't really understand it. > > Note that I've carefully compared the DirectionsResult going into and > out of the DB, and they're identical char-by-char. Not anymore. When I do the same directions query, the "internal" names the API uses are different (there must have been a release since you captured your sample). Since the json object contains these internal names, I have to assume that this is not something that is intended to be done, you will certainly have to lock down the version of the API for it to continue working (since you don't specify the verison in the script include, you are currently getting the development version, I think..). I also see character encoding problems in your version (? instead of the copyright symbol). I wouldn't think this kind of use would be allowed by the Terms of Use, but you are displaying it on a map, so it may be OK (and IANAL), it certainly seems to not be anticipated. -- Larry > > Any help would be most appreciated! All the code is at that link > above. > > Thanks, > Stewart -- 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.
