A computer-implemented method for providing a location based service in an electronic device, the method comprising: detecting first location information of the electronic device when the electronic device performs a first operation relating to an operation of the electronic device including any of a control setting of the electronic device, execution of application programs, or an initial mode when an application mode is executed; determining a category including a plurality of location information having a characteristic similar to said first location information, wherein said determining of the category is based on map data in the electronic device; and mapping the first operation to the determined category; wherein the method further comprises: after said mapping is completed, detecting second location information of the electronic device; if said second location information corresponds to said category, storing the detected second location information in the electronic device to perform said first operation automatically; wherein the method further comprises: determining a number of times the first operation and a second operation are performed in relation to the category, said second operation being an operation previously mapped to the category; comparing the number of times the first operation is performed with the number of times the second operation is performed; and mapping the most performed of said first operation and said second operation to said category. detecting first location information of the electronic device when the electronic device performs a first operation relating to an operation of the electronic device including any of a control setting of the electronic device, execution of application programs, or an initial mode when an application mode is executed; determining a category including a plurality of location information having a characteristic similar to said first location information, wherein said determining of the category is based on map data in the electronic device; and mapping the first operation to the determined category; wherein the method further comprises: after said mapping is completed, detecting second location information of the electronic device; if said second location information corresponds to said category, storing the detected second location information in the electronic device to perform said first operation automatically; wherein the method further comprises: determining a number of times the first operation and a second operation are performed in relation to the category, said second operation being an operation previously mapped to the category; comparing the number of times the first operation is performed with the number of times the second operation is performed; and mapping the most performed of said first operation and said second operation to said category. after said mapping is completed, detecting second location information of the electronic device; if said second location information corresponds to said category, storing the detected second location information in the electronic device to perform said first operation automatically; wherein the method further comprises: determining a number of times the first operation and a second operation are performed in relation to the category, said second operation being an operation previously mapped to the category; comparing the number of times the first operation is performed with the number of times the second operation is performed; and mapping the most performed of said first operation and said second operation to said category. determining a number of times the first operation and a second operation are performed in relation to the category, said second operation being an operation previously mapped to the category; comparing the number of times the first operation is performed with the number of times the second operation is performed; and mapping the most performed of said first operation and said second operation to said category.