Hello Edson,

I think the function you want is AddODBCLayer().  This lets you add any 
database table containing coordinates as a layer to your map.

!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!

Philip Villars
Caliper Corporation
1172 Beacon Street  Suite 300  Newton  MA  02461
617-527-4700
[email protected]
www.caliper.com
  _____  

From: edsonmartins2005 [mailto:[email protected]]
To: [email protected]
Sent: Sun, 27 May 2012 21:27:38 -0400
Subject: [Maptitude] Re: Locate by Coordinate - GISDK

                                     
    
          
                        


  Thank you. But I needed to make a sql query. Looking to find the function 
ImportFromView GISDK. My code looks like this:
  
  Macro "Location by Coordinate"
  
  map = 
OpenMap("C:\\componentes\\DelphiXE2\\Maptitude\\demo3\\Mapas\\MapaSemLayer.map",
 {
       {"Auto Project", "True"}
    })
    
    view = OpenTable("ViewPontos", "ODBCQ", {"Maptitude_Firebird", "SELECT * 
FROM CLIENTES"})
    
       ImportFromView("ViewPontos|", {"ID", "LONGITUDE", "LATITUDE"}, 
"c:\\temp\\PontosImportados.dbd", {
       {"Label", "Layer de Pontos"},
       {"Layer Name", "Layer of Pontos"},
       {"Optimize", "True"}
       })  
    
    new_lyr = AddLayer(mapa, "Pontos", "c:\\temp\\PontosImportados.dbd", "Layer 
de Pontos", {{"Shared", "True"}})
       RunMacro("G30 new layer default settings", new_lyr)  
    
    RedrawMap(map)
  endMacro
  
  Edson
  
  --- In [email protected], Armando Scalise <armando.scalise@...> wrote:
  >
  > In the Maptitude Help , search for "Creating a Map Layer from an ODBC Table"
  > 
  > Good luck
  > 
  > Armando Scalise
  > 
  > On Sun, May 27, 2012 at 11:20 AM, edsonmartins2005 <
  > edsonmartins2005@...> wrote:
  > 
  > > **
  > >
  > >
  > > I am needing to add points from a odbc sql query using GISDK in a layer of
  > > points. Someone could tell me how to do this? I am needing to do the same
  > > as the menu option Tools->Locate->Locate by coordinate.
  > >
  > > Edson
  > >
  > >  
  > >
  > 
  > 
  > 
  > -- 
  > Armando Scalise
  >
  
                               
                                

Reply via email to