Retrieving gif data from a RESTful map server

MacBox at earthlink.net MacBox at earthlink.net
Thu Apr 11 12:43:41 EDT 2013


I'm attempting to get a traffic gif from mapquest via their RESTful API, but I am unable to display it; everything results in the image object displaying a grey pattern.

Some of the things I have tried so far:
 
  set the text of img "map" to url MapQuestsLongAPIKeyedURL
 
  set the imageData of img "map" to url MapQuestsLongAPIKeyedURL
 
  put url MapQuestsLongAPIKeyedURL into img "map"
 
  get url MapQuestsLongAPIKeyedURL
  put it into url (binfile:LocalFilePath)
  set the filename of img "map" to LocalFilePath
 
What's interesting is that the saved file from that last attempt will display in Finder via QuickLook, and open up in Preview as well without issue. If I then re-save the file from Preview, THAT file will load into a LiveCode image object (Note: oddly, if I open and save the file from Safari it will not load properly)

I'm guessing that the problem is that I'm trying to dump both the Gif's image and mask data all into the image object, while QuickLook, Finder, Preview, and even Safari know how to reassemble them properly as image and mask data for display.

Does anyone have any ideas for getting this incoming Gif data into an image object properly? Thanks!



More information about the use-livecode mailing list