map

Map/Reduce in CouchDB with multiple parameters?

I am wondering how to use CouchDB's map/reduce with multiple parameters. For example, if I have teams that have players with ages and genders, I assume I would do this for my map function: "function(doc){ if(doc.team_name) { emit(doc.team_name, doc); } }" However, I am unsure how to write a reduce function to get the oldest m...

How to upcast an Object to a java.util.Map ?

I have an object in my code of the type Object: Object o The class of the instance is Object: o.getClass() gives Object. Now, it should be a Map! How can I upcast this to a Map? I tried: Map<String, Object> map = (HashMap<String,Object>)o But this returns: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.u...

How to Automatically Display Title/Subtitle on Map Annotation (pin)

I am loading an annotation onto my map view. The annotation displays as a pin when the map is loaded. However, the title and subtitle do not appear on the pin automatically. Currently, the user is required to tap on the pin before the title displays. Is there a way to get the title to display automatically on the pin when the map is lo...

Google Map is not loading in iPhone simulator (Can only see the grid lines).

Google Map is not loading in iPhone simulator/device (Can only see the grid lines). Not sure why, but all other functionality are working perfectly, like dropping pin and showing the title and subtitle. All I can see is the grid lines and google logo in my mapView. Any help will be appreciated. Thanks ...

inserting "this" into an STL map from the constructor

VERSION 1 class Doh { private: static std::map<const std::string, const Doh*> someMap; std::string stringValue_; public: Doh(std::string str) : stringValue_(str) { Doh::someMap.insert( std::make_pair<const std::string,const Doh*> (this->stringValue_,this) ); } } The above wa...

2D Tile System not behaving properly

Hello and Welcome I am trying to make a 2-D tile system heavily based off of the Snake example. The original mTileGrid is still there, but there is a new array: mMapGrid. The point is to copy the data from mMapGrid to mTileGrid on each update cycle and therefore simulate an area larger than the immediate screen. I wrote more functions...

Creating specialized maps with jQuery and/or Google Maps API

I need to create a range-graded circle proportional map, i.e., a map that has circles overlaying a map the size of which circles indicates the proportional density of what I'm trying to measure. This is best understood by example, and can be seen here: http://www.d.umn.edu/geog/cartfolder/HTML%20Pages/Map-Types.htm. I've tried poking a...

Help with google map v3

Hello! I am from Russia and I so need your help with google map v3!!! I have the problem about geocoder! I have 20 address and my map shows me only 11 points! I know about “delay” and “setTimeout”, but I don’t know how use it. I found answer about it on this page - http://stackoverflow.com/questions/2899506/loading-city-state-from-sq...

Drawing lat/lng points on an image

I have the following: An image - a hand drawn map - of an area of roughly 600x400 meters. The image is drawn on top of Google Maps tiles. The latitude/longitude (from Google Maps) of the corners of this image. Or put differently, I have the north and south latitude and the east and west longitude of the image. A latitude/longitude coor...

Building/Rendering a geographical-like (shaded?) relief map from data points in a matrix of cells

I have a 2D "map" of items in discrete cells (some cells having no items). Each item has a mutual "relationship" level with every other item -- the higher the relationship level, the more related they are. I ran a simple self-organizing map algorithm (each item tends to drift towards items that they are more related to), so the map is ...

Lookup library that retrieves values based on paths.

I would like a library that works just like servlet mappings without the servlet container. It should support concepts such as /* maps the default value /exact maps exact path maps /prefix maps any path that begins with "/prefix" *.suffix maps any paths that end with "suffix". Imagine something like a Map that accepts str...

very simple groovy, map and closure question, but what I'm doing wrong.....

Hi, This is OK def variables=[ ['var1':'test1'], ['var2':'test2'], ['var3':'test3'] ] println "${variables.size()}" variables.each{entry -> println "${entry} " } I got: 3 [var1:test1] [var2:test2] [var3:test3] but this caused problems def variables=[ ...

Groovy keyset and values

Is there a way to grab the key of one map and replace the value of the other with its value? def wild = [animal1:"pet3", animal2:"dog", animal3:"pig"] def pet = [pet1:"hamster", pet2:"fish", pet3:"cat"] if(pet.containsKey(wild.animal1)) { //replace wild.animal1 with the value contained in pet3 for example //so wild.animal1 wou...

Callout MapView Android

Hello, Is it possible to have a callout attached to an ItemizedOverlay item like in the iPhone and Google maps? ...

how to work with const in a map?

I'm having problems with this call: m_baseMap.find(baseName)->second->AddVehicale(vehicaleToAdd); There's a red line under m_baseMap, the error is : "the object has type qualifiers that are not compatible with the member function". The base map is defined as the following: map <string, const Base*> m_baseMap; How can I fix it? ...

How to store more than one string in a Map ?

Is it possible to set more than two pair value? For example: Map<String,String,String,String> number,name,address,phone - All come together for display the values. Each value associated with others. ...

What's the best way to detach a Collection from a Map in Java ?

I obtain a HashSet from a HashMap and I don't want that my modifications on the HashSet reflect on the HashMap values. What's the best way of doing something like this : HashSet<Object> hashset = new HashSet((Collection<Object>) hashmap.values()); //Something like ... hashset.detach(); //Then i can modify the HashSet without modifying ...

What's the difference between Interface Map and Mediation Module?

What is the difference between Interface Map and Mediation Module in terms of IBM WID? ...

Use of Google-collections MapMaker ?

I just came across this answer in SO where it is mentioned that the Google-collections MapMaker is awesome.I went through the documentation but couldn't really figure out where i can use it.Can any one point out some scenario's where it would be appropriate to use a MapMaker. ...

Any custom map js component for iPhone (or just pan & zoom js component)

Hi there. I'm planning in developing a web app that will include a map-like page and it's targeted mainly to iPhone users. Is there any javascript library that can help me build a map-like component (using my own tiles / images) ? I found some that only work on the PC browsers, but none for the mobile devices. Something that will handl...