## maps

### Mapping latitude/longitude to a distorted map

I have a bunch of latitude/longitude pairs that map to known x/y coordinates on a (geographically distorted) map. Then I have one more latitude/longitude pair. I want to plot it on the map as best is possible. How do I go about doing this? At first I decided to create a system of linear equations for the three nearest lat/long points a...

### Mapping values from two array in Ruby

I'm wondering if there's a way to do what I can do below with Python, in Ruby: sum = reduce(lambda x, y: x + y, map(lambda x, y: x * y, weights, data)) I have two arrays of equal sizes with the weights and data but I can't seem to find a function similar to map in Ruby, reduce I have working....

### Options for Google Maps over SSL

We recently discovered that the Google Maps API does not play nicely with SSL. Fair enough, but what are some options for overcoming this that others have used effectively? Will the Maps API work over SSL (HTTPS)? At this time, the Maps API is not available over a secure (SSL) connection. If you are running the Maps API o...

### Territory Map Generation

Is there a trivial, or at least moderately straight-forward way to generate territory maps (e.g. Risk)? I have looked in the past and the best I could find were vague references to Voronoi diagrams. An example of a Voronoi diagram is here. These hold promise, but I guess i haven't seen any straight-forward ways of rendering these, yet...

### What is the best way to create a sparse array in C++

Hi everyone, I am working on a project that requires the manipulation of enourmous matrices, particularly pyramidal summation for a copula calculation. In short, I need to keep track of a relatively small number of values (usually a value of 1, and in rare cases more than 1) in a sea of zeros in the matrix (multidimensional array). A s...

### API Yahoo India Maps

Yahoo has separate map for India ( which has more details than the regular maps.yahoo.com) at http://in.maps.yahoo.com/ . But when I use the API it goes to default map. How do I get API access to YMaps India? ...

### How do I calculate distance between two latitude longitude points?

Here's an easy one for you: How do I calculate the distance between two points points specified by latitude and longitude? EDIT: For clarification, I'd like the distance in kilometres, the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available. ...

### Finding City and Zip Code for a Location

Given a latitude and longitude, what is the easiest way to find the name of the city and the US zip code of that location. (This is similar to http://stackoverflow.com/questions/23572/latitude-longitude-database, except I want to convert in the opposite direction.) Related question: http://stackoverflow.com/questions/158557/get-stree...

### Best .NET Wrapper for Google Maps or Yahoo Maps?

I need to do a quick demo app using Google Maps (or Yahoo Maps, or any similar service). So far I haven't had much luck finding .NET wrappers for any of these services. Any suggestions or pointers? I'm not opposed to using the native javascript api to do this, but I assumed someone would have already written a wrapper to easily integr...

### Map of Enums and dependency injection in Spring 2.5

Let's assume we've got the following Java code: public class Maintainer { private Map<Enum, List<Listener>> map; public Maintainer() { this.map = new java.util.ConcurrentHashMap<Enum, List<Listener>>(); } public void addListener( Listener listener, Enum eventType ) { List<Listener> listeners; if( ( listen...

### Clustering Algorithm for Mapping Application

I'm looking into clustering points on a map (lat/longs). Are there any recommendations as to a suitable algorithm that is fast and scalable? ...

### Interactive world map - suggestions?

Hi. I'm looking to create a "Countries You've Visited" map - just like the ones you've probably seen on Facebook, TravelAdvisor and whatnot. I've tried different flash kits, but they're not quite as advanced as I'd like them to be. The main problem I've encountered with all the different kits is changing the background color on a count...

### Avoid hanging when closing a Yahoo map with lots of markers

I have a Yahoo map with lots of markers (~500). The map performs well enough until I close the page, at which point it pauses (in Firefox) and brings up a "Stop running this script?" dialog (in IE7). If given long enough the script does complete its work. Is there anything I can do to reduce this delay? This stripped down code exhibits...

### What's the best way to do a mapping application for the iPhone.

So I'm looking at writing an iPhone application that shows things on a map. What frameworks/methodologies are out there for doing this? Searching around on Google, I could only find this one: http://code.google.com/p/iphone-google-maps-component/ Which according to the issues list is slow, and stops working after a while. Does anyone k...

### How to map geo location based on one or all of these services.

I'm looking for a solution to map one or all of the following Flickr, twitter, vimeo, by exif, keywords or whatever to google maps. I'm trying to show a map of my location from updating social sites. ...

### C++ last loop iteration (STL map iterator)

I'm trying to figure out the best way to determine if I'm in the last iteration of a loop over a map in order to do something like the following: for (iter = someMap.begin(); iter != someMap.end(); ++iter) { bool last_iteration; // do something for all iterations if (!last_iteration) { // do something for all but the...

### Dynamicaly populating a combobox with values from a Map based on what's selected in another combobox

Ok, here's one for the Java/JavaScript gurus: In my app, one of the controllers passes a TreeMap to it's JSP. This map has car manufacturer's names as keys and Lists of Car objects as values. These Car objects are simple beans containing the car's name, id, year of production etc. So, the map looks something like this (this is just an e...

### Open-source fractal maps

I'm interested in creating a game that uses fractal maps for more realistic geography. However, the only fractal map programs I have found are Windows-only, for example Fractal Mapper. Needless to say, they are also not open-sourced. Are there any open-sourced fractal map creators available, preferably in Python or C/C++? Ideally I woul...

### What is the ideal data type to use when storing latitude / longitudes in a MySQL database?

Bearing in mind that I'll be performing calculations on lat / long pairs, what datatype is best suited for use with a MySQL database? ...