map

android use local service to refresh map UI

I don't need a strict code related answer I just need somebody to tell me what I am missing. My application has to retrieve from a web service (xmlrpc) the positions of some users I know and update their position on a MapView. So I decided to use a Service and an Activity extending MapActivity to show results. I thought about two solutio...

Map with political borders similar to google charts, "clickable" countries

Hi! I'd like to add a map of countries to my website where the user can choose a specific country by clicking on it. http://code.google.com/apis/chart/docs/gallery/map_charts.html has the looks i want, but it's not possible to underlay the countries with links, afaik(Besides lacking pan/zoom, nice to have). The interactive map(Geo Map) ...

2d terrain generation in real time

Hey, I'm trying to create a game similar to this (Note:When you click 'play', there are SFX in the game which you can't seem to turn off, so you may want to check volume). In particular, I'm interested in knowing how the 'infinite' landscape is generated. Are there any tutorials/articles describing this? I came across procedural genera...

Displaying Map ONLY when the button is clicked in Xcode

Hi, I am developing an iPhone application using XCode and I am kinda stuck with the functionality described in the subject of this post. I want the map(using MapKit) to only load and display after I click a button. So, what code should I have under that my "(IBAction) showMap" function? Whatever I could find online talks about unhidin...

How to render OpenStreetMaps?

Did you know a way to render the .osm format given by OpenStreetMap in Php, JavaScript, ActionScript or other web plataform? What do you recomend to implement it? Where can i find good examples in the plataform you suggest? Thanks ...

Highlight polygon and tint rest of map using Google Maps

Hi, I'd like to display a highlighted polygon using Google Maps. The idea is that the polygon in question would be displayed normally and the rest of the map should be darkened a little bit. Here's an example image what I would like to accomplish with a polygon from Austria: Unfortunately, I'm a complete rookie when it comes to Goo...

Creating a tiled map with blender

I'm looking at creating map tiles based on a 3D model made in blender, The map is 16 x 16 in blender. I've got 4 different zoom levels and each tile is 100 x 100 pixels. The entire map at the most zoomed out level is 4 x 4 tiles constructing an image of 400 x 400. The most zoomed in level is 256 x 256 obviously constructing an image ...

IDL: Can IDL add a colorbar/other legend info below a contour plot, so that it doesn't overlap anything?

I am using a map_set call to draw a map, and then using contour to plot some data on top of it. I want to add a legend to this plot to make it useful, but it would have to be below the entire plot, and everything I've tried creates an overlapping legend over top of my image. ...

How to convert/translate informations?

I have to "translate" codes with a conversion table like this: | symbol | translation | | 1 | 3 | | 2 | 4 | | 3 | 6 | | 4 | 5 | | 5 | 2 | | 6 | 1 | | 7 | 1 | My first idea was to use a Map associating each symbol to its translat...

How to determine the time span on map ?

How could I determine the time needed to go from one location to another ? Is there any map API (web services, servlets) that allows this ? ...

How to Maintain order of insertion using collections

I want to add a key,value pair into a hashtable (or any other collection) but have to maintain insertion order. How can I do this? Like I'll add 1 as key "one" as value, 2 as key and "two" as value. The output should be ordered as: 1:one 2:two ...

How to create a function with return type map<>?

Fairly straightforward question. I have a map that I wish to initialize by calling a function like so: map<string, int> myMap; myMap = initMap( &myMap ); map<string, int> initMap( map<string, int> *theMap ) { /* do stuff... */ However, the compiler is moaning. What's the solution to this? EDIT 1: I'm sorry, but I screwed up....

Map generation algorithms

Hi, I am currently working on a game in C# Xna, which works with (X,Y,Z) coordinates. Each unit, contains some information about what is placed at that position, etc dirt, rock or nothing. But I am pretty new into 3D game development, and I need some ideas for 3D map generation algorithms. I thought of interpolation or perlin noise, but...

How large does a collection have to be for std::map<k,v> to outpace a sorted std::vector<std::pair<k,v> >?

How large does a collection have to be for std::map to outpace a sorted std::vector >? I've got a system where I need several thousand associative containers, and std::map seems to carry a lot of overhead in terms of CPU cache. I've heard somewhere that for small collections std::vector can be faster -- but I'm wondering where that line...

Is an iteration on a F# map or set in-order traversal?

AFAIK, F# Map and set are implemented as red-black trees, so I guess that an iteration on these would be in-order traversal. I did some test and the iteration results are always sorted. But I want to make it sure. Is it in-order traversal? ...

Java - Why does Map.put() overwrite while Set.add() does not?

I am wondering what the rationale is behind having Java's Map.put(key, value) method overwrite equivalently key'd values that are already in the collection, while Set.add(value) does not overwrite a pre-existing equivalent value that is already in the collection? Edit: It looks like majority viewpoint is that objects in a set that eval...

Is the a pattern for iterating over lists held by a class (dynamicly typed OO languages)

If I have a class that holds one or several lists, is it better to allow other classes to fetch those lists (with a getter)? Or to implement a doXyzList/eachXyzList type method for that list, passing a function and call that function on each element of the list contained by that object? I wrote a program that did a ton of this and I hat...

Haskell FlatMap

I am a beginner interested in Haskell, and I have been trying to implement the flatmap (>>=) on my own to better understand it. Currently I have flatmap :: (t -> a) -> [t] -> [a] flatmap _ [] = [] flatmap f (x:xs) = f x : flatmap f xs which implements the "map" part but not the "flat". Most of the modifications I make result i...

Counting entries in a list of dictionaries: for loop vs. list comprehension with map(itemgetter)

In a Python program I'm writing I've compared using a for loop and increment variables versus list comprehension with map(itemgetter) and len() when counting entries in dictionaries which are in a list. It takes the same time using a each method. Am I doing something wrong or is there a better approach? Here is a greatly simplified and ...

Offline Mapping API

Are there any services available that allow me to manipulate maps in an offline setting? I am working on a project that requires me to take a map and based on features on the map, generate a game world. I have looked at a few of the API's for different providers: Google, ms, etc. The API's I looked seem to be strictly showing a user a ma...