map

Is there a way to cross locations of Sainsburys with BP garages to get places where they are together?

I've seen a photo I'd like to trace the location of. In it is a BP garage and a Sainsburys supermarket. Google Maps holds all the info and I'm sure many others do - what I'd like is to be able to quickly do a join-type operation on the data. It would ahve to be proximity limited but if this was using, say, the town name or the first 4 di...

Building a map from a matrix in Matlab

I have a matrix A which holds integers in a bounded range (0..255) and I need to build a table mapping a value (0..255) to all the coordinates in the matrix which hold this value. What is the best way to achieve this? - I thought about using containers.Map for the task but Map doesn't support multiple values per key. I could have used ...

What does "Useless use of a variable in void context" mean in this Perl script?

The following script gives me what I want but Perl also throws me a warning saying "Useless use of a variable in void context". What does it mean? use strict; use warnings; my $example = 'http\u003a//main\u002egslb\u002eku6\u002ecom/c0/q7LmJPfV4DfXeTYf/1260269522170/93456c39545857a15244971e35fba83a/1279582254980/v632/6/28/a14UAJ0CeSyi3...

Get HTML area tag name from Javascript?

I would like to display area tag name after a person clicks on it. Unfortunately when I use code below for map area I get undefined name of obiekt name. It's weird because for textbox 'kot' it works well. <script> function metoda(obiekt) { alert(obiekt.name); //Here I get undefined! } </script> <input type='text' value='kot' nam...

I want to make a map of the world, with people hitting my site as sparks. What's the best way to do this?

Whenever someone hits my site in NY, I want that map to show a spark in NY (then disappear). So, there will be sparks all over the map, as people hit my site. Is it possible to NOT use Google Maps to do this, with a nicer-looking background map? I'm not allowed to use Google maps. ...

Scala - how to build an immutable map from a collection of Tuple2s?

Hi all, In Python, a dictionary can be constructed from an iterable collection of tuples: >>> listOfTuples = zip(range(10), [-x for x in range(10)]) >>> listOfTuples [(0, 0), (1, -1), (2, -2), (3, -3), (4, -4), (5, -5), (6, -6), (7, -7), (8, -8), (9, -9)] >>> theDict = dict(listOfTuples) >>> theDict {0: 0, 1: -1, 2: -2, 3: -3, 4: -4, 5...

Python: Something like `map` that works on threads

I was sure there was something like this in the standard library, but it seems I was wrong. I have a bunch of urls that I want to urlopen in parallel. I want something like the builtin map function, except the work is done in parallel by a bunch of threads. Is there a good module that does this? ...

Using string* as a key in an unordered_set

I would like to put use a string* as a key in an unordered_list. I do not want the hash the pointer itself but the string it points to. I understand I need to create a struct like this: struct myhash{ size_t operator()(const string * str){ return hash(*str); } } and send it as a a hasher to the map template, but i am ...

drawing imaginary lines above image in android

Hi, I have a static image of a map and i want to draw imaginary line/route from one place to another above the map and also have facility to choose some area of map. How can i do it?? can any have any idea??? Any idea will appreciated ....thanks in advance.. ...

google map search feature

Hi, I am using google map API V3. I have information of different location i.e. address, postal code in an XML file. I have marked all location, mentioned in XML file, on gmap and now what i want is to implement a search feature. The search feature will search 5 nearby location on the map. any idea how to implement this? 5 nearby locati...

calling a mapactivity from another activity

I get a class not found exception. I have included the required entry in manifest file. The code in current activity is as follows: Intent i = new Intent(MainListingA.this, DrawTheatreMap.class); try{ startActivity(i); } ........ The error I get is as follows: 07-26 23:03:20.259: WARN/dalvik...

Search using two keys in an arrayList

Hi all, I would like to implement a fast search on an ArrayList of objects. These objects consist of an int oldId, int newId and int inList, among with other things. Now, I tried implementing a binary search using the Collections.binarySearch on my list, but the problem is I need to search using the oldId and inList, to get the newId f...

What map distributor has the most detailed maps of Finland.

What map distributor has the most detailed maps of finland? Sattelite + Normal view. Bing? Yahoo? Google? I know, this is very specific, but hey, anyone out there with experience from this issue? ...

Is it possible to use a MapView without having to extend MapActivity?

Currently in my design I've got a base abstract class that all of my activities extend from, however I discovered recently that in order to use a MapView you need to make your activity extend MapActivity. Since Java does not have multiple inheritance I was wondering if there is any way I can use a MapView without having to recreate my d...

How to create a 2D array of objects in Ruby?

I am creating a map for my roguelike game and already I stumbled on a problem. I want to create a two dimensional array of objects. In my previous C++ game I did this: class tile; //found in another file. tile theMap[MAP_WIDTH][MAP_HEIGHT]; I can't figure out how I should do this with Ruby. ...

how to declare templated map::iterator within a templated class. following code Says ; expected when compiled

the following code says error: expected ‘;’ before ‘forwit’ error: expected ‘;’ before ‘revit’ template<class T> class mapping { public: map<T,int> forw; map<int,T> rev; int curr; //typeof(forw)::iterator temp; map<T,int>::iterator forwit; map<int,T>::iterator revit; }; // }; // JVC: This was present, bu...

Perl map/grep memory leak

I have been working on a perl project at work, and came across a strange memory leak. I have boiled down the source of my problem into a contrived example: #!/usr/bin/perl use strict; use warnings; # takes: an array reference # returns: 1 sub g { my ($a) = @_; return 1; } # takes: nothing # returns: the result of applying g ...

Loading tiles for a 2D game

Hi Im trying to make an 2D online game (with Z positions), and currently im working with loading a map from a txt file. I have three different map files. One contains an int for each tile saying what kind of floor there is, one saying what kind of decoration there is, and one saying what might be covering the tile. The problem is that t...

Where should Map put temporary files when running under Hadoop

Hi, I am running Hadoop 0.20.1 under SLES 10 (SUSE). My Map task takes a file and generates a few more, I then generate my results from these files. I would like to know where I should place these files, so that performance is good and there are no collisions. If Hadoop can delete the directory automatically - that would be nice. Right...

handling map tiles

hi, I want to build a C# app using map. I want it to contain the map. where to find a world map that can be saved on my computer. How to handle the map zoom level and center point? maybe there is a good api for accessing the map object? thanks ...