map

How to add custom map source to route-me?

Hi, 'route-me' is an iPhone map engine and I want to add my own map source to it. I've got all the map images on my server but I dont know how to add the map source? Any one could help? ...

Should I use jQuery.inArray()?

I'm doing very frequent searches in arrays of objects and have been using jQuery.inArray(). However, I'm having speed and memory issues and one of the most called methods according to my profiler is jQuery.inArray(). What's the word on the street about its performance? Should I switch to a simple for loop? My specific function is: func...

An Exercise: map or reduce a map in Python without list comprehensions?

When I started writing this question, I didn't think of the easy solution with nested lists, but now anyway want to find one. Here's an ugly code: fun0( fun1(fun2(fun3(arg1))), fun1(fun2(fun3(arg4))), fun1(fun2(fun3(arg4))), fun1(fun2(fun3(arg4)))) Ouch! Names are given for examples. In the real application, their nam...

The internals of route-me? I need to add my own tile source

Hi there, (route-me is an iPhone map library, http://code.google.com/p/route-me/ ) I have a map app based on web and it works fine now. Recently I need to make an iPhone client for my map. But here is the problem: My map got an images size of 300x300 and zoom levels with 1-13, and the scales are also different (Meanwhile it seems rout...

Starndards of open GIS, like openstreetmap, cloudmade?

I am not familiar with the GIS (or map), but recently I have to do some work related to this field. I know some map providers: OpenStreetMap, CloudMadeMap, OpenCycleMap, OpenAerialMap...... My questions is: Do those map providers have the same standards? I mean the tile size, zoom levels, scales for each zoom level and so on. Is there ...

Android Map: Map does not show up on Device

I am able to see Map in emulator but once I load app on device map does not show up. Emulator have target as google api 1.6 and device have android 1.6 loaded. Is this diffrence causing issue? please help and thanks in advance. ...

remap keyboard key in wpf

I have a wpf application that uses several Telerik RadNumericUpDown controls to enter measurements. Turns out that the Telerik control only accepts "." from the numeric keypad (next to the 0 on the right side of the keyboard). Most of my clients have laptops, and so they don't have this button, but they have the "." next to the "," and...

Clickable world map that returns the relivant 3166-1-alpha-2 country code

I want to make a click-able world map which when a user clicks on a country it directs the user to a url containing the corresponding country code. e.g you click on the UK and it directs you to .../country.php?c=GB What would be the best way to go about it? html imagemaps? javascript? flash? Are there scripts already out there? Is ther...

high speed interprocess associative array

Is there library usable from c++ for sharing fairly simple data (integers,floating point numbers, strings) between cooperative processes? Must be : high-speed (SQL-based methods too slow due to parsing) able to get,set,update,delete both fixed and variable data types (e.g. int and string) ACID (atomic,consistent,isolated,durable) us...

Openlayers vector layer

I want to have a vector layer of the world, which shows the country borders, states and their names in English. Is there a layer that exists that I can control the colours? Cloudmade doesn't let me quite do this, nor does openstreetmap and a bunch of others. I'm thinking I might need to create a raster image and overlay that except I do...

PHP - generating a world map from border data

I have found the shape data for the borders of all the countries and a class to process it and I have written a script to convert the longitude and latitude to a pixel location on an image and to draw the countries using imagefilledpolygon and imageline. Everything is working great except: 1) I have a $scale variable that I can change. ...

Prolog List Question

I'm trying to understand lists in prolog when I stumbpled over this problem: there's a predicate mergeandmap/2 that should basically do this: mergeandmap([[a1,...,an],...,[z1,...,zm]],[x1...xn]) %----------list 1------------ -list 2-- List 2 consits of letters (for example [a,b,c]). List 1 consits of several lists with s...

Common algorithm for std::list and std::map?

I have a class of interest (call it X). I have a std::list<X*> (call it L). I have a function (call it F). F(L) returns a subset of L (a std::list<X*>) according to an algorithm that examines the internal state of each X in the list. I'm adding to my application a std::map<int,X*> (call it M), and I need to define F(M) to operate in ...

JAX-RS, Map<String,String> to JSON without the overhead?

Hi! I'm using JAX-RS to create restful webservices in Java. I am getting to much overhead in the produced JSON. Data class: @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class Test { private Map<String,String> data; Test() {} public Test(Map<String,String> data) { this.data = data; } publ...

What is a hashtable/dictionary implementation for Python that doesn't store the keys?

I'm storing millions, possibly billions of 4 byte values in a hashtable and I don't want to store any of the keys. I expect that only the hashes of the keys and the values will have to be stored. This has to be fast and all kept in RAM. The entries would still be looked up with the key, unlike set()'s. What is an implementation of this ...

Problem using generic map with wildcard

i have a method that returns a map defined as: public Map<String, ?> getData(); the actual implementation of this method is not clear to me, but: when i try to do: obj.getData().put("key","value") I get following compile time error message: The method put(String, capture#9-of ?) in the type Map is not applicable for the ar...

Sorting technique followed by TreeMap?

Can anyone explain how the data are sorted in a TreeMap automatically when we try to print the data stored in them? ...

Using std::map<K,V> where V has no usable default constructor

I have a symbol table implemented as a std::map. For the value, there is no way to legitimately construct an instance of the value type via a default constructor. However if I don't provide a default constructor, I get a compiler error and if I make the constructor assert, my program compile just fine but crashes inside of map<K,V>::oper...

Understanding Lambda

X = 5 L = list(map(lambda x: 2**X, range(7))) print (L) ... I'm expecting this to return: [1, 2, 4, 8, 16, 32, 64] ...instead, it returns: [32, 32, 32, 32, 32, 32, 32] What am I doing wrong? ...

How to find a value exists in a C++ std::map

Hi, I'm trying to check if value is in a map and somewhat can't do it: typedef map<string,string>::iterator mi; map<string, string> m; m.insert(make_pair("f","++--")); pair<mi,mi> p = m.equal_range("f");//I'm not sure if equal_range does what I want cout << p.first;//I'm getting error here so how can I print what is in...