PHP show position on google map php - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

show position on google map php


 294

PHP


3

<!DOCTYPE html>
<html>
<head>
<?php
echo '<script src="https://maps.googleapis.com/maps/api/js"></script>';
echo '<script type="text/javascript">
function initialize() {
var position = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 10,
center: position,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(
document.getElementById("your_map_canvas"),
myOptions);

var marker = new google.maps.Marker({
position: position,
map: map,
title:"Your title"
});

var contentString = "xyz content string";
var infowindow = new google.maps.InfoWindow({
content: contentString
});

google.maps.event.addListener(marker,"click", function() {
infowindow.open(map,marker);
});

}
google.maps.event.addDomListener(window, "load", initialize);
</script>';
?>
</head>
<body>
<div id="your_map_canvas" style="width:600px; height:600px"></div>
</body>
</html>


By     Created   
The power of the user (%)
42%



The most helpful PHP solutions

detect browser phpdetect browser phpPHP

Click to see more ...

  3.7K     387

create QR code phpcreate QR code phpPHP

Click to see more ...

  2.3K     274

delete array item phpdelete array item phpPHP

Click to see more ...

  1.9K     231

create relative date phpcreate relative date phpPHP

Click to see more ...

  1.5K     216

detect ie phpdetect ie phpPHP

Click to see more ...

  1.1K     209

get current url phpget current url phpPHP

Click to see more ...

  723     189

Get real client country using php ?Get real client country using php ?PHP

Click to see more ...

  624     168

get meta tag phpget meta tag phpPHP

Click to see more ...

  549     129

detect speed internet phpdetect speed internet phpPHP

Click to see more ...

  522     106

How can I create an object using php ?How can I create an object using php ?PHP

Click to see more ...

  488     103