Acceso a google maps

1,454 views
Skip to first unread message

hquinones

unread,
Aug 5, 2012, 8:58:48 AM8/5/12
to publice...@googlegroups.com
Siempre tuve acceso a google maps, con ello poddi ver las direcciones de mis clientes, pero ahora me sale un mensaje como que no estoy autorizado. Utilizo este código src="http://maps.google.com/maps?file=api&v=2&key=123"
Podrían indicarme otro código como se puede acceder ahora a google maps.
Gracias.

rudolf heiner

unread,
Aug 5, 2012, 10:19:04 AM8/5/12
to publice...@googlegroups.com
*---------------------------------------------------------------------------
* Titulo del Sistema: Sys_Dental v.2012.1.0
* Programa: BusquedaGoogle.Prg
* Modulo: Busqueda en Google
* Programadores: Rudolf-Johann Heiner
*   País: Alemania
* Fecha de Creacion: 14/03/2012
* Fecha de Actualizacion: 14/03/2012
*---------------------------------------------------------------------------

Lparameters MiAddress
Public oMiForm
oMiForm = Createobject("MiForm", MiAddress)
oMiForm.Show

Define Class MiForm As Form
  Height = 560
  Width = 625
  AutoCenter = .T.
  Caption = "Busqueda en Google Maps"
  Name = "MiForm"
  SetPoint = ""
  SetDecimals = 2
  ShowWindow = 2
  TitleBar = 0
  BorderStyle = 2
  Closable = .F.
  MaxButton = .F.
  MinButton = .F.
  Icon = _SysIcono

  Add Object Descrip As TextBox With ;
    HEIGHT = 24, Left = 12, Top = 12, Width = 330, ;
    STYLE = 0, Name = "Descrip", SelectOnEntry = .T., Enabled = .T.

  Add Object cmdMostrar As CommandButton With ;
    TOP = 10, Left = 350, Height = 27, Width = 100, ;
    CAPTION = "Mostrar mapa", Name = "cmdMostrar"

  Add Object cmdCerrar As CommandButton With ;
    TOP = 10, Left = 573, Height = 27, Width = 40, ;
    CAPTION = "Salir", Name = "cmdCerrar"

  Add Object oleIE As OleControl With ;
    TOP = 48, Left = 12, Height = 500, Width = 600, ;
    NAME = "oleIE", OleClass = "Shell.Explorer.2"

  Procedure Load
    Sys(2333,1)
    This.SetPoint = Set("Point")
    This.SetDecimals = Set("Decimals")
    Set Point To .
    Set Decimals To 8
    Set Safety Off
    Declare Integer ReleaseCapture In WIN32API
    Declare Integer SendMessage In WIN32API Integer, Integer, Integer, Integer
  Endproc

  Procedure Init(MiAddress)
    If Type('miaddress')<>'C'
      This.Descrip.Value=''
    Else
      This.Descrip.Value=miaddress
      Thisform.cmdMostrar.Click()
    Endif
  Endproc

  Procedure MouseDown
    Lparameters nButton, nShift, nXCoord, nYCoord
    Local lnHandle
    If nButton = 1
      ReleaseCapture()
      SendMessage(This.HWnd, 0x112, 0xF012,0)
    Endif
  Endproc

  Procedure cmdCerrar.Click
    Set Point To (Thisform.SetPoint)
    Set Decimals To (Thisform.SetDecimals)
    Thisform.Release
  Endproc

  Procedure cmdMostrar.Click
    If Empty(Alltrim(Thisform.Descrip.Value ))
      Thisform.Descrip.SetFocus()
      Return
    Else
      *
        "key=ABQIAAAAtOjLpIVcO8im8KJFR8pcMhQjskl1-YgiA" + ;
        "_BGX2yRrf7htVrbmBTWZt39_v1rJ4xxwZZCEomegYBo1w" 
TEXT TO lcHtml NOSHOW TEXTMERGE
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Busqueda en Google Maps</title>
    <script src="<<lcClave>>"
    type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    var map = null
    var geocoder = null
    var address = "<<Strtran(ALLTRIM(ThisForm.Descrip.Value),'ñ','n',1,10,1)>>"

    function load()
    { if (GBrowserIsCompatible())
      { map = new GMap2(document.getElementById("map"),'G_SATELLITE_MAP');
        map.addControl(new GLargeMapControl());
        map.addControl (new GMapTypeControl());
        map.addControl(new GOverviewMapControl());

        geocoder = new GClientGeocoder();
        if (geocoder) {
            geocoder.getLatLng(address,
          function(point)
          { if (!point)
            { alert("No Encontrado");
             }
          else
            { map.setCenter(point, 20);
            map.setMapType(G_NORMAL_MAP);
            var marker = new GMarker(point);
            map.addOverlay(marker);
            }
          }
         );
       }
      }
    }
    //]]>
    </script>
  </head>
  <body  scroll="no" bgcolor="#CCCCCC" topmargin="0" leftmargin="0" onload="load()" onunload="GUnload()">
  <div id="map" style="width: 600px; height: 500px"></div>
  </body>
</html>
ENDTEXT
      *
    STRTOFILE(lcHtml,"MiHtml.htm")
    THISFORM.oleIE.Navigate2(FULLPATH("MiHtml.htm"))
    Endif
  Endproc
Enddefine

edgar suarez kummers

unread,
Aug 5, 2012, 10:27:38 AM8/5/12
to publice...@googlegroups.com
Buenas Rudolph:

Mira lo que me sale ... apenas colocando como programa nuevo y RUN.

oMiForm.Show
  .... dice que no es un objeto
Icon = _SysIcono  .... dice que falta el ícono




2012/8/5 rudolf heiner <rudolf...@hotmail.com>

--
 
 
 



--

edgar suarez kummers

Rudolf Johann Heiner

unread,
Aug 5, 2012, 10:32:35 AM8/5/12
to publice...@googlegroups.com
hola,
ya le quite el icono,
y ahora graba este programa con un nombre yo le di por nombre BusquedaGoogle.prg,
y cuando lo invoques pasale como parametro la direccion ok,
saludos,
rudolf heiner.
 
   
*---------------------------------------------------------------------------
--
 
 
 

Daniel Sánchez

