BR
asked on
showing more than one point on Google maps
Dear Experts, I have a code that shows my point on the Google map,
but I want to add my other branches on the map.
How can I do it?
my code is below,
if you have example codes, please share with me..
but I want to add my other branches on the map.
How can I do it?
my code is below,
if you have example codes, please share with me..
<script type="text/javascript">
function initialize() {
var secheltLoc = new google.maps.LatLng(41.060762, 28.989788);
var myMapOptions = {
zoom: 15
,center: secheltLoc
,mapTypeId: google.maps.MapTypeId.ROADMAP
};
var theMap = new google.maps.Map(document.getElementById("map_canvas"), myMapOptions);
var marker = new google.maps.Marker({
map: theMap,
draggable: false,
position: new google.maps.LatLng(41.060762, 28.989788),
visible: true
});
var boxText = document.createElement("div");
boxText.style.cssText = "font-family: Arial; font-size:11px; border: 1px solid grey; margin-top: 8px; background: white; padding: 5px;";
boxText.innerHTML = "my info here";
var myOptions = {
content: boxText
,disableAutoPan: true
,maxWidth: 0
,pixelOffset: new google.maps.Size(-140, 0)
,zIndex: null
,boxStyle: {
background: "url('tipbox.gif') no-repeat"
,opacity: 0.75
,width: "280px"
}
,closeBoxMargin: "10px 2px 2px 2px"
,closeBoxURL: "http://www.google.com/intl/en_us/mapfiles/close.gif"
,infoBoxClearance: new google.maps.Size(1, 1)
,isHidden: false
,pane: "floatPane"
,enableEventPropagation: false
};
google.maps.event.addListener(marker, "click", function (e) {
ib.open(theMap, this);
});
var ib = new InfoBox(myOptions);
ib.open(theMap, marker);
}
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Google has all the code available for doing that thru a MySQL database.
https://developers.google.com/maps/articles/phpsqlsearch_v3
https://developers.google.com/maps/articles/phpsqlsearch_v3
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3350-Using-the-Google-Maps-API-in-PHP.html