Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Inicia_Carga()
- {
- Carrega_Equipamentos(100, 0);
- }
- function Carrega_Equipamentos(Quantidade, Pagina)
- {
- $.ajax({
- type: "GET",
- url: "<?php $Pivos_ANA?>",
- dataType: "json",
- success: function(){
- // Criação dos pivôs ANA
- var Pivos_ANA_<?=$Pivos_ANA['ID']?> = new google.maps.Polygon({
- path: Path,
- position: new google.maps.LatLng(<?=$Pivos_ANA['latitude']?>,<?=$Pivos_ANA['longitude']?>,<?=$Pivos_ANA['raio']?>),
- draggable: false,
- map: Mapa,
- fillColor: '#A9A9A9',
- fillOpacity: 0.5,
- strokeColor: '#A9A9A9',
- strokeOpacity: 0.9,
- strokeWeight: 2,
- clickable: false,
- editable: false,
- draggable: false,
- zIndex: 1});
- Map_Pivos_ANA[<?=$Pivos_ANA['ID']?>] = Pivos_ANA_<?=$Pivos_ANA['ID']?>;
- }
- });
- var Quantidade = <?=$Pivos_ANA?>.length;
- if (Quantidade < Mapa_Pivos_ANA){
- Carrega_Equipamentos();
- }
- // Aguarda 5 segundos e executa novamente a função
- setTimeout(function () { Carrega_Equipamentos(Quantidade, Pagina+1) }, 5000);
- }
Add Comment
Please, Sign In to add comment