unread,
Aug 5, 2012, 11:38:32 AM8/5/12
to publice...@googlegroups.com
Lo que siempre me pareció interesante es poder colocar los globos indicadores en el mapa para poder indicar la ubicación de los clientes en el mapa pudiendo poner información tal vez de una ruta de entrega del día, hay tantas posibilidades para algo así, si alguien tiene un ejemplo al respecto seria interesante que lo comparta.

Saludos

--
Daniel Sánchez Escobar
Investigación y Desarrollo
Reset Software & Sistemas
Móvil +051-949398047
Trujillo - Perú

edgar suarez kummers

unread,
Aug 5, 2012, 12:02:21 PM8/5/12
to publice...@googlegroups.com
Buenas Rolf:

Muy bien te ha quedado, apenas pomer un * (asterisco) antes de Alemania y listos, funciona muy bien.

Felicitaciones

edgar

--
 
 
 

Rudolf Johann Heiner

unread,
Aug 5, 2012, 12:12:40 PM8/5/12
to publice...@googlegroups.com
saludos edgar,
dime tu sabes como poner una clase en codigo,
osea con puro codigo,
yo he posteado un hilo llamado implementar una clase en codigo,
pero nadie responde,
sera que me puedas ayudar,
saludos,
rudolf heiner.
--
 
 
 

edgar suarez kummers

unread,
Aug 5, 2012, 12:29:02 PM8/5/12
to publice...@googlegroups.com
Estimado Rolf:

Jetzt habe das ich gefunden und es ist wirklich leicht.

Mira, abres VFP9.0
Tools
Class Browser
Cuando aparezca CLASS BROWSER
abres la cajita de OPEN
y vas a 
archivos de programa
microsoft visual foxpro 9
samples
classes
y haces click en por ejemplo:
buttons.vcx
en la caja grande CLASS BROWSER
arriba hay unos iconos
uno de ellos tiene una dlechita para arriba y dos maletitas pequeñas
haces click allí y
te aparece un programa llamado
viewcode.prg

que es lo que tú buscas

saludos

edgar

Rudolf Johann Heiner

unread,
Aug 5, 2012, 12:51:58 PM8/5/12
to publice...@googlegroups.com
hola edgar,
ya le agregue la clase skinvfp,
el codigo queda asi(mas abajo):
pero falta algo para que se llame en la clase del form?
no se mucho de esto?
me podras ayudar,
saludos
rudolf heiner.
 
PROCEDURE _MSGBOX
parameter pText,pnDBT,pCapt,cPar1,cPar2,cPar3
***_____PROLOG_____***
MemWidth=set('memowidth')
set memowidth to 255
set topic ID to 9999    && your choice
if empty(pText) .or. NOT type('pText')='C'
  pText='MicroSoft Visual FoxPro'    &&your choice; additional to MessageBox
endif 
if empty(pnDBT) .or. NOT type('pnDBT')='N'
  if type('pnDBT')='C'    &&if passed only 2 char-parameters;  additional to MessageBox
    pCapt=pnDBT
  endif
  pnDBT=0
endif
if empty(pCapt) .or. NOT type('pCapt')='C'
  pCapt='OPTIMA'    &&your choice;  additional to MessageBox
endif   
 
***_____DEF Command array_____*** slovenian; your choice
dimension CmdArr(7)   
CmdArr(1)="\<Ok"            &&\<OK
CmdArr(2)="\<Cancelar"        &&\<Cancel
CmdArr(3)="\<Abortar"        &&\<Abort
CmdArr(4)="\<Intentar"        &&\<Retry
CmdArr(5)="\<Ignorar"        &&\<Ignore
CmdArr(6)="\<Si"            &&\<Yes
CmdArr(7)="\<No"            &&\<No
 
***_____DEF SetFocus & Pictures_____***
for nSetFocus=3 to 2 step -1
  if pnDBT>=256*(nSetFocus-1)
    pnDBT=pnDBT-256*(nSetFocus-1)
    exit
  endif
endfor
for nPict=64 to 0 step -16
  if pnDBT>=nPict
    pnDBT=pnDBT-nPict
    exit
  endif
endfor
***_____Wrong DBT_____***
if NOT inlist(pnDBT,0,1,2,3,4,5)
    pnDBT=0
    pCapt="Error DialogBoxType"            &&your choice
    pText='MicroSoft Visual FoxPro'    &&your choice
    nPict=-1
endif
 
***_____DEF Button Captions array_____***
dimension CaptArr(3)
CaptArr=""
 
***_____DEF Caption Replacement (optional)
=acopy(CmdArr,CmdArr2)
lPar1=NOT empty(cpar1) .and. type("cPar1")="C"
lPar2=NOT empty(cpar2) .and. type("cPar2")="C"
lPar3=NOT empty(cpar3) .and. type("cPar3")="C"
do case
case pnDBT+1=1
    store iif(lPar1,cPar1,CmdArr2(1)) to CmdArr(1),CaptArr(1)    &&OK
    CmdGCount=1
case pnDBT+1=2
    store iif(lPar1,cPar1,CmdArr2(1)) to CmdArr(1),CaptArr(1)    &&OK
    store iif(lPar2,cPar2,CmdArr2(2)) to CmdArr(2),CaptArr(2)    &&Cancel
    CmdGCount=2
case pnDBT+1=3
    store iif(lPar1,cPar1,CmdArr2(3)) to CmdArr(3),CaptArr(1)    &&Abort
    store iif(lPar2,cPar2,CmdArr2(4)) to CmdArr(4),CaptArr(2)    &&Retry
    store iif(lPar3,cPar3,CmdArr2(5)) to CmdArr(5),CaptArr(3)    &&Ignore
    CmdGCount=3
case pnDBT+1=4
    store iif(lPar1,cPar1,CmdArr2(6)) to CmdArr(6),CaptArr(1)    &&Yes   
    store iif(lPar2,cPar2,CmdArr2(7)) to CmdArr(7),CaptArr(2)    &&No
    store iif(lPar3,cPar3,CmdArr2(2)) to CmdArr(2),CaptArr(3)    &&Cancel
    CmdGCount=3
case pnDBT+1=5
    store iif(lPar1,cPar1,CmdArr2(6)) to CmdArr(6),CaptArr(1)    &&Yes   
    store iif(lPar2,cPar2,CmdArr2(7)) to CmdArr(7),CaptArr(2)    &&No
    CmdGCount=2
