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


 263

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 (%)
35%



The most helpful PHP solutions

detect browser phpdetect browser phpPHP

Click to see more ...

  3.1K     382

create QR code phpcreate QR code phpPHP

Click to see more ...

  2.1K     273

delete array item phpdelete array item phpPHP

Click to see more ...

  1.7K     227

create relative date phpcreate relative date phpPHP

Click to see more ...

  1.3K     215

detect ie phpdetect ie phpPHP

Click to see more ...

  1K     209

get current url phpget current url phpPHP

Click to see more ...

  608     188

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

Click to see more ...

  511     168

get meta tag phpget meta tag phpPHP

Click to see more ...

  429     128

detect speed internet phpdetect speed internet phpPHP

Click to see more ...

  405     106

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

Click to see more ...

  369     103