---
title: "Enter the location in text box show address in map or point the current location."  
description: "Enter the location in text box show address in map or point the current location."  
author: "Milin Narkhede"  
published: 2015-02-28  
updated: 2015-03-07  
canonical: https://www.mindstick.com/forum/12992/enter-the-location-in-text-box-show-address-in-map-or-point-the-current-location  
category: "javascript"  
tags: ["jquery", "javascript", "google api"]  
reading_time: 1 minute  

---

# Enter the location in text box show address in map or point the current location.

if [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page) my [current location](https://www.mindstick.com/forum/34690/how-to-automatically-fill-our-current-location-in-the-places-textarea-for-my-mvc-application) show ..this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is work but i enter a location box any other address [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) not work please help me..\
\
![Enter the location in text box show address in map or point the current location.](https://www.mindstick.com/mindstickforums/7489a687-f249-4988-b469-3e8db9e749ba/images/f3076a6e-e679-4375-859f-4a6b5c561335.png)\

## Replies

### Reply by Milin Narkhede

Thanks\
\

##### jack c and john smith code is running successfully.

Milin.\

\

### Reply by Jack C

you can try following lines of code:\
\

```
function geocodePosition(pos) {
  geocoder.geocode({
    latLng: pos
  }, function(responses) {
    if (responses && responses.length > 0) {
      updateMarkerAddress(responses[0].formatted_address);
    } else {
      updateMarkerAddress('Cannot determine address at this location.');
    }
  });
}
```

\

### Reply by Milin Narkhede

Hello Sir,\
\
please check this link...\
http://nvsoft.in/GetMap/CurrentLocation.htm\
\
current [location](https://www.mindstick.com/blog/11636/relocating-business-or-office-to-another-location) is show but in textbox i type enter a location this functionality not working...\
i have used javascript but not proper work please help me.. \
\
Milind..\

### Reply by John Smith

check following code

```
var txtValue= new google.maps.LatLng(22.258652//textbox1.value                                                           ,71.192381//textbox2.value    );  var mapOptions = {    zoom:6,    mapTypeId: google.maps.MapTypeId.ROADMAP,    center: txtValue  }  map = new google.maps.Map(document.getElementById('map'), mapOptions);  directionsDisplay.setMap(map);
```

\


---

Original Source: https://www.mindstick.com/forum/12992/enter-the-location-in-text-box-show-address-in-map-or-point-the-current-location

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
