venugopal24 / geo-autocomplete

Automatically exported from code.google.com/p/geo-autocomplete
0 stars 0 forks source link

how to add a marker based on coordinates recieved from a text box #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
i have centered the location based on saved latitude and longitude values.

i just want to put a marker

this is the code

var lat = $("input[name=lat]").val();

var lng = $("input[name=lng]").val();

var zoom = 17;

if ( lat == null || lat == "" || lng == null || lng == "" ) {

zoom= 1;

}

var map = $("#geocomplete").geocomplete("map"),

center = new google.maps.LatLng(lat,lng);

map.setCenter(center);

map.setZoom(zoom);

Original issue reported on code.google.com by shahrukh...@gmail.com on 12 Jan 2015 at 1:19

Attachments: