Don't have MP2 installed currently
PS. Correct me if I'm wrong, but I'm pretty sure that MP1 world weather already has auto detection implemented, are you reinventing the wheel here?
Having a look I couldn't find a weather plugin for MP1 except the one @Micropolis wrote which is closed source as far as I can tell.
I haven't got MP1 installed so I can't check if Micro's weather plugin has auto detection but it isn't listed as a feature.
If anyone has an idea I'm happy to try it out.