Point Locate

G

Govind

Hi All,

I am new to this group and also to google map api.

I am creating when user login then display the location in google map

here my page load code

<script src="http://maps.google.com/maps?
file=api&amp;v=2&amp;key=ABQIAAAAR0ME0_WfKRR1jlHOhBv8YRTqD8KII8nGCHEOs63QpaP31mkaURRl5YsTMPCqNK7Vf1nku6NF6o9Qog&sensor=true"
type="text/javascript"></script>


<script type="text/javascript">


function initialize() {
var ii=document.getElementById("aaa").value;
alert(ii);
var latitude=geoip_latitude();
var longitude=geoip_longitude();
// alert(longitude);
var city=geoip_city();
//alert(city)
var country=geoip_country_name();

if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(latitude,longitude ), 7);
var point = new GPoint(longitude,latitude);
var marker = createMarker(point,"<div style=\"font-
family:Arial,Helvetica,Tahoma;font-size:11px;\" align=\"left
\"><strong>City</strong>:"+ city +" <br><strong>Country</strong>:"+
country +"<br><strong>IP Address</strong>:"+ ii +"<br> </div>")
map.addOverlay(marker);

//alert(marker);

map.setUIToDefault();
}
}

</script>




<script type="text/javascript">

function createMarker(point,html) {
var marker = new GMarker(point);

GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}



it shows the current location

but I also one requirement these are as below

1.
when user enters a city name in the text box i have to show the
proper
location in the map

i also show your code the following url


http://groups.google.com/group/Google-Maps-API/browse_thread/thread/963dc7606c0dae9c#


i also use these code but when i am entering the city name map not set
as per city

Please Help me

Thanks
Govind
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top