parametrizacion de procveedor de mapas

This commit is contained in:
humano 2020-04-06 08:35:32 -05:00
parent 6ca2527317
commit a78b786cac
2 changed files with 20 additions and 2 deletions

View File

@ -29,7 +29,13 @@ $background_imagen = buscar_imagen("$_REQUEST[id]","","","$id_empresa");
$plantilla ="mapa";
$categorias = lista_categorias($_REQUEST['id'],'','mapa') ;
$proveedor_mapa = remplacetas('form_parametrizacion','campo',$_REQUEST['id'],'descripcion'," tabla='form_id' and opcion = 'proveedor_mapa'") ;;
if($proveedor_mapa[0] !=""){
$proveedor ="'$proveedor_mapa[0]'";
}else{
$proveedor = "'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'";
}
$buscador ="
<form action='?id='$_REQUEST[id]' method='get'>
@ -218,7 +224,10 @@ $ids = json_decode($otro_json[0]);
// standard leaflet map setup ??
var map = L.map('map');
// map.setView([51.2, 7], 9);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
// L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
//L.tileLayer.provider('Stamen.Watercolor').addTo(map);
L.tileLayer(<?php echo $proveedor; ?>, {
maxZoom: 19,
attribution: "Map data &copy; OpenStreetMap contributors <a href='https://tupale.co'>Powered by Tupale.co</a>"
}).addTo(map);

View File

@ -29,7 +29,13 @@ $background_imagen = buscar_imagen("$_REQUEST[id]","","","$id_empresa");
$plantilla ="mapa";
$categorias = lista_categorias($_REQUEST['id'],'','mapa') ;
$proveedor_mapa = remplacetas('form_parametrizacion','campo',$_REQUEST['id'],'descripcion'," tabla='form_id' and opcion = 'proveedor_mapa'") ;;
if($proveedor_mapa[0] !=""){
$proveedor ="'$proveedor_mapa[0]'";
}else{
$proveedor = "'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'";
}
$buscador ="
<form action='?id='$_REQUEST[id]' method='get'>
@ -218,7 +224,10 @@ $ids = json_decode($otro_json[0]);
// standard leaflet map setup ??
var map = L.map('map');
// map.setView([51.2, 7], 9);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
// L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
//L.tileLayer.provider('Stamen.Watercolor').addTo(map);
L.tileLayer(<?php echo $proveedor; ?>, {
maxZoom: 19,
attribution: "Map data &copy; OpenStreetMap contributors <a href='https://tupale.co'>Powered by Tupale.co</a>"
}).addTo(map);