case pnDBT+1=6
    store iif(lPar1,cPar1,CmdArr2(4)) to CmdArr(4),CaptArr(1)    &&Retry
    store iif(lPar2,cPar2,CmdArr2(2)) to CmdArr(2),CaptArr(2)    &&Cancel
    CmdGCount=2
endcase
 
***_____DEF Text_____***    Attention: Look for default Windows Font!!!
store 0 to nWidth,nRows
cFntName    ='Arial'
nFntSize    =8
cMaxTxt        =_GetSubText(pText,@nWidth,@nRows,chr(13))    &&&UDF giving nWidth and nRows
nTxtWidth    =nWidth
nTxtRows    =nRows
nCaptWidth    =TXTWIDTH(pCapt, cFntName, nFntSize+2)*FONTMETRIC(6,cFntName,nFntSize+2)+10
nTxtHeight    =FONTMETRIC(1 , cFntName, nFntSize)*nTxtRows    &&netto Height
nTxtLeft      =55
 
***_____DEF Icons & Wav_____*** All Bells and Picts your choice
lPictVis=.T.
do case
case nPict=64
  set bell to 'ding.wav',0
  cPict=_SysIconosXp+'inf_xp.bmp' &&Information
case nPict=48
  set bell to 'chord.wav',0
  cPict=_SysIconosXp+'excl_xp.bmp' &&Exclamation
case nPict=32
  set bell to 'chimes.wav',0
  cPict=_SysIconosXp+'quest_xp.bmp' &&Question
case nPict=16
  set bell to 'critical.wav',0
  cPict=_SysIconosXp+'stop_xp.bmp' &&Stop
case nPict=0
  set bell to 'ding.wav',0
  cPict=_SysIconosXp+' '
  lPictVis=.F.
  nTxtLeft=15    &&Without Picture
otherwise    && only if sent wrong DBT
  set bell to 'CallRing.wav',0
  cPict=_SysIconosXp+'appwiz.ico'
endcase
??chr(7)
set bell to
 
***_____CleanUp_____***
nSetFocus     =min(CmdGCount,nSetFocus)
nButtWidth     =75
nButtHeight     =26 &&=Default Value
CmdgWidth      =nButtWidth*CmdgCount+6*(CmdGCount-1)
nFormWidth   =nTxtLeft+nTxtWidth+20
MsgFormWidth =max(nFormWidth,CmdgWidth+20,nCaptWidth+30)
nCmdGTop     =15+nTxtHeight+25
MsgFormHeight=nCmdGTop+nButtHeight+13
 
***_____MAIN PROGRAM_____***
RetValue=0
FrmMsgBox = CREATEOBJECT('MsgBox')
keyboard replicate('{TAB}',nSetFocus-1)
*FrmMsgBox.Butt(nSetFocus).SetFocus &&ValidEvent in calling procedure generates Error
FrmMsgBox.Show(1)
 
***_____EPILOGUE__________***
set memowidth to MemWidth
return RetValue                                   
 
***_____CLASSES_____*
DEFINE CLASS skinvfp AS olecontrol
    Height = 35
    Width = 37
   
    *-- Ubicación del skin para el formulario
    fileskin = "C:\Sys_Dental\skinvfp\jade2.skn"
    Name = "skinvfp"
 
    PROCEDURE Init
        WITH this
            .loadSkin(.fileskin)
            .applySkin(thisform.HWnd)
        ENDWITH
    ENDPROC
ENDDEFINE
 
DEFINE CLASS MsgBox AS FORM
  DIMENSION Butt[3]
  ScaleMode  = 3 &&Pixels
  ShowWindow = 1 &&In Top-Level Form
  BorderStyle= 2 &&Fixed Dialog
  Closable   = .F.
  ControlBox = .F.
  MaxButton  = .F.
  MinButton  = .F.
  AlWaysOnTop= .T.
  DeskTop     = .T.
  BackColor  = RGB(199,216,237)    &&your choice
  Name       = 'ICMSGBOX'        &&your choice
  Picture     = _SysIconosXp+'FondoV2010(1).png'
 
  ADD OBJECT Butt[1] AS CommandButton WITH Height = nButtHeight, Width  = nButtWidth
  ADD OBJECT Butt[2] AS CommandButton WITH Height = nButtHeight, Width  = nButtWidth
  ADD OBJECT Butt[3] AS CommandButton WITH Height = nButtHeight, Width  = nButtWidth
  ADD OBJECT Pic AS Image with Left=15, Top=10, Width=32, Height=32, BackStyle=0
  ADD OBJECT Txt AS EditBox with Enabled=.F., Top=15, BorderStyle=0, ScrollBars=0, ;
    FontSize=nFntSize, FontName=cFntName, DisabledForeColor=RGB(0,0,0), ;
    DisabledBackColor=RGB(192,192,192),BackStyle=0
 
  PROCEDURE Init &&ThisForm.Init
     WITH ThisForm                                &&DEF Form
      .Width          = MsgFormWidth
      .Height         = MsgFormHeight
      .Caption        = pCapt
      .AutoCenter    =.T.
      .AlwaysOnTop    =.T.
    ENDWITH
    WITH ThisForm.Txt                        &&DEF Txt
      .Value     = pText
      .Left      = nTxtLeft
      .Width     = nTxtWidth+20
      .Height    = nTxtHeight+10
    ENDWITH
    WITH ThisForm.Pic                        &&DEF Pic
      .Picture    =cPict
      .Visible    =lPictVis
    ENDWITH
    CmdGLeft=(ThisForm.Width-CmdGWidth)/2        &&DEF CmdG
    for i=1 to 3
      WITH ThisForm.Butt(i)
        .Caption = CaptArr(i)
        .Top     = nCmdGTop 
        .Left    = CmdGLeft+75*(i-1)+6*(i-1)
        .Visible = iif(CmdGCount<i,.F.,.T.)
      ENDWITH
    endfor
  ENDPROC &&ThisForm.Init
 
  PROCEDURE Butt.CLICK
    PARAMETER pIndex
    cSearch    =ThisForm.Butt(pIndex).Caption
    RetValue=ascan('CmdArr',cSearch)
    ThisForm.Release
  ENDPROC
ENDDEFINE

edgar suarez kummers

unread,
Aug 5, 2012, 1:04:22 PM8/5/12
to publice...@googlegroups.com
Estimado Rolf:

Pero, una pregunta:

Este no es el programa de la búsqueda de Google Maps,

porque se aprecia que le falta la dirección web "http:// ...."

