Fwd: libchamplain with local (rails server + nominatim + tiles server ), add map source




Found this
ChamplainMapSourceDesc *
champlain_map_source_desc_new_full (gchar *id,
                                    gchar *name,
                                    gchar *license,
                                    gchar *license_uri,
                                    guint min_zoom,
                                    guint max_zoom,
                                    guint tile_size,
                                    ChamplainMapProjection projection,
                                    gchar *uri_format,
                                    ChamplainMapSourceConstructor constructor,
                                    gpointer data);
and this
gboolean
champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
                                       ChamplainMapSourceDesc *desc);

but without an c example realy i can't resolve this.


-------- Forwarded Message --------
Subject: libchamplain with local (rails server + nominatim + tiles server ), add map source
Date: Wed, 23 Jan 2019 07:56:26 +0200
From: romeo <romeo petruca perosoft org>
To: libchamplain-list gnome org


Hi,

Need to work with libchamplain without internet access.

First solution libchamplain+memphis with OSM + rules.xml. 
(http://blog.mikeasoft.com/2010/09/24/local-map-rendering-and-route-finding-with-libchamplain-spatialite-and-open-street-map/)

Give up, is working but very very slow.

Second solution, instaled local rails server + nominatim + renderd(tiles 
server).

Http access: localhost:<port_number> local pc, or <ip_pc>:<port_number> 
local network.

Http access working great, no need internet access.

Now, how can i add a new source map to libchamplain in C.

Reading minimal.py from here 
(https://stackoverflow.com/questions/44607130/how-to-use-libchamplain-to-load-local-tiles-or-osm-xml-in-python), 
big diference

python and C.

A sample C example, how to add a new map source to libchamplain ?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]