Example of a project using Arduino Mega + WiFi Shield + GPS Shield

Hello, I need guidance conecting a wifi shield and a gps shield to an Arduino mega. I need to get gps data, store it in a microsd and then send it to a server using wifi. Is there previous work where I can check which shields are compatible? I already have a sainsmart Arduino and an Arduino wifi Shield. I also have a gps shield Itead but can't get it to work so I'll get the sparkfun gps shield.

Any help is welcome.

Thanks.