El código que envías corre sin producir signo alguno,

de tal forma que debe de estar bien.

También te confieso que me faltan conocimientos del

vfp9.0, aunque hago código que funciona bien me toma

mucho tiempo y estudio.

Espero que el mensaje lo lean algunos de los "gurús"

del grupo y te den una mejor LUZ que yo.

saludos

edgar

2012/8/5 Rudolf Johann Heiner <rudolf...@hotmail.com>

--
 
 
 

Rudolf Johann Heiner

unread,
Aug 5, 2012, 1:12:22 PM8/5/12
to publice...@googlegroups.com
gracias edgar,
ya estoy logrando algo pero no funciona,
jajajajaja,
ya vere ok listo,
gracias de todos modos,
rudolf heiner.

hquinones

unread,
Aug 5, 2012, 9:18:26 PM8/5/12
to publice...@googlegroups.com
Gracias rudolf, resulto.
HQD

hquinones

unread,
Aug 5, 2012, 9:20:01 PM8/5/12
to publice...@googlegroups.com
Gracias Rudolf, resulto.
HQD

elkin dario uribe torres

unread,
Aug 6, 2012, 8:27:52 AM8/6/12
to publice...@googlegroups.com
Buenos dias Daniel

Para colocar los globos solo pasale las coordenadas por medio de una tabla (utiliza el ejemplo de Luis Maria y el de Jose Blasco) en la Funcion Initialize utiliza esta instruccion:

function initialize() {
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new"
}
}
map = new GMap2(document.getElementById("map_canvas"), mapOptions);
map.setCenter(new GLatLng(6.33889,-75.56222), 16);
geocoder = new GClientGeocoder();
map.setMapType(G_NORMAL_MAP);
map.setUIToDefault();
map.enableGoogleBar();
map.openInfoWindow(map.getCenter(),
document.createTextNode("Municipio De Bello"));
// Add 10 markers to the map at random locations
map.enableRotation();

GEvent.addListener(map, "click", getAddress);
geocoder = new GClientGeocoder();

map.addControl(new GMapTypeControl());
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();

for (var i = 0; i < 10; i++) {
var latlng = new GLatLng(southWest.lat() + latSpan * Math.random(),
southWest.lng() + lngSpan * Math.random());
map.addOverlay(new GMarker(latlng));
}
}
}

Para que tengas en cuenta que en el for, no utilizarias la variable random sino las coordenadas guardadas en tu base de datos, si mal no recuerdo la longitud y la latitud tiene como 6 decimales, solo deberias mover el ultimo decimal, ya que si mueves (aumentas o disminuyes) de a 2 las distancias serian muy grandes y no se alcanzarian a visualizar.

Te adjunto un formulario de ejemplo y con el te daras cuenta que solo es meterte  a la pagina del API de Google y veras cosas interesantes al igual que a la de Argis.  Recuerda cambiarle la extension, espero que lo mejores un monton como sueles hacerlo con todo y me comentes.

Saludos

Elkin Uribe

El 5 de agosto de 2012 10:38, Daniel Sánchez <resets...@gmail.com> escribió:

--
 
 
 

Ver Mapas.rar1

elkin dario uribe torres

unread,
Aug 8, 2012, 4:13:09 PM8/8/12
to publice...@googlegroups.com
Buenas tardes

La forma en que estoy llenando el mapa con los globos es leer un archivo txt que contiene las coordenadas, segun la imagen adjunta.  Solo deberias cambiar la funcion initialize por esta

function initialize() {
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new"
}
}
map = new GMap2(document.getElementById("map_canvas"), mapOptions);
map.setCenter(new GLatLng(6.34747558,-75.55807571), 16);
geocoder = new GClientGeocoder();
map.setMapType(G_NORMAL_MAP);
map.setUIToDefault();
map.enableGoogleBar();
//Adiciona marcas en el mapa pasados por medio de un archivo con las coordenadas
map.enableRotation();

GEvent.addListener(map, "click", getAddress);
geocoder = new GClientGeocoder();

map.addControl(new GMapTypeControl());
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
$archivo= ['C:\\VNOMINA\\predios2.txt'];
var linea;
var linea1;
var linea2;
var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject");
var myInputTextStream = myFileSysObj.OpenTextFile($archivo, 1, true);

while (!myInputTextStream.AtEndOfStream) {
linea = myInputTextStream.ReadLine();//Tratamiento personalizado para cada variable de salida
linea1 = linea.split(';');
linea2 = linea.split(',');

var latlng = new GLatLng((linea2[1]-0),(linea1[1]-0));

map.addOverlay(new GMarker(latlng),showAddress);
}
myInputTextStream.Close();
}
}


Saludos


Elkin Uribe
Mapa_Marcadores.jpg

eduribe2000

unread,
Aug 13, 2012, 9:10:20 AM8/13/12
to publice...@googlegroups.com
Buenos dias

Siguiendo con mi monologo (espero no enfadar a nadie), para que podamos colocar globos de diferentes colores cambiaremos la funcion initialize por esta, en este caso serian dos colores pero podriamos manejar los que queramos inclusive en la pagina se encuentra los mismos marcadores en 5 colores y los hay sin numero o con numero (1..99).

function initialize() {
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new"
}
}
map = new GMap2(document.getElementById("map_canvas"), mapOptions);
map.setCenter(new GLatLng(6.34747558,-75.55807571), 16);
geocoder = new GClientGeocoder();
map.setMapType(G_NORMAL_MAP);
map.setUIToDefault();
map.enableGoogleBar();

var blueIcon = new GIcon(G_DEFAULT_ICON);

var redIcon = new GIcon(G_DEFAULT_ICON);

markerOptions = { icon:blueIcon };


//Adiciona marcas en el mapa pasados por medio de un archivo con las coordenadas
map.enableRotation();

GEvent.addListener(map, "click", getAddress);
geocoder = new GClientGeocoder();

map.addControl(new GMapTypeControl());
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
$archivo= ['C:\\VNOMINA\\predios3.txt'];
var linea;
var linea1;
var linea2;
var linea3;
var linea4;
var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject");
var myInputTextStream = myFileSysObj.OpenTextFile($archivo, 1, true);

