ilość wczytywanych markerów z bazy mysql do maps api

2021-04-08 18:04:44 Post #1 guest_boob

 
mam mapkę do której pobieram z bazy pozycje markerów . niestety pokazuje mi tylko max 211 markerów na mapie . czy to są ograniczenia wynikające z google maps czy wina leży w moim kodzie ?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBUt_iwIVfw0Se0VT9pHjR0r-.........PS8&callback=initMap"
type="text/javascript"></script>
<script type="text/javascript">
function mapaD() {
var myLatlng = new google.maps.LatLng(51.4039591, 21.1556446);
var myOptions = {
zoom: 9,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}

var map = new google.maps.Map(document.getElementById("mapaD"), myOptions);
google.maps.event.addListenerOnce(map, 'click', function(event) { placeMarker(event.latLng); });
<?php
include("local.php");
$querymapa = "SELECT*FROM gltorebka";
$querymapa.=" ORDER BY id DESC LIMIT 211 ";//wyświetlenie ilości markerów na mapie, jak zmienię na 215 to nie pokazuje się mapa .

mysql_query('SET character_set_connection=utf-8');
mysql_query('SET character_set_client=utf-8');
mysql_query('SET character_set_results=utf-8');
mysql_query("SET NAMES utf-8");
$resultmapa = mysql_query($querymapa);
$x=0;

while ($row=mysql_fetch_array($resultmapa,MYSQL_NUM)){
$lp=$row[0];
$nazwa1=$row[5];
$nazwa1=str_replace("Åš",'Ś',$nazwa1);
$nazwa1=str_replace("Ä™",'ę',$nazwa1);
$nazwa1=str_replace("ó",'ó',$nazwa1);
$nazwa1=str_replace("Å‚",'ł',$nazwa1);
$x++;
$marker="marker".$x;
echo "var markerLatLng = new google.maps.LatLng($row[62],$row[63]);";
echo "var $marker= new google.maps.Marker({";
echo "position: markerLatLng,";
echo "map: map,";
if($row[64]=="nowe"){
echo"icon: 'icon13.png',";
}else{
echo"icon: 'icon13st.png',";
}
echo "title: \"fyfrrytyy\"";
echo "});";
echo "var contentString$x = '<div id=\"mapka\" style=\"width: 320px; height: 150px;overflow:hidden;\"><table border=\"0\"><tr><td><b>id $row[0]</b></td><td rowspan=\"4\"><img width=\"150px\" src=\"foto/raport$row[0]/thumbs/$row[48]\"/></td></tr><tr><td>$row[60] , $row[61]</td></tr><tr><td>$row[24] mkw</td><tr><td>$row[3],$row[4] $row[5]</td></tr></tr></table></div>';";
echo "var infoWindow$x = new google.maps.InfoWindow({";
echo "content: contentString$x";
echo "});";
echo "google.maps.event.addListener($marker,'mouseover',function(){";
echo "infoWindow$x.open(map,$marker);";
echo "});";
echo "google.maps.event.addListener($marker,'mouseout', function(){";
echo "infoWindow$x.close();";
echo "});";
//uaktywnienie zdarzenia click na markerze
echo "$marker.addListener('click', function() { ";
//echo "map.setZoom(14); map.setCenter($marker.getPosition()); ";
//echo "window.open(\"szczegoly.php?numer=$lp\",\"toolbar=yes, scrollbars=yes, menubar=yes\");";
echo "window.location = \"szczegoly.php?numer=$lp\";";

echo "});";
}
?>
}
</script>
<script type="text/javascript">
var geocoder = new google.maps.Geocoder();
var map;

function geocodePosition(pos) {
geocoder.geocode({
latLng: pos
}, function(responses) {
if (responses && responses.length > 0) {
updateMarkerAddress(responses[0].formatted_address);
} else {
updateMarkerAddress('Cannot determine address at this location.');
}
});
}
function initialize() {
//geocoder = new google.maps.Geocoder();//dodane
var myLatlng = new google.maps.LatLng(51.400, 21.139);
var myOptions = {
zoom: 10,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("mapaD"), myOptions);
google.maps.event.addListenerOnce(map, 'click', function(event) { placeMarker(event.latLng); });


}
</script>
<title>Untitled Document</title>
</head>
<body onload="javascript:mapaD();void(0);">
<div id="mapaD" style="width:1200px; height:600px; border : 1px solid blue;">
</div>
</body>
</html>

Answer

Recently commented

  1. ShoutBox Podświadomość
  2. ShoutBox Trilux
  3. ShoutBox morelowy-dolomit
  4. ShoutBox Lucidoremi
  5. ShoutBox Goran Lezczek
  6. ShoutBox Ktos
  7. Opcje dwuwartościowe... gosc

Latest on forum

  1. Programista/ka PHP, ... Kamil
  2. ilość wczytywanych m... boob
  3. Humor Masłan
  4. Humor Enynsenes
  5. Humor KLOFMDMANELLIGGLOOSK
  6. Humor Goran Lezczek
  7. Zadanie mysql transa... mysqll

Categories

  1. wszystkie wszystkie komentarze all (1)