Recent

Author Topic: TMapViewer  (Read 74391 times)

Maciej Kaczkowski

  • New Member
  • *
  • Posts: 31
    • Password Recovery Software
TMapViewer
« on: April 03, 2011, 06:57:18 pm »
I'm glad to announce a new component written for Lazarus. TMapViewer is a simple component that supports the most popular maps using native graphic control.

Features:
* support Google Maps (Normal, Satellite, Hybrid, Physical, Physical hybrid)
* support OpenStreet based maps (OpenStreetMap Mapnik, OpenStreetMap Osmrenderer, OpenCycleMap)
* support Virtual Earth maps (Normal, Aerial, Road, Hybrid)
* support Yahoo maps (Normal, Satellite, Hybrid)
* lots of debug information
* pluggable download engine (synapse, native win32)
* disk caching

Download at:
http://keit.co
« Last Edit: April 15, 2011, 08:10:33 pm by Maciej Kaczkowski »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8114
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TMapViewer
« Reply #1 on: April 03, 2011, 07:22:47 pm »
Just tried it out, nice work buddy :)

circular

  • Hero Member
  • *****
  • Posts: 3058
    • Personal webpage
Re: TMapViewer
« Reply #2 on: April 03, 2011, 08:38:01 pm »
Cool !
Conscience is the debugger of the mind

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: TMapViewer
« Reply #3 on: April 03, 2011, 09:11:22 pm »
I want see it too!   ;)
It tells me
Code: [Select]
/home/v1/Lazarus_Qt/lazarus/packager/kcMapViewer.pas(1,1) Fatal: Can't find unit httpsend used by kcMapViewer
What else do I should install ?

Thanks.

It is in Synapse.  :)
« Last Edit: April 03, 2011, 09:26:08 pm by Blaazen »
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: TMapViewer
« Reply #4 on: April 03, 2011, 10:43:06 pm »
I finally compiled demo project. (on 64-bit Linux + Qt)

I was not able compile synapse as package so i only used its units.

I had to add line
Code: [Select]
{$mode objfpc}{$H+}to kcMapViewer.pas otherwise it told me:
 Error: Identifier not found "class"

Demo works fine.

Edit: I have slow internet connection. Seems this requires faster internet.
« Last Edit: April 03, 2011, 10:46:58 pm by Blaazen »
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3658
  • I like bugs.
Re: TMapViewer
« Reply #5 on: April 04, 2011, 12:40:42 am »
It works well!
The demo is very easy to port to other platforms (Linux, Mac): just change Windows unit to LCLIntf.

It is not a very big program yet works rather well. I guess you have plans to develop it further. Will it be open source?
The scrolling could be made much smoother by caching data and using threads.

Juha

JD

  • Hero Member
  • *****
  • Posts: 1762
Re: TMapViewer
« Reply #6 on: April 04, 2011, 12:44:30 am »
Looks very promising. Now it may be possible to write geolocalisation apps in Lazarus.  :D
Windows (10, 7) - Lazarus 2.0.6/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

Maciej Kaczkowski

  • New Member
  • *
  • Posts: 31
    • Password Recovery Software
Re: TMapViewer
« Reply #7 on: April 04, 2011, 03:00:40 pm »
Thanks for testing, project will be open source (LGPL).

on my roadmap there is:
* POI
* more events OnPaint, BeforeDownload, AfterDownload
* speedup (multithread based downloading)
* more maps (virtual earth, yahoo)

Gintas

  • Jr. Member
  • **
  • Posts: 71
    • Developer's Diary
Re: TMapViewer
« Reply #8 on: April 04, 2011, 05:47:08 pm »
Hmm and I thought it will be for game level maps :)

cpalx

  • Hero Member
  • *****
  • Posts: 619
Re: TMapViewer
« Reply #9 on: April 05, 2011, 05:12:20 am »
it promises much, but it feels very slow....

I like it.

ik

  • Jr. Member
  • **
  • Posts: 88
  • ik
    • LINESIP
Re: TMapViewer
« Reply #10 on: April 05, 2011, 11:46:51 am »
I really liked it. I will play with it a bit more and write some demo and place it on my blog :)

Would you be willing to add this to Lazarus-CCR or a more formal repository ?

pch

  • Jr. Member
  • **
  • Posts: 51
    • http://ap-i.net
Re: TMapViewer
« Reply #11 on: April 05, 2011, 02:47:34 pm »
Very nice component, congratulation!
But I try it at work and need to set a proxy to get out to google.
So I add this code instead of using HttpGetBinary:
Code: [Select]
{$IFDEF USE_SYNAPSE}
procedure DownloadFile(const Url: string; str: TStream);
var
  HTTP: THTTPSend;
begin
  HTTP := THTTPSend.Create;
  try
    HTTP.ProxyHost:='127.0.0.1';
    HTTP.ProxyPort:='8080';
    HTTP.ProxyUser:='user';
    HTTP.ProxyPass:='password';
    if HTTP.HTTPMethod('GET', URL) then
    begin
      str.Seek(0, soFromBeginning);
      str.CopyFrom(HTTP.Document, 0);
    end;
  finally
    HTTP.Free;
  end;
end;
{$ELSE}           

It may be nice to add properties to the component to set the proxy.


Maciej Kaczkowski

  • New Member
  • *
  • Posts: 31
    • Password Recovery Software
Re: TMapViewer
« Reply #12 on: April 05, 2011, 04:36:17 pm »
Quote
It may be nice to add properties to the component to set the proxy.
I found solution for this. Please wait for next version.

Quote
Would you be willing to add this to Lazarus-CCR or a more formal repository ?
I have no access and I don't know how.

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: TMapViewer
« Reply #13 on: April 05, 2011, 04:58:51 pm »
What Lazarus level did you develop this with?

I tried installing it under 09.30 (I just installed that one a week ago) and I can't install mapviewer as it apparently requires fcl >= 1.0.1  and I have 1.0.

That's pretty close though ..... Could I sneakily change the .lpk file to set the dependency to 1.0?  Or will that fail big time?

1.0/2.6.0  XP SP3 & OS X 10.6.8

fredycc

  • Sr. Member
  • ****
  • Posts: 265
Re: TMapViewer
« Reply #14 on: April 05, 2011, 05:57:06 pm »
Amazing Maciej Kaczkowski, thanks for you contribution, this is what I'm looking for.

Regards  :)