while (!myInputTextStream.AtEndOfStream) {
linea = myInputTextStream.ReadLine();//Tratamiento personalizado para cada variable de salida
linea1 = linea.split(';');
linea2 = linea.split(',');
linea3 = linea.split('*');
linea4 = linea.split('"');

var latlng = new GLatLng((linea2[1]-0),(linea1[1]-0));


if (linea4[1] > 1) {
map.addOverlay(new GMarker(latlng,{
icon: blueIcon ,
title: linea3[1]}));
} else {
//alert(linea4[1]);
map.addOverlay(new GMarker(latlng,{
icon: redIcon ,
title: linea3[1]}));
}

}
myInputTextStream.Close();
}
}

En la imagen adjunta lo pueden visualizar mejor.


Saludos


Elkin Uribe
mapa 3.png

Rudolf Johann Heiner

unread,
Aug 13, 2012, 10:46:25 AM8/13/12
to publice...@googlegroups.com
saludos eduribe,
tu crees que podrias mandar el codigo completo,
te lo agradeceria mucho,
saludos,
rudolf heiner.
 
Sent: Monday, August 13, 2012 3:10 PM
Subject: Re: [vfp] Re: Acceso a google maps
 
--
 
 
 

elkin dario uribe torres

unread,
Aug 13, 2012, 11:16:23 AM8/13/12
to publice...@googlegroups.com
Buenos dias Rudolf.

El codigo completo lo envie como 3 mensajes mas arriba, solo deberias cambiar la funcion initialize que se encuentra en el commanbuton "mostrar mapa" por el que adjunte y listo.


Saludos


Elkin Uribe

--
 
 
 

Rudolf Johann Heiner

unread,
Aug 13, 2012, 11:24:51 AM8/13/12
to publice...@googlegroups.com
saludos elkin,
mira este es el codigo pero me bota error que hay un control avtivex que no puede incluir,
si me puedes dar una mano porfavor te lo agradecere mucho,
saludos y quedo de ti,
rudolf heiner.
 
    "key=ABQIAAAAtOjLpIVcO8im8KJFR8pcMhQjskl1-YgiA" + ;
    "_BGX2yRrf7htVrbmBTWZt39_v1rJ4xxwZZCEomegYBo1w"
 
TEXT TO lcHtml NOSHOW TEXTMERGE
    <html>
        <head>
            type="text/javascript"></script>
 
 
            <script type="text/javascript">
 
                var map = null;
                var geocoder = null;
                var myHtml1 = null;
                var address;
                function autoRotate() {
                    // Determine if we're showing aerial imagery
                    if (map_canvas.isRotatable()) {
                        setTimeout('map.changeHeading(90)', 3000);
                        setTimeout('map.changeHeading(180)',6000);
                        setTimeout('map.changeHeading(270)',9000);
                        setTimeout('map.changeHeading(0)',12000);
                    }
                }
 
                function animate() {   
                    map_canvas.panTo(new GLatLng(6.33889,-75.56222));
                }
      
                function getAddress(overlay, latlng) {
                    if (latlng != null) {
                        address = latlng;
                        geocoder.getLocations(latlng, showAddress);
                    }
                }
     
                function showAddress(response) {
                    map.clearOverlays();
                    if (!response || response.Status.code != 200) {
                        alert("Status Code:" + response.Status.code);
                    } else {
                        place = response.Placemark[0];
                        point = new GLatLng(place.Point.coordinates[1],
                        place.Point.coordinates[0]);
                        marker = new GMarker(point);
                        map.addOverlay(marker);
                        marker.openInfoWindowHtml(
                        '<b>origen latlng:</b>' + response.name + '<br/>' +
                        '<b>latlng:</b>' + place.Point.coordinates[1] + "," + place.Point.coordinates[0] + '<br>' +
                        '<b>Estado Codigo:</b>' + response.Status.code + '<br>' +
                        '<b>Solicitud:</b>' + response.Status.request + '<br>' +
                        '<b>Direccion:</b>' + place.address + '<br>' +
                        '<b>Precision:</b>' + place.AddressDetails.Accuracy + '<br>' +
                        '<b>Pais:</b> ' + place.AddressDetails.Country.CountryNameCode);
                    }
                } 
            </script>
        </head>
        <body onload="initialize()" onunload="GUnload()">
            <div id="map_canvas" style="width: 100%; height: 100%;"></div>
 
            <form action="#" onsubmit="animate(); return false">
                <p>
                    <input type="submit" value="Move!" />
                </p>
            </form>
 
 
        </body>   
ENDTEXT

elkin dario uribe torres

unread,
Aug 13, 2012, 11:38:47 AM8/13/12
to publice...@googlegroups.com
Hola Rudolf

Al codigo que me enviaste le falta la parte de la function initialize, y se te fijas en la esta parte del codigo invocas a esta funcion:

  <body onload="initialize()" onunload="GUnload()">

por lo tanto te marca un error de que espera un objeto y te dice en que linea y en que columna (56, 1), te coloco el codigo para que lo copies y lo pegues y ya no deberia mostrar errores.


    "key=ABQIAAAAtOjLpIVcO8im8KJFR8pcMhQjskl1-YgiA" + ;
    "_BGX2yRrf7htVrbmBTWZt39_v1rJ4xxwZZCEomegYBo1w"
 
TEXT TO lcHtml NOSHOW TEXTMERGE
    <html>
        <head>
            type="text/javascript"></script>
 
 
            <script type="text/javascript">
 
                var map = null;
                var geocoder = null;
                var myHtml1 = null;
                var address;
 
  function initialize() {
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new"
}
}
map = new GMap2(document.getElementById("map_canvas"), mapOptions);
map.setCenter(new GLatLng(6.33889,-75.56222), 16);
geocoder = new GClientGeocoder();
map.setMapType(G_NORMAL_MAP);
map.setUIToDefault();
map.enableGoogleBar();
map.openInfoWindow(map.getCenter(),
document.createTextNode("Municipio De Bello"));
// Add 10 markers to the map at random locations
map.enableRotation();

GEvent.addListener(map, "click", getAddress);
geocoder = new GClientGeocoder();

map.addControl(new GMapTypeControl());
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();

for (var i = 0; i < 10; i++) {
var latlng = new GLatLng(southWest.lat() + latSpan * Math.random(),
southWest.lng() + lngSpan * Math.random());
map.addOverlay(new GMarker(latlng));
}
}
}

 
Saludos


Elkin Uribe


2012/8/13 Rudolf Johann Heiner <rudolf...@hotmail.com>
--
 
 
 

