Difference between revisions of "GeoView"

From Gramps
Jump to: navigation, search
m
Line 12: Line 12:
  
 
== The html kits ==
 
== The html kits ==
We can use webkit or gtkmozembed to view HTML pages. If no one is installed, you'll never see GeoView.
+
The Geoview shows internet map services inside of GRAMPS with your genealogical data marked. Although there is no visual web browsing, that is what GRAMPS is actually doing, so we need to be connected to the network. You probably also need a broadband connection to have a smooth result. Try eg Google maps in your browser to see if your internet connection is sufficiently fast.
  
If the two kits are installed, webkit will be used.
+
GRAMPS can use two different kind of engines, webkit or gtkmozembed, to view HTML pages. If they are not installed, you'll never see GeoView appearing among your views. If you are looking on how to install these, see [[GeoView#How_to_get_the_HTML_kits_.3F| below]]
  
For web browsing, we need to be connected to the network.
+
If both two kits are installed, webkit will be used.
 
 
Even if you have a HTML kit installed, you can always say : I don't mind ! I don't want to see the HtmlView.
 
  
 +
Even if you have a HTML kit installed, you can always say : I don't mind ! I don't want to see the GeoView.
 
For this, you can disallow Geoview in the Internet Maps preferences tab.
 
For this, you can disallow Geoview in the Internet Maps preferences tab.
  
 
=== WebKit ===
 
=== WebKit ===
It's the future. Be aware, WebKit is always in development.
+
Be aware, WebKit is always in development.
  
 
More and more projects are integrating webkit ...
 
More and more projects are integrating webkit ...
 
+
Eg, epiphany states:  
The reason why for epiphany :  
 
 
*http://blogs.gnome.org/epiphany/2008/04/01/the-future-of-epiphany/
 
*http://blogs.gnome.org/epiphany/2008/04/01/the-future-of-epiphany/
  
 
==== Proxies ====
 
==== Proxies ====
WebKit uses the libsoup library. You need the environment variable http_proxy.
+
WebKit uses the libsoup library. You need to set the environment variable http_proxy.
  
 
=== Gecko ( GtkMozEmbed ) ===
 
=== Gecko ( GtkMozEmbed ) ===
Line 43: Line 41:
 
http://[user:password@]proxy:port/
 
http://[user:password@]proxy:port/
  
To confirm : We need to use gnome-control-center to set the proxy.
+
To confirm : You need to use gnome-control-center to set the proxy.
 +
 
 
== Supported longitude/latitude formats ==
 
== Supported longitude/latitude formats ==
 
When you create/modify a place, the possible formats used for longitude/latitude are :
 
When you create/modify a place, the possible formats used for longitude/latitude are :
Line 67: Line 66:
 
There are a lot of providers. Some are free.
 
There are a lot of providers. Some are free.
  
By default, the provider is OSM ( OpenStreetMap ).
+
By default, the provider GRAMPS uses is OSM ( OpenStreetMap ). As a free project, we find it our duty to first and foremost support another free initiative.
  
This provider depends on the community and the maps are very light depending on the country. Nevertheless, the community made an extraordinary job since a few month. We can say OpenStreetMap is and will be the map for gramps.
+
OpenStreetMap depends on the community and the maps are very light depending on the country. Nevertheless, the community made an extraordinary job and the quality is improving rapidly. And you can help make it better! We can say OpenStreetMap is and will be the map GRAMPS uses per default.
  
Openlayers is free too and uses by default OSM map.
+
Openlayers is free too and uses by default OSM map. A lot of private or non free maps depends on OpenLayers.
A lot of private or non free maps depends on OpenLayers.
 
  
 
