Map plugin for an MFC application - c++

I want to display a map in a MFC application (Visual Studo 2008 with MFC Feature Pack).
Off the top of my head I have the following requirements:
I have to be able to add my own markers (plain lat/lon positions), preferrably with different colors/icons so one can distinguish between different types of markers.
If the map data is fetched from an online source, it has to be cache-able, i.e. I can pre-load maps for an area at a certain (or several) zoom-level(s) and then switch to "offline mode". Alternatively all map data is installed together with the application.
The standard operations like zoom in/out and pan should be possible for the user.
The user has to be able to select my markers, preferably by dragging a rectangle around them.
Since the whole app is written in C++/MFC I don't want to have to use the .NET runtime for this plugin.
It shouldn't cost a fortune.
I am currently using an ActiveX plugin called "ESRI MapObjects LT2" which can do all that in some way but it's very tedious to implement, the development seems to have stopped around the time when Visual Studio 6 was available and map material is either very basic or very expensive.
I thought about using Google Maps or Google Earth but I think they don't really support being used by non-web based applications.
I found ArcView to be some sort of successor of the plugin I use currently but I don't think I belong to the target audience since the functionality it offers is way more than what I need. Also I didn't find any information on pricing.

I have written an open-source Geocaching app ( it's in c++ ) that renders maps, the source is at:
http://code.google.com/p/gpsturbo/
It uses my own custom rendering but you could rip out the map parsing if you want. It renders map using google tiles ( and caches the tiles for offline use), as well as Garmin format GPS maps, there is also an Openstreetmap format renderer as well.

Reconsider google if you have internet access. You can make an instance of the IE browser appear in a frame within your application. I believe you can use an ActiveX control. Also Google Earth has a way to embed itself into a web page, and possibly an application as well.
Another option is Global Mapper which is not anywhere near as nice as Google Maps or Google Earth.
We used ESRI for a long time before abandoning it due to a lack of performance and lack of support. It was such a big pain to pay $10k for a license, and then be told they need $2k more so that we can actually use the thing. Oh, and then $2k more to add some extra functionality. Even when it didn't work, their support was dismal to lack-luster.

If you are not bound to Google Maps, you could choose OpenStreetMap.
There are couple of known applications for rendering OSM maps:
http://wiki.openstreetmap.org/wiki/Cobra
Kosmos
osmclient (on SourceForge)
First two render map directly, last one uses OpenStreetMap.org tiles.
You can cache as many tiles or data as you want, you are not restricted to do so.

Related

Multilanguage applications with MFC - workflow?

We have an English-only Windows C++ application based on MFC. It is still being developed, with updates being periodically sent to customers.
We now have a reseller who wants the ability to translate our application into other languages as needed. I understand the standard way of translating MFC applications is by using language-specific resource DLLs.
However, this presents a problem with updating the application. When updating the functionality, we sometimes add/change/delete GUI elements and text messages. How do we "push" these changes to people who would translate the resource DLL without them having to translate the whole DLL every time? What is the best workflow for this? Are there any tools that make developing and MAINTAINING multilanguage applications easier?
Are there any frameworks that could help? The reseller would prefer to have a simple text file with all text strings in it, so dealing with a resource DLL is already an unwanted compromise for them.
Are there any good books/articles on managing multilanguage application development/maintenance?
I never worked in a multilanguage project, so I am not sure what to look for. Thanks for any suggestions :)
Surely, you would keep your content, no matter how it is eventually deployed, in a source code control system. So you can see the adds, changes, and deletes.
Only send the translater the changes that need to be translated. Then they send the translations back to you. Then you package the translation into a deployable object (e.g. DLL).
Are there any tools that make developing and MAINTAINING multilanguage
applications easier?
Our product utilizes a large contingent of worldwide resellers, so, the product is typically translated into many languages. We do not translate the resources directly. We have established a relationship with each reseller. Those that want to translate are given an English dll and a list of what has changed from release to release. Most use a tool called VisualLocalize to localize the resources. The tool produces a localized resource dll from our English dll. That dll is then returned to us, or, packaged separately. They use this type of tool because it allows them to not only localize strings, but, also resize dialog controls if needed. Control size can be an issue depending on the language translation. For example, the size of a text string may be large enough to hold an English word, but, too small for some translated languages. While it may seem “dangerous” allowing a translator to change control sizes, we’ve had enough requests to do this that it’s now standard practice. And, if memory serves me, this particular tool can import and export other files types which would potentially be of use in your particular case.