Rudolf Johann Heiner

unread,
Aug 13, 2012, 11:44:24 AM8/13/12
to publice...@googlegroups.com
gracias elkin,
ya esta,
saludos,
rudolf heiner.
 
Sent: Monday, August 13, 2012 5:38 PM
Subject: Re: [vfp] Re: Acceso a google maps
 
--
 
 
 

Rudolf Johann Heiner

unread,
Aug 13, 2012, 12:02:54 PM8/13/12
to publice...@googlegroups.com
Hola elkin ya cambien el la funcion initialize() por el que has enviado,
esta botando error,
parece que el archivo: $archivo= ['C:\\VNOMINA\\predios3.txt']; no existe,
que podria hacer,
no se la verdad pero no se ejecuta l codigo bota error ahi,
saludos y quedo de ti,
rudolf heiner.
 
 

sej...@gmail.com

unread,
Aug 13, 2012, 2:33:22 PM8/13/12
to publice...@googlegroups.com
Impactante aporte, muchas gracias, lo único que me quedaría entender es la estructura del archivo txt donde están las coordenadas y el color de los globos.

Nuevamente gracias, que aporte.


JOSÉ LUIS
Saludos

José Luis

From: elkin dario uribe torres <eduri...@gmail.com>
Date: Mon, 13 Aug 2012 10:38:47 -0500
Subject: Re: [vfp] Re: Acceso a google maps

--
 
 
 

elkin dario uribe torres

unread,
Aug 13, 2012, 3:19:59 PM8/13/12
to publice...@googlegroups.com
Buenas tardes

Disculpa la demora en la respuesta pero es que ando con unos inconvenientes, haber el archivo al que hace mencion es un archivo texto con las coordenadas geograficas (Latitud, longitud), el codigo de la ficha (informacion que al colocar el mouse sobre el se despliega) y el color del globo que se pintara o mostrara.  Te adjunto el archivo TXT, le puedes agregar una leyenda para que se muestre ya eso te lo dejo a tu imaginacion.

Con estos principios tu puedes utilizarlo para saber donde estan ubicados tus clientes, los que se encuentran en mora, pendientes de pedidos, etc. y podria servir para trazar rutas.

Saludos


Elkin Uribe

2012/8/13 Rudolf Johann Heiner <rudolf...@hotmail.com>
Hola elkin ya cambien el la funcion initialize() por el que has enviado,

--
 
 
 

predios3.txt

sej...@gmail.com

unread,
Aug 13, 2012, 4:51:50 PM8/13/12
to publice...@googlegroups.com
Nuevamente gracias!!


JOSÉ LUIS
Leticia, Amazonas, Colombia
Saludos

José Luis

From: elkin dario uribe torres <eduri...@gmail.com>
Date: Mon, 13 Aug 2012 14:19:59 -0500
Subject: Re: [vfp] Re: Acceso a google maps

--
 
 
 

Rudolf Johann Heiner

unread,
Aug 13, 2012, 11:02:00 PM8/13/12
to publice...@googlegroups.com
gracias elkin y sorry por la tardanza,
ya con el archivo txt funciona,
saludos,
rudolf heiner.

Viktor Velazquez

unread,
Aug 14, 2012, 1:53:40 PM8/14/12
to publice...@googlegroups.com
Elkin---
hola disculpa la pregunta. tengo un ejemplo de googlemap y pero no veo que tenga esta funcion..

podrias enviarme el prg donde incluye esta funcion.. 
ya que no la encuentro..  gracias.. 


Date: Mon, 13 Aug 2012 14:19:59 -0500
Subject: Re: [vfp] Re: Acceso a google maps
--
 
 
 

elkin dario uribe torres

unread,
Aug 14, 2012, 3:42:00 PM8/14/12
to publice...@googlegroups.com
Buenas tardes Viktor

Revisa dos mensajes mas arriba y ahi esta la funcion con un ejemplo completo de Rudolf.


Saludos


Elkin Uribe

--
 
 
 

Viktor Velazquez

unread,
Aug 15, 2012, 10:04:27 AM8/15/12
to publice...@googlegroups.com
gracias Elkin ya lo encontre.. saludos


Date: Tue, 14 Aug 2012 14:42:00 -0500
--
 
 
 

saul pina

unread,
Jan 13, 2013, 3:58:57 PM1/13/13
to publice...@googlegroups.com
Salidos Elkin Uribe

Me interesó mucho la opcion de interactuar en google maps desde vfp, tengo tu ejemplo. pero me marca error a la hora de cambiar la funcion initialize

por el que menciona nominas.txt. 

El codigo completo es este:

lcClave = "http://maps.google.es/maps?file=api&v=2.x&" + ;
    "key=ABQIAAAAtOjLpIVcO8im8KJFR8pcMhQjskl1-YgiA" + ;
    "_BGX2yRrf7htVrbmBTWZt39_v1rJ4xxwZZCEomegYBo1w"
 
TEXT TO lcHtml NOSHOW TEXTMERGE
    <html>
        <head>
            <script src="http://maps.google.com/maps?file=api&amp;v=2&oe=ISO-8859-1;&amp;key=ABQIAAAAXfyLOV-DBHsmkpuY-LUUzBRvMuQNe3bCQ9tCDXjXwHZUjgdNBhQG32AJg5mKqo03Qmq9WX7GTGdmvw"
            type="text/javascript"></script>
 
 
            <script type="text/javascript">
 
                var map = null;
                var geocoder = null;
                var myHtml1 = null;
                var address;
 
*!*                 <input type="button" value="Auto Rotate" onclick="autoRotate();"/>
*!*                <div id="map_canvas" style="width: 100%; height: 100%;"></div>

*!*                <form action="#" onsubmit="animate(); return false">
*!*                    <p>
*!*                        <input type="submit" value="Move!" />
*!*                    </p>
*!*                </form>

Si revisas ya tiene la funcion initialize donde explicas como buscar en un archivo txt, el error que me envía es:
"Un control de esta pagina podría no ser seguro al interactuar con otras partes de las paginas"

seguido por este otro error:
Error en el script de la pagina
Linea 56
caracter 1
error Ruta de acceso no encontrada
codigo 0

Gracias por el apoyo.





elkin dario uribe torres

unread,
Jan 14, 2013, 9:31:31 AM1/14/13
to publice...@googlegroups.com
Saul por ningun lado veo la function Initialize la cual deberia quedar asi:

