How to use open street map offline
-
what you are asking is pretty major: how to write a program to do such and such. You need to be more focused on your requests so that people see you're making some effort on your own.
Have you researched your task using internet search engines? How much time have you spent reading about online map services and how they work?