map

How to refresh an activity? Map View refresh fails

Hi Guys, after implementing some Android Apps, including several Map activities, I try to refresh the activity when the GPS listener's onLocationChanged() mehtod is called. I have no idea how to tell the map activity to refresh on its own and display the new coords... the coords to store will have to be in global values, so that the lo...

How to create a 2D map of room by a few images/movie frames ?

I'd like to create a simple 2D map of a room by getting pictures (ceiling) of all directions (360° - e.g. movie frames), recognize the walls by edge detection, delete other unwanted objects, concat the images at the right position (cf. walls, panorama) and finally create the approximate 2D map (looking on it from above). Getting the scal...

jQuery: Setting 'style' attribute of element with object

I saw this in our codebase the other day: link.attr('style', map({ color: '#9a4d9e', cursor: 'default' })); map is defined as: function map(map) { var cssValue = []; for (var o in map) { cssValue.push(o + ':' + map[o] + ';') } return cssValue.join(';');...

How would I yield an immutable.Map in Scala?

I have tried this but it does not work: val map:Map[String,String] = for { tuple2 <- someList } yield tuple2._1 -> tuple2._2 How else would I convert a List of Tuple2s into a Map? ...

Instantiate google map object with a defined set of bounds?

Hello, I want to create google map using a pre-defined set of bounds. So instead of the usual var map = new GMap2(document.getElementById('map')); map.setCenter(new GLatLng(0,0),5); I want to do something like var map = new GMap2(document.getElementById('map')); map.setBounds(new GLatLng(10,10), new GLatLng(20,20)); Is this poss...

How to draw a map on a webpage that have links inside some area defined by the map?

I need to put a map in a webpage and I need that when the users clicks on certain area inside city limits on the map the user is redirected. Wich is the best way without using Flash? Define Hover polingons on a image. SVG on the browser. Some sort of Javascript, jQuery magical plugin out there? Google Maps? And example could be this...

Reversing permutation of an array in Java efficiently

Okay, here is my problem: Im implementing an algorithm in Java and part of it will be following: The Question is to how to do what I will explain now in an efficient way. given: array a of length n integer array perm, which is a permutation of [1..n] now I want to permute the array a, using the order determined by array perm, i.e. a...

map operator [] operands

Hi all I have the following in a member function int tt = 6; vector<set<int>>& temp = m_egressCandidatesByDestAndOtMode[tt]; set<int>& egressCandidateStops = temp.at(dest); and the following declaration of a member variable map<int, vector<set<int>>> m_egressCandidatesByDestAndOtMode; However I get an error when compiling (Intel...

How do you solve this Haskell problem using higher order functions?

Using higher order functions (map, fold or filter) and if necessary lambda expressions. Write a definition for f1 and f2 so the following evaluation is valid: f1 (f2 (*) [1,2,3,4]) 5 == [5,10,15,20] Any help would be appreciated, thanks. ...

Google map "zoomend" event issue

On my web page, I show "items" as markers on Google map. I use MarkerClusterer which groups nearby markers into groups depending on the zoom level. In addition, I only want to add markers that are located within the currently visible map region. And so far things are good. The javascript is as below. // main function for the map ...

Convert JSON to HashMap using Gson in Java

Hi, I'm requesting data from a server which returns data in the JSON format. Casting a HashMap into JSON when making the request wasn't hard at all but the other way seems to be a little tricky. The JSON response looks like this: { "header" : { "alerts" : [ { "AlertID" : "2", "TSExpires" : null, "Target" : "1", ...

How to Add a Dynamic Layer to an Esri Map Control Programatically in WPF?

Just as the question asks. I have an Esri map control and want to add a Rastor image to the control in WPF and don't know how to do it. I see that I can add layers to the Map control, but is there a way to add a Raster image to a map control? I did find this code to turn the raster image into a Dynamic layer, but Im still lost on how ...

CouchDB: accessing nested structutes in map function

I have a document based on a xml structure that I have stored in a CouchDB database. Some of the keys contains namespaces and are on the form "namespace:key": {"mykey": {"nested:key": "nested value"}} In the map function, I want to emit the nested value as a key, but the colon inside the name makes it hard... emit(doc.mykey.nested...

Adding "category of interest" in the iPhone Map Kit

How can I add a category of interest to my iPhone app. Basically finding certain types of businesses around the users location. It is possible, but how? ...

Can I use vector as index in map structure in c++?

I attempted to do something like this but it does not compile: class point { public: int x; int y; }; int main() { vector<point> vp1; vector<point> vp2; vector<point> vp3; map < vector<point>, int > m; m[vp1] = 1; m[vp2] = 2; m[vp3] = 3; map < vector<point>, int >::iterator it; ...

std::map operator[] and automatically created new objects

I'm a little bit scared about something like this: std::map<DWORD, DWORD> tmap; tmap[0]+=1; tmap[0]+=1; tmap[0]+=1; Since DWORD's are not automatically initialized, I'm always afraid of tmap[0] being a random number that is incremented. How does the map know hot to initialize a DWORD if the runtime does not know how to do it? I...

server client iphone

hi, i am building a map project and i want to save my annotations to the web and download them anytime i want. What's the best way to do that??? ...

which is better in general, map or vector in c++?

As I know that accessing an element in vector takes constant time while in map takes logarithmic time. However, storing a map takes less memory than storing a vector. Therefore, I want to ask which one is better in general? I'm considering using one of those two in my program, which has about 1000 elements. I plan to use 3 dimensional v...

What is my error in a map in Java?

I am trying to solve this problem: http://www.cstutoringcenter.com/problems/problems.php?id=4, but I cant figure out why my code doesnt solve this, I mean in the "for" how can I can multiply the letters? What is my error? It just tell always 7, but I want to multiple all the letters. I hope you can help me. public class ejercicio3 { ...

Java Simple WGS84 Lat Lon to Pixel X, Y

I've read a multitude of information regarding map projection today. The amount of information available is overwhelming. I am attempting to simply convert lat, long values into a screen X, Y coordinate not using any map. I do not need the values projected onto any map, just on the window. The window itself is representing approx. a 1...