map

Android Map application forces close when map marker is clicked.

Hi there, I'm building a google map application that marks several points on the map. I'm currently trying to get the dialog box to appear when the marker is clicked. Right now, the markers appear at the right places but when i click them, the entire application stops unexpectedly/forced to close. Does anyone have any suggestions on wha...

Trying to convert a 2D image into 3D objects in Java

Hey, I'm trying to take a simple image, something like a black background with colored blocks representing walls. I'm trying to figure out how to go about starting on something like this. Do I need to parse the image and look at each pixel or is there an easier way to do it? I'm using Java3D but it doesn't seem to have any sort of built ...

Is valgrind crazy or is this is a genuine std map iterator memory leak?

Well, I'm very new to Valgrind and memory leak profilers in general. And I must say it is a bit scary when you start using them cause you can't stop wondering how many leaks you might have left unsolved before! To the point, as I'm not an experienced in c++ programmer, I would like to check if this is certainly a memory leak or is it th...

Zoomable AND clickable irregular-shape image map with javascript?

Hi, I would like to create a zoomable image map containing irregular shapes upon which you can click to go to their link (actually different countries in a simple map of the world). I have found a few examples of zoomable images using javascript and/or jQuery, and a few examples of irregular-shape image maps, but nothing that does both ...

android map application error

Hi all, I'm doing a map application for the android phone but kept running into these errors when i run it.... can anyone help?? thank you! Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". and Error Mon Apr 12 23:10:58 EDT 2010 Resource is out of sync with the file system: '/GoogleMaps/res/layout/main.x...

What is the difference between a Map and a Dictionary?

What is the difference between a Map and a Dictionary? I am not asking for how they are defined in language X or Y(which seems to be what generally people are asking here on SO), I want to know what is their difference in theory. I know a Map is an object that maps keys to values. Isn't a Dictionary the same? Thanks ...

Framework/App for custom maps(not general google maps)

Hi! I've started to develop in Android 2 weeks ago and until now, I like it! Currently I am working on a project where I have to display an individual map (not a google maps view, I'd like to display the map of a building's interior) with which the user can interact(mark positions, etc.). Is there a framework or an existing app that I co...

Scala create xhtml elements dynamically

Given a String list val www = List("http://bloomberg.com", "http://marketwatch.com"); I want to dynamically generate <span id="span1">http://bloomberg.com&lt;/span&gt; <span id="span2">http://marketwatch.com&lt;/span&gt; def genSpan(web: String) = <span id="span1"> + web + </span>; www.map(genSpan); // How can I pass the loop ind...

How do i parse a map (foreach) in the same order i created it (JAVA)

So i have a map that i created (inserted data) in an order i wanted. When parsing the map the 1st key returned in foreach is not the first key i inserted. Is there a way for that to happen? Also sorting my map is kinda tricky cause it has to be sorted by Value and in specific field within the Value. Ty ...

google collections ordering on map values

I would like to order a map(A,Double) based on the values. Function<Map.Entry<A, Double>, Double> getSimFunction = new Function<Map.Entry<A, Double>, Double>() { public Double apply(Map.Entry<A, Double> entry) { return entry.getValue(); } }; final Ordering<Map.Entry<A, Double>> entryOrdering = Orde...

PHP arrays - How to 1-dimensional array into nested multidimensional array?

When retrieving a hierarchical structure from MySQL (table with one ID column and one PARENT column signifying the hierarchical relationships), I map the result into an enumerated array as follows (for this example the numbers are arbitrary): Array ( [3] => Array ( [7] => Array () ), [7] => Array ( [8] => Array () ) ) Notice 3 is the ...

Why is my Map broken?

Scenario: Creating a server which has Room objects which contain User objects. I want to store the rooms in a Map of some sort by Id (a string). Desired Behavior: When a user makes a request via the server, I should be able to look up the Room by id from the library and then add the user to the room, if that's what the request needs. ...

Actionscript 3: foreach drawing object in movieclip

Hey, I got a europe map designed in flash (1 movieclip, 1 frame, really simple), which contains the map as drawing objects directly inside the scene and in addition some specific countries as clickable buttons. So far it's working fine. What I need now is to make all the other drawing objects clickable without having to edit and script ...

map kind of asp.net application

I want to create a asp.net application which can show directions in a layout from room A to room B. So layout would be a grid of rooms and if the user wants to get directions from room A to room B the application to highlight the path in blue. I have no idea how to begin with this? What can i use to create a floor layout and then highli...

Flex maps howto examples

Hello, I've stumbled upon this flash map http://www.washingtonpost.com/wp-srv/special/nation/unemployment-by-county/ it looks like they used this map to construct the website. http://commons.wikimedia.org/wiki/File:USA_Counties_with_FIPS_and_names.svg I am curious as to what people have done or any blogs that describe what can be don...

How to code the set method of a Map with another Map as value?

I normally do this to set a new Map to a private variable: public static void setListaClausulas(Map<String, Clausula> nvLista) { listaClausulas = new TreeMap<String, Clausula>(nvLista); } I suppose this is ok to set a new copy of the nvLista and all it's members and not a reference, is it? But now I have a Map inside another Map ...

conflicting declaration when filling a static std::map class member variable

I have a class with a static std::map member variable that maps chars to a custom type Terrain. I'm attempting to fill this map in the class's implementation file, but I get several errors. Here's my header file: #ifndef LEVEL_HPP #define LEVEL_HPP #include <bitset> #include <list> #include <map> #include <string> #include <vector> #...

STL map containing references does not compile

The following: std::map<int, ClassA &> test; gives: error C2101: '&' on constant While the following std::map<ClassA &, int> test; gives error C2528: '_First' : pointer to reference is illegal The latter seems like map cannot contain a reference for the key value, since it needs to instantiate the class sometimes and a refere...

Adding a JPanel to another JPanel having TableLayout

I am trying to develop a map editor in Java using TableLayout. My map window receives as a constructor a Map object. From that map object i am able to retrieve the Grid and every item in the grid along with other getters and setters. The problem is that even though the Mapping extends JComponent, when I place it in a panel it is not pain...

Java fixed memory map

Hi, Is there a simple, efficient Map implementation that allows a limit on the memory to be used by the map. My use case is that I want to allocate dynamically most of the memory available at the time of its creation but I don't want OutOFMemoryError at any time in future. Basically, I want to use this map as a cache, but but I wanna a...