map

Using array as map value: Cant see the error

Hi all, Im trying to create a map, where the key is an int, and the value is an array int red[3] = {1,0,0}; int green[3] = {0,1,0}; int blue[3] = {0,0,1}; std::map<int, int[3]> colours; colours.insert(std::pair<int,int[3]>(GLUT_LEFT_BUTTON,red)); //THIS IS LINE 24 ! colours.insert(std::pair<int,int[3]>(GLUT_MIDDLE_BUTTON,blu...

map integration in iphone application

Hi Guyz, i want to integrate maps using map kit in iphone, and i am successful at that, but now the problem which i am facing is i have 2 locations coordinates, Location1 and Location2, now i want those two points to be shown on map but i want that they appear on the screen both at 1 time, means if they are very far then the zoom level...

Background Activity for Map in Android started again if phone orientation is changed

Hi, i've developed an android app that's fetches an xml file and displays this data via several markers on the map. This works fine so far. The problem right now is that when i switch the orientation of the phone (portrait->landscape or vice versa) the markers disappear for a small moment, the xml processing is started again and then ...

current location too slow for view

Hi, I make an App with a Map in the App and a button to change to the google.Map-App. The code for my position is: -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { float avgAccuracy = (newLocation.verticalAccuracy + newLocation.horizontalA...

jquery map mousemove

Hi I have made a map qith juqery, which is split up in many regions, and which uses the map cordinates to make hover areas. On hover a tooltip appears for every region. Everything works great, but there is one problem. The tooltip should follow the mouse cursor. This, I have done with mousemove, but if my map is in a div, which is fx cen...

Applying a function that may fail to all values in a list

I want to apply a function f to a list of values, however function f might randomly fail (it is in effect making a call out to a service in the cloud). I thought I'd want to use something like map, but I want to apply the function to all elements in the list and afterwards, I want to know which ones failed and which were successful. ...

Display Image over map layer in GeoServer

Hi I am newbie when it comes to GeoServer and trying to figure out if there is an easy way to display images on top of map layer. A background: In my application, based on a search criteria, some polygons are drawn on the map. Each polygon has a corresponding image (in TIFF format) that is stored somewhere. I want to load the image o...

Covert map latitude and longitude into X and Y coordinates in flash

I want to latitude/longitude into X,Y coordinates in flash, So i tried these methods by googling. Please can someone tell me some other way to calculate. because its not showing the expected places public function getPoint(lat, lon) { // First method /*stationX = (180+lon) * (mapwidth / 360); station...

Group Objects by Common Key

I have a list of Customers. Each customer has an address and some customers may actually have the same address. My ultimate goal is to group customers based on their address. I figure I could either put the customers in some sort of list-based structure and sort on the addresses, or I could drop the objects into some sort of map that all...

google maps - open on appropriate appropriately sized map

I want to use google maps in such a way that if user asks for "United States", then the map will open with setCenter of 2 0r 3. but if he asks for "West Broadway NY" then the map will automatically zoom into the neighborhood. This works on google site, but it not obvious how the API works. ...

How to create a drop-in replacement for an existing dll?

Beyond creating a dll with all the same functions with the same interface and calling conventions, does the replacement dll need to exactly duplicate the export map including ordinal numbers of the original as well? So that not only explicit loading via GetProcAddress works, but implicit linking as well? (edit: this is an unmanaged, ...

OpenLayers Projections.

I can succesfully do: point.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326")); To a point that is in the google format (in meters), but when I want to do the reverse: point.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")); to a point that is in 432...

std::map keys in C++

I have a requirement to create two different maps in C++. The Key is of type CHAR* and the Value is a pointer to a struct. I am filling 2 maps with these pairs, in separate iterations. After creating both maps I need find all such instances in which the value of the string referenced by the CHAR* are same. For this I am using the follo...

Bash: Correct way to Iterate over Map

In Bash I can create a map (hashtable) with this common construction hput() { eval "$1""$2"='$3' } hget() { eval echo '${'"$1$2"'#hash}' } and then use it like this: hput capitals France Paris hput capitals Spain Madrid echo "$(hget capitols France)" But how do I best iterate over the entries in the map ?. For instance, in J...

Batch file to map a drive when the folder name contains spaces

I am trying to map a drive using a batch file. I have tried: net use m: \\Server01\myfolder /USER:mynetwork\Administrator "Mypassword" /persistent:yes It works fine. The problem comes when I try to map a folder with spaces on its name: net use m: \\Server01\my folder /USER:mynetwork\Administrator "Mypassword" /persistent:yes I have...

How to save Map objects in Java to MySQL database

I have Java Map (out of Strings and Ints) objects that I want to save to a database. Is there a standard way to go about this task? Is there a way to compress the Map to take less space on the harddrive? ...

iPhone: Need a non-center point in one map always be the same location as the center of another map?

Hi there- think I may need an iPhone guru with some math skills for this one. I have two map views on one page, call them map A and map B. When the user updates map A, map B gets updated automatically, and vice-versa... Where it gets tricky is that when the user updates map A (drag/swipe/zoom), I need map B to update so that the coord...

ArrayList and Map problem in grails

Hi, I have a service that contains a map: static Map cargosMap = ['1':'item1','2':'item 2','3':'item 3'] that is returned via a method in the service: static Map getCargos() { [cargosMap] } A controller calls it like this: def mform = { Map cargos = empService.getCargos() [cargos:cargos] } In the gsp, I have the ...

add extra hint icon at current google map

my code is written from http://stackoverflow.com/questions/1171433/jquery-xml-and-google-map Now all marker icons can be displayed at current google map. But now I want to add some function. When getting description of item (it will map to opposite icon) ,if user click this description, a hint will display near the map icon at google. I...

How do I force my std::map to deallocate memory used?

I'm using a std::map, and I can't seem to free the memory back to the OS. It looks like, int main(){ aMap m; while(keepGoing){ while(fillUpMap){ //populate m } doWhatIwantWithMap(m); m.clear();//doesnt free memory back to OS //flush some buffered values into map for next iteration flushIntoMap(m); ...