map

Android - Reduce the memory usage of Bitmap Drawables

I have a map in my application that shows locations from Gowalla. I use an ItemizedOverlay with a simple default marker, but as the items are drawn, I swap the default marker out with the location's icon downloaded 9and cached on disk) from Gowalla. The problem is that if there are a lot of locations on screen (say 30), the size of the...

[mapkit] error load map

error: /SourceCache/GoogleMobileMaps_Sim/GoogleMobileMaps-255/googlenav/mac/Loader.mm:231 server returned error: 503 and this is image:http://i.imgur.com/wXaNF.png I can't view image. when i build my map with xcode. i don't know how to fix this error. i try to run another example mapkit, but i met this error again. how can i fix it...

Java map.containsKey doesn't work

This might seem a simple question but I've been trying for a couple of hours now (without having to implement hashCode comparison) to make containsKey working. To simplify things I'll post a simple code example that i'm having issues with: public class myPair { private int a; private int b; myPair(int x, int y) { a=x; b=y; } ...

Storing group of objects with Dates in a Map

I have a group of Events that occurred at some Dates. Each event has a Date field. Now I'd like to create a Map where for each Date (taken from all dates of events) I will assign List of Events that occurred on that date. So in pseudocode : public Map<Date, List<Event>> function(List<Event> list){ Date[]dates = new Date(list.len())...

common java-function to create Maps from strings

Is there any common function (in apache commons or similar) to make maps from query-parameter-like strings? To specific: Variant a (Querystring) s="a=1&b=3" => Utils.mapFunction(s, '&', '=') => (Hash)Map { a:1; b:3 } Variant b (Cachecontrol-Header) s="max-age=3600;must-revalidate" => Utils.mapFunction(s, ';', '=') => (Hash)M...

using WebView to view map and set marker (pin) on android

Hello everyone. I'm making an app on android, using webview to load google map (using this url for my webview: http://gmaps-samples.googlecode.com/svn/trunk/articles-android-webmap/simple-android-map.html). but i can't put a marker on that webview, can't somebody tell me how? thanks very much (and sorry because my terrible English :)) ...

Memory-efficient string-to-string map in Python (or C)

I need a memory-efficient data structure for for storing about a million key--value pairs, where keys are strings of about 80 bytes, and values are strings of about 200 bytes, the total key and value size being about 280MB. I also need efficient lookup of value by key, preferably a hash-map. The memory overhead should be as little as pos...

Problem with STL map iterator copying

I have an STL map that I want to iterate through, and can't seem to get the code to work. The code is: //PowerupInfo is a struct defined in this class's header file std::map<std::string, PowerupInfo> powerups; ...populate powerups std::map<std::string, PowerupInfo>::iterator iter; for (iter = powerups.begin(); iter != powerups.end(); ...

How to (deep)copy a map from a const object

Hello, I have another problem I can't seem to solve..., or find on this site... I have an object (called DataObject) with a map, declared as follows: std::map<size_t, DataElement*> dataElements; Now i have a copy function (used in the copy constructor): void DataObject::copy(DataObject const &other) { //here some code to clean...

map that can take any basic type inside

I need to create a map that can contain as its value any basic data type such as double,float,string, char etc... to store values from a request for a server component. I was thinking of using a map such as this: std::map<std::string, void*>, however I don't know that this is a very good solution. I wondered if anyone can advice on a b...

open source mapping schema for indoor

hi, im looking for some open source project for mapping indoor, for example a want to map a museum and want to do it in some levels, imagine a museum with two floors and with routing, for example if i want to know how to go to the "blue room" that is upstairs the system have to say me that i have to go to stairs.. ...

std::map with typedef type in it?

Is it a good idea to do the following in C++: typedef std::map<std::string, boost::any> MyVals; // Is the following typedef'd type inside a map a good idea? typedef std::map<std::string, MyVals> TagValues; These maps will be used a lot for sequential insertion and removal. ...

Implementing a generical 'map' function over arrays in C

Hi! I'm having difficulties implementing a generic 'map' function over arrays. I started with the following draft: void MapArray(void * src, void * dest, void * (f)(void *), size_t n, size_t elem) { unsigned int i = 0, j = 0; void * temp = malloc(elem); for(i = 0; i<n, i++) { temp = (f)((char *) src) + i)); for...

Does Bing Map SOAP services provide API similar to drag route in Bing Map site?

In Bing map site when you request a route( like this link: http://www.bing.com/maps/#JmNwPTM5Ljc1MDQzNDE2MDIzMjUyfi05OC4yNDU2OTg5MjEzODI0MyZsdmw9NCZzdHk9ciZydHA9cG9zLjQwLjcxNDU1MDE2NzMyMjE2Xy03NC4wMDcxMjQ5MDA4MTc4N19OZXclMjBZb3JrJTJDJTIwTllfX19lX35wb3MuMzcuNzQ1NjI0Xy0xMjIuNDg0NTU0Xzk0MTE2JTJDJTIwQ0FfX19hXyZtb2RlPUQmcnRvcD0wfjB+MH4=), and...

Proper way of showing/hiding map overlays

I have a custom overlay that trace the user location changes. I want to show/hide the overlay. What's the proper way of doing that? I'm using hidden property of overlay view to show/hide it right now, but it doesn't work very well. When i pan and zoom on the map i see bits and pieces of overlay (even when i've set hidden property to TR...

click on map control makes a crash

hi all, I need your help :-) I'm developping a windows phone 7 application. In this application, I have a Pivot Control. In this Pivot Control, I've PivotItem (of course ^^). In one of those pivot item I have a map control. So here is the hierarchy in XAML : <Grid x:Name="LayoutRoot" Background="Transparent"> <!--Pivot Control-...

jQuery.map() and iteration

I'm working my way through the O'Reilly jQuery Cookbook. On p.65 there is an example that looks wrong to me, but I'm new to jQuery (less than a week) so I figure it is very likely that I am the one who is confused. The code intends to get the first three items from an ordered list & do something with them; for simplicity's sake (on the ...

Web Based Map application development

I am trying to develop a web based map application where the user can interact with the map. But I am new to this field and do not have much idea about how to approach this. Basically I want to use a static map created by me, so I think google map API s may not be used in this case. My development platform is unix. Can you please suggest...

OpenLayers - dynamic POI example does not work on my machine

Hi, OpenLayers has a good example which I would like to reuse: http://openlayers.org/dev/examples/dynamic-text-layer.html But when I download it and run on my machine, it does not work. It also does not work when I download OpenLayers-2.10.zip from openlayers.org site, unpack it on my machine and run this example. When I say "does n...

How can I convert a large Multimarkdown file into HTML?

I have a large (~4GB) text file written in Multimarkdown format, and I would like to convert it to HTML. I tried: use strict; use warnings; use File::Map qw (map_file); use Text::MultiMarkdown qw (markdown); my $filename = shift // die; map_file (my $text, $filename); print markdown($text); but it still chokes memory. ...