The most interesting is the IGN ( Institut Géographique National Français )[http://www.geoportail.fr/visu2D.do?cg=djoxLjEqYzptZXRyb3BvbGUqY3Y6MS4wKnZ2OjEuMSp4eToyLjM0NTI3NDM5ODQwMTE4ODN8NDguODYwODMyNTU3MTczODgqczoxMCpwdjoxLjAqcDpkZWNvdXZlcnRlKmw6UGhvdG98fHwsU2NhbnwxfDEwMHwsQ2Fzc2luaXwxfHw%3D] which offers an old map of France ( about 1780 ) but this provider needs a key. I'll speak about keys later.
 
The most interesting is the IGN ( Institut Géographique National Français )[http://www.geoportail.fr/visu2D.do?cg=djoxLjEqYzptZXRyb3BvbGUqY3Y6MS4wKnZ2OjEuMSp4eToyLjM0NTI3NDM5ODQwMTE4ODN8NDguODYwODMyNTU3MTczODgqczoxMCpwdjoxLjAqcDpkZWNvdXZlcnRlKmw6UGhvdG98fHwsU2NhbnwxfDEwMHwsQ2Fzc2luaXwxfHw%3D] which offers an old map of France ( about 1780 ) but this provider needs a key. I'll speak about keys later.
  
You have Googlemaps, Yahoo! maps, Microsoft maps, ...
+
Then yo haave Googlemaps, Yahoo! maps, Microsoft maps, ...
  
 
== mapstraction ==
 
== mapstraction ==
Line 88: Line 86:
 
If you have 2000 markers, this time is about 2 times 30 seconds.
 
If you have 2000 markers, this time is about 2 times 30 seconds.
  
For this, I limit one HTML page to 200 markers. I you have more than this limit, I create the necessary pages to see all your markers.
+
For this, I limit one HTML page to 200 markers. If you have more than this limit, GRAMPS creates the necessary pages to see all your markers.
  
 
During testing with a places database for France ( > 35000 markers ), I set the limit to 20 markers which permit to create 1760 pages without problems. So we can say we have an unlimited number of markers. Only the file system space will limit us.
 
During testing with a places database for France ( > 35000 markers ), I set the limit to 20 markers which permit to create 1760 pages without problems. So we can say we have an unlimited number of markers. Only the file system space will limit us.
  
 
== The provider Key ==
 
== The provider Key ==
GRAMPS is not a web site.  Keys are only for web sites.
+
GRAMPS is not a web site.  Keys are mostly only for web sites.
In GeoView, I use a specific functionality : We are working on local file instead of url, so we don't need a key.
+
In GeoView, I use a specific functionality : we are working on a local file instead of an url, so we again we normally don't need a key.
  
Some providers like IGN needs key even in this case. So I can't use them. Why ?
+
However, some providers like IGN need a key even in those cases. So we can't use them. Why ?
#Too complex for final user's.
+
#To require a key would be too complex for the normal GRAMPS user
#We need a key by provider
+
#We need a key from the provider
In these case, I hope you understand the choice is limited even is mapstraction can do more.
+
We hope it is understood that our choice of maps is limited even is mapstraction can do more.
  
 
=== Constraint ===
 
=== Constraint ===
Line 109: Line 107:
  
 
== The proxies ==
 
== The proxies ==
Everybody doesn't need a proxy. The majority of us are connected directly to internet. In this case, forget all this.
+
Most people don't need a proxy. The majority of us are connected directly to internet. In this case, forget all this.
  
 
You need a proxy only if you installed one or if you depend on some internet providers.
 
You need a proxy only if you installed one or if you depend on some internet providers.
Line 117: Line 115:
  
 
python-webkitgtk is also called pywebkitgtk
 
python-webkitgtk is also called pywebkitgtk
 +
 
=== ubuntu  ===
 
=== ubuntu  ===
 
==== webkit ====
 
==== webkit ====
You needs libwebkit and python-webkitgtk.
+
You need libwebkit and python-webkitgtk.
  
 
Add to the /etc/apt/sources.list :
 
Add to the /etc/apt/sources.list :
Line 134: Line 133:
  
 
https://edge.launchpad.net/~stemp/+archive
 
https://edge.launchpad.net/~stemp/+archive
 +
 
==== gecko ====
 
==== gecko ====
 
If you want gtkmozembed on ubuntu,  
 
If you want gtkmozembed on ubuntu,  
 
you must install : python-gnome2-extras
 
you must install : python-gnome2-extras
  
It's stable but install many gnome packages even if you are on a KDE based distribution.
+
It's stable but installs many gnome packages even if you are on a KDE based distribution. If you installed the Ubuntu GRAMPS package you already have this package as it contains the spell checking GRAMPS uses. However, there is an open bug with debian/ubuntu to split this mega package as gtkmozembed and spelling don't need the other GNOME components, so these package names might change in the future.
  
Please, don't troll !
 
 
=== suse ===
 
=== suse ===
 
==== webkit ====
 
==== webkit ====

Revision as of 22:11, 14 March 2009

Work in progress.

All we need to understand and test GeoView.

Why GeoView ?

I would like to see my ancestors all around the world on a map. And if possible, I would like to see them moving during time periods.

How to do this easily and with the minimum of software to install ?

GeoView is one solution.

The html kits

The Geoview shows internet map services inside of GRAMPS with your genealogical data marked. Although there is no visual web browsing, that is what GRAMPS is actually doing, so we need to be connected to the network. You probably also need a broadband connection to have a smooth result. Try eg Google maps in your browser to see if your internet connection is sufficiently fast.

GRAMPS can use two different kind of engines, webkit or gtkmozembed, to view HTML pages. If they are not installed, you'll never see GeoView appearing among your views. If you are looking on how to install these, see below

If both two kits are installed, webkit will be used.

Even if you have a HTML kit installed, you can always say : I don't mind ! I don't want to see the GeoView. For this, you can disallow Geoview in the Internet Maps preferences tab.

WebKit

Be aware, WebKit is always in development.

More and more projects are integrating webkit ... Eg, epiphany states:

Proxies

WebKit uses the libsoup library. You need to set the environment variable http_proxy.

Gecko ( GtkMozEmbed )

What will gtkmozembed be in the future ?

The embedding API of Gecko (GtkMozEmbed) has been unmaintained and stagnant for a long time.

Proxies

GtkMozEmbed is proxy aware. I implement this and I use the http_proxy environment variable. Authentication is allowed. The http_proxy format used is :

http://[user:password@]proxy:port/

To confirm : You need to use gnome-control-center to set the proxy.

Supported longitude/latitude formats

When you create/modify a place, the possible formats used for longitude/latitude are :

       'D.D4'    : degree notation, 4 decimals 
                   eg +12.0154 , -124.3647
       'D.D8'    : degree notation, 8 decimals (precision like ISO-DMS) 
                   eg +12.01543265 , -124.36473268
       'DEG'     : degree, minutes, seconds notation
                   eg 50°52'21.92"N , 124°52'21.92"E ° has UTF-8 code c2b00a
                   or N 50º52'21.92" , E 124º52'21.92" º has UTF-8 code c2ba0a
                   The character for seconds can be either one double quote "
                   or two single quote '
       'DEG-:'   : degree, minutes, seconds notation with :
                   eg -50:52:21.92 , 124:52:21.92
       'ISO-D'   : ISO 6709 degree notation i.e. ±DD.DDDD±DDD.DDDD
       'ISO-DM'  : ISO 6709 degree, minutes notation 
                   i.e. ±DDMM.MMM±DDDMM.MMM
       'ISO-DMS' : ISO 6709 degree, minutes, seconds notation 
                   i.e. ±DDMMSS.SS±DDDMMSS.SS

The maps providers

There are a lot of providers. Some are free.

By default, the provider GRAMPS uses is OSM ( OpenStreetMap ). As a free project, we find it our duty to first and foremost support another free initiative.

OpenStreetMap depends on the community and the maps are very light depending on the country. Nevertheless, the community made an extraordinary job and the quality is improving rapidly. And you can help make it better! We can say OpenStreetMap is and will be the map GRAMPS uses per default.

Openlayers is free too and uses by default OSM map. A lot of private or non free maps depends on OpenLayers.

The most interesting is the IGN ( Institut Géographique National Français )[1] which offers an old map of France ( about 1780 ) but this provider needs a key. I'll speak about keys later.

Then yo haave Googlemaps, Yahoo! maps, Microsoft maps, ...

mapstraction

Like you can see, it's impossible to implement all providers maps. For this reason, some people created an api over all these providers api.

With only a few modification, you can use the map you want. And better! you can switch between the maps keeping the zoom and the centered position.

It's also in the development phase and is sometimes buggy.

For performances issues, I can confirm it takes approximately 30 seconds to view 1000 markers for openstreetmap or google. If you have 2000 markers, this time is about 2 times 30 seconds.

For this, I limit one HTML page to 200 markers. If you have more than this limit, GRAMPS creates the necessary pages to see all your markers.

During testing with a places database for France ( > 35000 markers ), I set the limit to 20 markers which permit to create 1760 pages without problems. So we can say we have an unlimited number of markers. Only the file system space will limit us.

The provider Key

GRAMPS is not a web site. Keys are mostly only for web sites. In GeoView, I use a specific functionality : we are working on a local file instead of an url, so we again we normally don't need a key.

However, some providers like IGN need a key even in those cases. So we can't use them. Why ?

  1. To require a key would be too complex for the normal GRAMPS user
  2. We need a key from the provider

We hope it is understood that our choice of maps is limited even is mapstraction can do more.

Constraint

We have no key, so we have a restricted access : About 10,000 to 15,000 requests by IP per day depending on the provider.

What is a request ? As I understand with the IGN ( OpenLayers ), a request is a tile ( an image ). You need several tiles for a view.

I think it is sufficient for the lambda genealogist.

The proxies

Most people don't need a proxy. The majority of us are connected directly to internet. In this case, forget all this.

You need a proxy only if you installed one or if you depend on some internet providers.

How to get the HTML kits ?

It depends on the distribution you're working on ! They are listed in reverse order.

python-webkitgtk is also called pywebkitgtk

ubuntu

webkit

You need libwebkit and python-webkitgtk.

Add to the /etc/apt/sources.list :

# for python-webkitgtk
deb http://ppa.launchpad.net/gwibber-team/ubuntu hardy main
# for libwebkit
deb http://ppa.launchpad.net/webkit-team/ubuntu hardy main

It's from nightly builds, so it can crash.

If you have some crash and want to install the working package, you can get libwebkit from the following url :

https://edge.launchpad.net/~stemp/+archive

gecko

If you want gtkmozembed on ubuntu, you must install : python-gnome2-extras

It's stable but installs many gnome packages even if you are on a KDE based distribution. If you installed the Ubuntu GRAMPS package you already have this package as it contains the spell checking GRAMPS uses. However, there is an open bug with debian/ubuntu to split this mega package as gtkmozembed and spelling don't need the other GNOME components, so these package names might change in the future.

suse

webkit

  • libwebkit-1_0

I didn't test GeoView on suse or opensuse. I need some feedback.

I found on example in : ftp5.gwdg.de/pub/opensuse/repositories/home:/bmotmans/openSUSE_<VERSION>/<ARCH>/

Replace <VERSION> by the fedora version you use. ie : Factory, 10.3, 1.0, ...

Replace <ARCH> by i586, x86_64, ...

  • pywebkit

http://packages.opensuse-community.org/index.jsp?searchTerm=pywebkit

gecko

mandriva

webkit

gecko

fedora

webkit

You must use : WebKit-gtk

yum install WebKit-gtk pywebkitgtk

gecko

debian

webkit

This is the same packager for ubuntu and debian, so go to the ubuntu paragraph.

gecko

install the python-gtkmozembed package.

windows XP/Vista

Perhaps the following link can help windows developers :

http://priscimon.com/blog/2008/06/04/four-easy-steps-to-running-webkit-on-windows/

MAC/OS X

webkit

This is standard on MAC. Can someone confirm this. Is there a python-webkit package on MAC ?

gecko

...

Your modifications are welcomed ...

Results