Nunca lo he probado, y no se si te conviene hacer las operaciones dentro del select (y por lo tanto en el servidor) o primero una función que llame a los datos, luego otra (adaptada de la mía) que los transforme y una tercera que los envíe.
Pero sea como sea tu idea tiene que ser viable seguro. Cosas mas complicadas se han hecho.
Y se puede usar este código dentro de un select que llama a una tabla con coordenadas utm almacenadas y que las convierta sobre la marcha en coordenadas geográficas?
Lo digo porque tengo una base de datos en donde las coordenadas están como UTM y necesito convertirlas cuando se abre una pagina ASP para mostrarlas en un mapa de google maps.
Se podría entonces hacer algo asi como:
select x, y, transformar(x) as Latitud, transformar(y) as Longitud from Coordenadas
... <script type="text/javascript">
var pi = Math.PI;
function Polygon(lat,lon,lata,lona,sides) {
var me = this;
me.numsides = 120;
me.cent = new PM(lat,lon,'centre','ffff0000');
me.rad = new PM(lata,lona,'outer','ffff0000');
me.setBearDist();
Amigos
Estoy haciendo una pagina con google maps, pero al cargar la pagina no me aparece el mapa, creo que es por la variable que carga la ultima coordenada.
Ayuda por favor.
<?php
include("conectar.php");
$sql = "SELECT MAX(id) FROM coordenada";//Selecciona el id maximo de BD
$consult = mysql_query($sql);
$t = mysql_fetch_array($consult);
$sql = ("SELECT (coord0)FROM coordenada where id='$t[0]'");//Selecciona la ultima coordenada por la condicion de where
$consult1 = mysql_query($sql);
$a = mysql_fetch_array($consult1);
$b=$a[0];
echo $b;
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Prueba Proyecto Umag</title>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=AAY8_ufC3CFXhHIE1NvwkxQtkaG4ibLAp9G2p4zdor5oYl68fg"
type="text/javascript"></script>
<script type="text/javascript">
function initializar() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("proyectoUmag"));
map.setCenter(new GLatLng(<?php echo... Leer más ...
Hola a todos ..... ojalá me puedan ayudar .... al jalar el archivo DWG con el mapper pulso OPEN YOUR OWN DATA FILES .......... ubico el archivo y luego aparece una ventana de titulo SELECT PROJECTION FOR DXF21.tmp......... en la caja PROJECTION elijo UTM. en el cajon ZONE no se que colocar ni en el cajon DATUM .... mi proyecto es de Ayacucho - Perú .... y he probado varios y siempre coloca mi dibujo del DWG en otra zona distinta cuando lo visualizo en el Google earth .... por favor que debo elejir en los caones DATUM y ZONE .... gracias
// USAGE NOTES: Create a new CheckTree() object like so, and pass it its own name.
var checkmenu = new CheckTree('checkmenu');
// You can create several such tree objects, just give each a unique name.
// One optional property: whether to count all checkboxes beneath the current level,
// or just to count the checkboxes immediately beneath the current level (the default).
//checkmenu.countAllLevels = true;
El servicio técnico de GE me ha sugerido lo siguiente:
Thank you for your note. At the present time, Google Earth directly
supports Garmin and Magellan devices that are compatible with GPSBabel.
If you're having trouble importing your data points into Google Earth, you
can try importing by entering the GPSBabel command. To do so, please
follow these steps:
1) Please click on the start button on you screen and select Run.
2) Type in cmd and click OK.
3) You will be taken to the Command Prompt
4) At the command prompt please move to 'C:\Program Files\Google\Google
Earth (Plus or Pro)' to open this folder.
5) Now at the command prompt please type:
gpsbabel -w -r -t -i magellan -f com1 -o kml -F file1.kml
- Replace "magellan" by "garmin" depending on the model of the GPS device
you are using.
-Replace "com1" with "com2" or "usb:" (notice the colon) depending on the
port that your GPS device is connected to.
This should produce the file "file1.kml" that you can import into Google
Earth. This file would be in the: C:\Program Files\Google\Google Earth
(Plus or Pro) folder. Please drag and drop this file1.kml file... Leer más ...