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

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




Together We Can Simplify The World
Just a Web Code Solution

show position on google map php


 260

 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>


  
The power of the user (%)
32%



The most helpful PHP solutions

detect browser phpdetect browser phpPHP

Click to see more ...

  2K     366

create QR code phpcreate QR code phpPHP

Click to see more ...

  1.6K     263

create relative date phpcreate relative date phpPHP

Click to see more ...

  1.1K     214

detect ie phpdetect ie phpPHP

Click to see more ...

  652     209

get current url phpget current url phpPHP

Click to see more ...

  516     189

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

Click to see more ...

  421     169

get meta tag phpget meta tag phpPHP

Click to see more ...

  347     129

detect speed internet phpdetect speed internet phpPHP

Click to see more ...

  321     105

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

Click to see more ...

  285     104

How to connect to MySQL database using PHP ?How to connect to MySQL database using PHP ?PHP

Click to see more ...

  150     72