function initialize() {
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new"
}
}
map = new GMap2(document.getElementById("map_canvas"), mapOptions);
map.setCenter(new GLatLng(6.34747558,-75.55807571), 16);
geocoder = new GClientGeocoder();
map.setMapType(G_NORMAL_MAP);
map.setUIToDefault();
map.enableGoogleBar();

var blueIcon = new GIcon(G_DEFAULT_ICON);

var redIcon = new GIcon(G_DEFAULT_ICON);

// Set up our GMarkerOptions object
markerOptions = { icon:blueIcon };


//Adiciona marcas en el mapa pasados por medio de un archivo con las coordenadas
map.enableRotation();

GEvent.addListener(map, "click", getAddress);
geocoder = new GClientGeocoder();

map.addControl(new GMapTypeControl());
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
$archivo= ['C:\\midirectorio\\predios3.txt'];
var linea;
var linea1;
var linea2;
var linea3;
var incrmetari;
var linea4;
var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject");
var myInputTextStream = myFileSysObj.OpenTextFile($archivo, 1, true);

while (!myInputTextStream.AtEndOfStream) {
linea = myInputTextStream.ReadLine();//Tratamiento personalizado para cada variable de salida
//linea4 = myInputTextStream.Line();//Tratamiento personalizado para cada variable de salida
linea1 = linea.split(';');
linea2 = linea.split(',');
linea3 = linea.split('*');
linea4 = linea.split('"');

var latlng = new GLatLng((linea2[1]-0),(linea1[1]-0));

incrmetari1 =  +1;
if (linea4[1] > 1) {
map.addOverlay(new GMarker(latlng,{
icon: blueIcon ,
title: linea3[1]}));
} else {
map.addOverlay(new GMarker(latlng,{
icon: redIcon ,
title: linea3[1]}));
}

}
myInputTextStream.Close();
}
}

Saludos


Elkin Uribe







--
 
 

saul pina

unread,
Jan 31, 2013, 8:17:29 PM1/31/13
to publice...@googlegroups.com
Saludos, ando con esto de google maps, un rato con el ejemplo de miguel y otro rato con el que tu tienes,  pero mira este es codigo en el boton mostrar mas no se si está actualizado....


lcClave = "http://maps.google.es/maps?file=api&v=2.x&" + ;
    "key=ABQIAAAAtOjLpIVcO8im8KJFR8pcMhQjskl1-YgiA" + ;
    "_BGX2yRrf7htVrbmBTWZt39_v1rJ4xxwZZCEomegYBo1w"

TEXT TO lcHtml NOSHOW TEXTMERGE
    <html>
        <head>
            <script src="http://maps.google.com/maps?file=api&amp;v=2&oe=ISO-8859-1;&amp;key=ABQIAAAAXfyLOV-DBHsmkpuY-LUUzBRvMuQNe3bCQ9tCDXjXwHZUjgdNBhQG32AJg5mKqo03Qmq9WX7GTGdmvw"
            type="text/javascript"></script>


            <script type="text/javascript">

                var map = null;
                var geocoder = null;
                var myHtml1 = null;
                var address;




               
                function initialize() {
                    if (GBrowserIsCompatible()) {
                        var mapOptions = {
                        googleBarOptions : {
                        style : "new"
                        }
                    }
                    map = new GMap2(document.getElementById("map_canvas"), mapOptions);
                    map.setCenter(new GLatLng(6.33889,-75.56222), 16);

                    geocoder = new GClientGeocoder();
                    map.setMapType(G_NORMAL_MAP);
                    map.setUIToDefault();
                    map.enableGoogleBar();
                    map.openInfoWindow(map.getCenter(),
                    document.createTextNode("Municipio De Bello"));
                    // Add 10 markers to the map at random locations
                    map.enableRotation();

                    GEvent.addListener(map, "click", getAddress);
                    geocoder = new GClientGeocoder();

                    map.addControl(new GMapTypeControl());
                    var bounds = map.getBounds();
                    var southWest = bounds.getSouthWest();
                    var northEast = bounds.getNorthEast();
                    var lngSpan = northEast.lng() - southWest.lng();
                    var latSpan = northEast.lat() - southWest.lat();

                    for (var i = 0; i < 10; i++) {
                        var latlng = new GLatLng(southWest.lat() + latSpan * Math.random(),
                        southWest.lng() + lngSpan * Math.random());
                        map.addOverlay(new GMarker(latlng));
                        }
                    }
                }


Gracias!

xiloa

unread,
Mar 18, 2013, 12:12:07 AM3/18/13
to publice...@googlegroups.com
Buen día Amigo

Quisiera pedirte un gran favor, si me puedes poner un ejemplo de colocar marcas en google maps pero utilizando una tabla o algo asi en donde yo pueda pasar los valores de las coordenadas que me sirven para localizar las ubicaciones de clientes, he entendido muy poco los ejemplos ya que no estan completos, estan solo por partes si tu tubieras un ejemplo completo te lo agradeceria enormemente que me lo compartieras.

De antemano mil gracias

Xiloa

Marcelo Barberis

unread,
Mar 18, 2013, 1:59:51 PM3/18/13
to publicesvfoxpro
Estimados amigo
Hace tiempo realize un formulario donde incluia google map utilizando una tabla donde guardaba las coordenadas, no te puedo enviar el ejemplo porque hace tiempo perdi toda la informacion del disco donde lo tenia, y recupere de otro disco pero no se recupero bien, por lo que no puedo enviartelo, pero recupere un formulario donde estaba esta opcion.
bueno primero yo me he creado un metodo en el form, "coordenadas", este metodo he creado por que los datos que ingresaban no eran del formato de googlemap y tenia que convertirlo, primero he creado dos textbox donde se ven estos datos, estos los puede ver en la imagen que te adjunto de la tabla que uso.

