Gmap does not work on iPhone
So your solution hacks the module code. Do the community a favour and submit your change to the issue cue for the module so that everyone can share in your success or even better roll a patch for the authour to apply to the module code.