Is it possible to write a PSD file from ColdFusion

I would like to be able to take a number of separate image files, mostly JPGs and PNGs, and programatically write them into a PSD file in ColdFusion. The idea is that I can create an online tool that I could use to create wedding albums from my digital wedding photos. Considering the intended use, it is imperative that image quality and color reproduction remain as close to the original as possible. My thoughts on this would be to import each file into a separate layer, and then set the positioning of the imported image by pixel coordinates.
I came across this, which appears to be the only mention of this sort of thing on SO (that I could find). However, I'd rather not revert to writing this all out in CFExecute. It seems needlessly complicated to add another language every future developer will need familiarity with, and CFExecute doesn't provide much in the way of monitoring or debugging if problems occur. But I'll do this if I need to.
Server is currently running ColdFusion 9 on Windows 2000 Advanced Server. We will probably be upgraded to ColdFusion 10 on Windows 2008 (or newer) by the time this goes to production, but having the ability to test it in my current environment would be a real plus.

Interactive Graphviz graphs in a web application

I am trying to make a few interactive graph visualisations in my Django web application using Python. I found Graphviz and was able to output a static graph (as a .png image) on my application using Pydot (Python interface to Graphviz's dot language).
However, I am looking to make my graphs more interactive, like being able to highlight nodes when passing my mouse over it, making the nodes click-able, dragging the nodes to a different location and zooming on the graph.
Is there a way I could do this in Graphviz? Or in general is there way to make an interactive graph for my Django application without having to use Flash? I don't want to use flash since I'm not that familiar with it and also since I want to visualise a fairly large dataset.
Try The Javascript Infovis Toolkit. It is all implemented in a browser canvas, so no Flash is needed, only a decent browser with support for the <canvas> tag. Graph visualization examples are here, here and here, other demos are here.
There is Canviz (source). However, nodes are not yet clickable (they were in an older version that used image maps. The code base has changed and now the rendering is happenning client side using javascript, which is why clickable links is not yet re enabled.
This is the best I found, however they are plenty of others.
mxGraph (Not free)
You can use D3.js for graph visualization (see here for examples of graph visualizations in D3js, and look at How to Make an Interactive Network Visualization).
For back-end (if it is necessary to have something more than just a json file to represent the graph - i.e. if it is large), then you can use a Python module for graphs, NetworkX.
Side note, here is my simple interactive graph visualization example:
You can do something like this very simply just with DOT and HTML.
Generate client-side maps and overlay them over your PNG images. (Insert the map code into the HTML page.)
dot test.dot -Tpng -o test.png -Tcmapx -o test.map
SVG exports are directly clickable.
It seems like an approach that fits what you are trying to do might be to use svg in the browser an/or javascript. I think most of the modern browsers support SVG and would allow you to do some pretty cool interactive graphs. The server could provide a json feed of the datapoints needed to render the graph. I don't know off hand the tools that are available, but I've seen some pretty cool graph demos constructed without flash through client-side approaches.
As an alternative, you could pre-render a bunch of graph images that the user would likely view and then just fetch those as the user interacts with the graph. This might work if the graphs don't change that frequently and if the number of alterations that the user would make is small, but you'd have to re-render every time the graph changes.
I've did what you are trying to do not too long ago. The context was visualizing a gnarly SalesForce schema.
First thing, graphviz is only good for plotting, not really for drawing. You can generate SVG, but I could not get it to work with I.E. after a considerable of (what turned out to be fruitless) effort.
I DID find this Java Applet ZGRViewer to suffice, and while applets feel a bit dated for my taste, it worked very well cross browser.
I basically hand coded a process invoking service that generated the dot files and ran them thought (dotty, is think?) - the visulazation applet reads the native dot file format.
I also came accross something that I thought about for a V2 (which never happened) - it is part of the AJAX control toolkit - Seadragon.
If you want to see the code in ASP.NET, I can post it.

File preview component (C++/MFC)

Is anyone aware of a good, general purpose file preview component for MFC/C++ desktop applications?
Specifically, I'm looking for a component that I could embed in my application that would allow a broad range of file types (text files, multimedia, etc.) to be previewed without the need for original applications (such as MS Word, etc.) to be installed.
I could only find one, via Google:
http://www.file-viewer-sdk.com/
Unfortunately, these folks want $60k for unlimited redistribution, which is outside of our budget.
Anyone have any recommendations? If not a component, is anyone using another general-purpose strategy that works well for them?
You can write your own shell preview host once you know the interfaces.
You might want to check out Autovue, originally made by Cimmetry since acquired by Oracle
.
Our product makes limited use of their SDK to do some document conversions (Mostly RTF->PS) and that works well enough for us.

Need a client-side interactive 2D world map: best map package? Or best C++ graphics/canvas library to make one?

I need a 2d political map of the world on which I will draw icons, text, and lines that move around. Users will interact with the map, placing and moving the icons, and they will zoom in and out of the map.
The Google Maps interface isn't very far from what I need, but this is NOT web related; it's a Windows MFC application and I want to talk to a C++ API for a map that lives in the application, not a web interface. Ideally I don't want a separate server, either, and any server MUST run locally (not on the Internet). What canned map package or graphics library should I use to do this? I have no graphics programming experience.
This is strictly 2D, so I don't think something like Google Earth or WorldWind would be appropriate. Good vector graphics support would be cool, and easy drawing of bitmaps is important.
All the canned options seem web oriented. SDL is about all I know of for flexible canvas programming, but it seems like making my own map would be a lot of work for what is probably a common problem. Is there anything higher level? Maybe there's a way to interact with an adobe Flash object? I'm fairly clueless.
Perhaps:
http://www.codeplex.com/SharpMap
ESRI MapObjects
http://www.esri.com/software/mapobjects/index.html
ESRI MapObjects LT
http://www.esri.com/software/mapobjectslt/index.html
See
http://www.esri.com/software/mapobjectslt/about/mo_vs_lt.html
for a comparison of the two MapObjects feature sets.
ESRI may have a replacement to the MapObjects libraries
You could extend your search by using the term GIS (Geographic Information System). I'm sure its gonna be easier. There's a lot of stuff out there on that subject.
Here's a page I found: http://www.ucancode.net/Gis-Source-Code.htm
or: http://opensourcegis.org/
You might want to try the Mapnik C++/Python GIS Toolkit.
You can take a look at the Marble Widget, which is part of KDE's Marble project. There are Windows binaries for this, too, but they might be dependent on Qt.
Yes, Marble has also the advantage that it provides kind of a ready made solution in a single control (called "widget" in Qt's technical terms).
The dependency on Qt (which is the only dependency btw.) might also be seen as an advantage: Qt's upcoming version is licensed under the LGPL, so even if you plan to use this in a proprietary application then there shouldn't be any real worries. And of course Qt and Marble are cross-plattform and provide an API that is very intuitive and easy to understand. Unlike common GIS solutions the Marble API and the usage of the widget is rather focused on people who don't know much about GIS. So its usage is quite easy to understand even if you feel scared by technical terms used in GIS.
Marble offers several interfaces to programming:
You can either create your own Marble plugins and paint inside those or you can subclass the MarbleWidget control. For a simple HelloWorld application see:
http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus