I’ve had a hard time locating good SQLite examples in the forums or within your demos. I am hoping someone has a good example and some recommended approach. Here is our need.
We are in our Prototyping stage but we will have the need to do both GeoCoding and Vehicle Tracking in our application. We have some customers that will not open their machine or firewall to web access so using WorldMapKit Service is out of the question as well as using overlay tiles from Bing, Google, Etc. We will need to run self-contained and I guess that is where SQLite comes in.
So, I have used the extraction tool to extract the USA data from the entire World SQLite Database. How do I go about using SQLite as the source of the maps? I’ve seen examples where a subset of Austin or Chicago is used but the approach seems very specific to that data. How do I approach loading the whole USA for use in Vehicle Locating or GeoCoding?
How to best use SQLite for Entire USA?
Hi Dave,
Currently, like you noticed, we only provide the Austin data set in the wiki Sqlite sample but we have the whole world sqlite database and the size is about 93G, If you just need the USA, I think you can contact our sales and then we should export the USA for you. As for the Geocoding dataset, the wiki sample only includes the Chicago data, we also have the entire USA data set and please contact our sales, they will give you more details on it.
Here is a sqlite guide for map suite, hope it helps: wiki.thinkgeo.com/wiki/Map_Suite_SQLite_Guide
For the Bing,Google layer or worldmapkit layer offline, I think using caching system would solve you issue. If the network are only allowed in a domain network, We can deploy a wms service on your domain server and then cache all the static layers like Bing,Google,Osm,WorldKapKit etc…in server side. If the network is total not allowed, then we can cache them in the local machine in advanced. Basically, almost all of our product supports cache on the fly by simply with the blow codes:
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add(new OpenStreetMapLayer());
staticOverlay.TileCache = new FileBitmapTileCache("…\Cache\", “osm”);
Besides, if you don’t want to generated the tiles on the fly, we can use the GenerateTile tool to get the tiles in advanced and then copy to the target machine after release. Here is the tool link thinkgeo.com/forums/MapSuite…fault.aspx
Thanks,
Troy
We do own all the data. My boss Mike purchased the data. I just could not find a good working example of loading the Map from SQL for the larger data (like USA).
Thank you for all the info Troy. This will help us make some decisions.
So, I was back working on this today and again I don’t see how there is an easy solution to the use the SQLite data. So in order to show a nice USA map with all layers, we would need to build the infrastructure to load all of the layers from SQLite? That seems like a very large task.
Now I did stumble across your “OSM World Map Kit SDK Sample” example however it does not compile correctly. I spent nearly 4 hours today fixing references and code to try and get this going. Once I was finally able to compile it I tried to use it in my Desktop App demo however it is throwing errors like Method not found: ‘ThinkGeo.MapSuite.Core.GeoColor ThinkGeo.MapSuite.Core.StandardColors.get_White()’. This is at runtime not compile time.
So you are telling me there is no real world example for the SQLite maps other that the “austin_streets” demo info on the Wiki page? It seems like useless information.
Hi Dave,
You don’t have to build the infrastructure to load all the layers from sqlite and define all kinds of styles. Our WorldMapKit SDK is used to implement it. After you download WorldMapKit SDK in product center and you will find the source code of OsmWorldMapKitLayer, all the layers in sqlite are defined in this project, all you need to do is build a Winform sample and refer to the OsmWorldMapKitLayer project, then call it with codes:
LayerOverlay overlay = new LayerOverlay();
winformsMap1.Overlays.Add(overlay);
OsmWorldMapKitLayer osmWorldMapKitLayer = new OsmWorldMapKitLayer(ConfigurationManager.AppSettings[“SqliteConnectionString”], OsmWorldMapKitDatabaseType.Sqlite);
overlay.Layers.Add(osmWorldMapKitLayer);
The “OSM World Map Kit SDK Sample” shows how to use the sqlite database in WPF Edition and I am guessing the references issue is because you download the “OSM World Map Kit SDK Sample” directly from wiki, right? . Actually, you may try to download this sample directly from Product Center, then the references will be changed to the right position automatically and don’t need to reference them manually. Then you can replace the database file path with yours in the config file, or you can download a concrete LasVegas data which is exported from the world sqlite database.
As for the get_White method not found issue, I can see the issue and we are working on it, but I can use the development branch to get around the issue. I will update here once the issue fix.
Please let us know if the issue persists.
Thanks,
Troy
Right now, I have used the extraction tool to extract the Entire USA from the World Map. So I am working against the USA subset of data.
The main issue is getting the OSMWorldMapKitLayer project to work correctly. When you download it it will not properly compile. I’ve been able to drop some references and re-reference the assemblies and get the project compiling however I still get the following errors when running.
1) {“Method not found: ‘Void ThinkGeo.MapSuite.Core.GeoPen…ctor(ThinkGeo.MapSuite.Core.GeoColor)’.”}
2) “Method not found: ‘ThinkGeo.MapSuite.Core.GeoColor ThinkGeo.MapSuite.Core.GeoColor.FromArgb(Int32, Int32, Int32, Int32)’.”
3) and the get_White error however this happens no matter what color I change it to. (ie: get_Green, get_Blue, etc.)
Hi Dave,
I can confirm this issue is because the MapSuiteCore and WpfEdition dlls are not matched or refer to a development dlls. After I re-refer the core and wpf edition to 9.0.0.74, then the method not found issues are gone.
Btw, we did an upgrade on the production dlls by changing the target framework from 4.5 to 4.0. The latest dll version towards to 9.0.0.77 now.
Please let us know if the issue persists.
Thanks,
Troy
Thank you Troy. I was able to get it working by dropping and re-adding all the references. The only issue I found was our Extracted USA sqlite data doesn’t seem to show any road features. When I switched to the world database it all worked fine. I will play around with that more and see if I can re-extract the data.
Thanks again!
Sounds great!Please let us know if you have any questions on the extracting process.
Thanks,
Troy