SET DECIMALS TO 3
SET POINT TO '.'
xcS = ALLTRIM(THISFORM.Pageframe1.Page5.CoordenadasS1.Value)
xcW = ALLTRIM(THISFORM.Pageframe1.Page5.CoordenadasW1.Value)
*!* Extraer los 2 primeros digitos en formatos caracter
xcS0 = SUBSTR(xcS, 1, 2)
xcW0 = SUBSTR(xcW, 1, 2)
*!* Extraer los digitos a partir del 4to. lugar en formato caracter
xcS1 = SUBSTR(xcS,4)
xcW1 = SUBSTR(xcw,4)
*!* Transformarlos a formato numerico para hacer los calculos
xcS2 = VAL(xcS1)
xcW2 = VAL(xcW1)
*!* Calculos los datos para ser transformarlos a sistema decimal
xcS3 = INT(((xcS2*10000000) / 60))
xcW3 = INT(((xcW2*10000000) / 60))
*!* pasar estos valores a textos para realizar la union para luego volverlo a numero
xcS3 = ALLTRIM(STR(xcS3))
xcW3 = ALLTRIM(STR(xcW3))
*!* unir los datos para armar el numero que se pueda ver en google map
xcs4 = '-'+xcs0 + '.' + xcs3
xcw4 = '-'+xcw0 + '.' + xcw3
*!* transformar estos datos a formato numerico
PUBLIC xcs5, xcw5, xcs6, xcw6
SET DECIMALS TO 6
STORE 0.00 TO xcs5, xcw5
xcs5 = VAL(xcs4)
xcw5 = VAL(xcw4)
xcs6 = xcs4
xcw6 = xcw4

Despues en un boton de comando por ej "MOSTRAR COORDENADAS" en el evento click pongo este codigo

SET SAFETY OFF
IF ISBLANK(THISFORM.Pageframe1.Page5.NombreProductor1.Value) .OR. ISBLANK(THISFORM.Pageframe1.Page5.CoordenadasS1.Value) .OR. ISBLANK(THISFORM.Pageframe1.Page5.CoordenadasW1.Value)
    MESSAGEBOX('Error en los cuadros requeridos,' +CHR(13)+ ;
    'revise bien los cuadros de productor y coordenadas' +CHR(13)+ ;
    'no deben estar en vacios o en blanco.',0+64+0,'Sistema Ingrado de Catastro y Guias de Movimientos')
    RETURN 0
ENDIF
*ss1 = ALLTRIM(THISFORM.Pageframe1.Page5.CoordenadasS1.Value)
*ss1 = SUBSTR(ss1,3,1)
*IF ss1 <> CHR(186) OR ss1 <> CHR(170)
*    MESSAGEBOX('Error con el formato de las Coordenadas S.' +CHR(13)+;
*    'Se encontro un error en como se introdujo la información de esta coodenada' +CHR(13)+;
    'formato correcto: 22º34.345 o 22ª34,345, revise que en el 3er. lugar del formato' +CHR(13)+;
    'de coordenadas exista un caracter de " º " o " ª " o si le puso un espacio' +CHR(13)+;
    'despues del 2do. digito, si tiene estos problemas, corrija.',0+64+0,'Sistema Ingrado de Catastro y Guias de Movimientos')
*    RETURN 0
*ENDIF
**************
THISFORM.Coordenadas
xcProducto = ALLTRIM(THISFORM.Pageframe1.Page5.NombreProductor1.Value)
xcZoom = THISFORM.Pageframe1.Page5.Zoom1.Value
xsCoordena = xcs5
xwCoordena = xcw5
*-- Creo el cursor con los datos
CREATE CURSOR MisLugares (Descri C(40), Lat N(12,6), Lon N(12,6), Zoom I(4))
INSERT INTO MisLugares VALUES (xcProducto, xsCoordena, xwCoordena, xcZoom)
THISFORM.Pageframe1.Page5.Shape5.Visible = .F.  && este objeto es un recuadro
THISFORM.Pageframe1.Page5.OleIE.Visible = .T.

TEXT TO lcHtml NOSHOW TEXTMERGE
<html> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=123" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var address = "<<Strtran(ALLTRIM(THISFORM.Pageframe1.Page5.NombreProductor1.Value),'ñ','n',1,10,1)>>"
var xcs001 = "<<xcs6>>"
var xcw002 = "<<xcw6>>"

function load()
{ if (GBrowserIsCompatible())
{ var map = new GMap2(document.getElementById("map"),G_SATELLITE_MAP);
map.addMapType(G_SATELLITE_3D_MAP);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.addControl(new GOverviewMapControl());
map.setCenter(new GLatLng(<<ALLTRIM(STR(MisLugares.Lat,12,6))>>,
<<ALLTRIM(STR(MisLugares.Lon,12,6))>>),<<TRANSFORM(MisLugares.Zoom)>>);
map.setMapType(G_HYBRID_MAP);
var point = new GLatLng(<<ALLTRIM(STR(MisLugares.Lat,12,6))>>,
<<ALLTRIM(STR(MisLugares.Lon,12,6))>>);
var marker = new GMarker(point);
map.addOverlay(marker);

// Aqui va el globo de informacion
marker.openInfoWindowHtml(address + "<br>" + "Latitud:  " + xcs001 + "<br>" + "Longitud:  " + xcw002);

GEvent.addListener(map, "click", function (overlay,point){if (point)
{marker.setPoint(point);
var myHtml = "Latitud es: " + point.y + " Longitud es: " + point.x;
map.openInfoWindow(point, myHtml);
document.getElementById("latitude").innerHTML = point.y;
document.getElementById("longitude").innerHTML = point.x;

}});
} }
//]]> </script> </head>
<body scroll="no" bgcolor="#CCCCCC" topmargin="0" leftmargin="0"
onload="load()" onunload="GUnload()">
<div id="map" style="width: 775px; height: 441px"></div>
<div id="latitude"></div>
<div id="longitude"></div>
</body> </html>
ENDTEXT


STRTOFILE(lcHtml,"MiHtml.htm")
THISFORM.Pageframe1.Page5.oleIE.Navigate2(FULLPATH("MiHtml.htm"))
THISFORM.Pageframe1.Page5.CmdGrabar.Enabled = .T.
THISFORM.Pageframe1.Page5.CmdImprimirFoto.Enabled = .T.

Bueno amigo, lo que te puedo decir es que funcionabla de maravilla, ahora no te puede enviar ninguna imagen porque como te dije anteriormente este form lo pude recuperar de un disco que ya habia reescribido datos y todo el proyecto o bueno la mayoria no pude recuperarlo pero bueno al menos pude recuperarlo este form.

--
Ing. Marcelo Barberis Gutierrez
Sistemas Informaticos Inc
Villa Montes - Bolivia
Telef.: +591-76831064
tabla.jpg
Reply all
Reply to author
Forward
0 new messages