I have not seen it before, but I’m tracing through it now. I’m having a little trouble getting my API key to work in it.
But this is good, I was hoping to find other’s code afterwords for comparison. I’m noticing that you are building the code similar to the Scalable.as, I tried to as well.
I just noticed .getInstance() and the TUIOEventWatcher.as, I’ve never seen this one before, is it your own addition?
Have you made any modifications to the TUIO files? What does the super(); do in your TappableMap() function?
I’d like to know more about your thoughts behind how you structure your multi-touch code.
Another also, I’ve never done any Flex development, so I’m interested to learn if any of the code I’ve been making works with Flex as well as other Flash compilers.
I’d like to leave it to the people who have a little more experience using flex and programs like FlashDevelop before I delve into it.
So many code building applications, so little time it seems.
I ported lagerkoller’s google map over to modest maps. I believe it has a real advantage over google maps as it supports much smoother panning and zooming. The source with examples can be found here:
It is indeed a very excellent setup. And I agree that lagerkoller’s map code does work a lot better than what I’ve produced.
I like to think that the code I’m building isn’t refined to a final version, or maybe not even the best solution, that’s why they are just experiments. Do you think I would be best if I didn’t use the work “tutorial” in my posts and threads? I’d like to start up conversations using simple setups and simple code to help refine ways to think through them. There is a saying among the developers I work with, give a piece of code to 10 developers and they’d be able to simplify it a few lines, as long as they work together. Just telling me someone else’s code is better just because it runs smoother isn’t really helping me or anyone learn. Why is the code better? How is the code better? What do you all think would be a step in the right direction to make my experiment run smoother? Is there a disadvantage from trying to directly pull the blob information from TUIO.as with a simple function within it? Is it really better to have an additional array for blobs directly in your main flash app’s code, especially when you have to constantly check and see if there is a blob that was never deleted in the array? Doesn’t TUIO already do that and your doubling up information which just ends up making one more variable you have to deal with and remember?
Do I expect anyone to take my code and start using it in products and apps they intend for larger purposes? Not in the least.
I’d like to learn more about the ‘why’ it was coded this way. That is why I’ve been trying to write posts explaining everything I’m trying to accomplish along with the code. If my post don’t sound that way, then let me know and I’ll try to become a better writer.
And is modest maps not using Google Maps at all then? Because my initial intention was to eventually incorporate a UI to utilize the rest of Google Map’s functionality, search, directions, etc.
I work at a company that strives to keep up with best practices in their code and in their mindset. And that just seems to be in my nature as well.
I think you misunderstood me. I wasn’t saying my map is better than yours, I meant that the modest maps AS3 code base is more performant than the google maps AS3 code base. Also, as far as I know Google doesn’t provide source for the AS3 library, where as with modest maps you can open it up and see exactly how every part of the code works down to the lowest level. I used lagerkoller’s supplemental TUIO classes because I had less than a week to develop the map software and build the screen, and his already worked well enough to not want to rewrite it. I’m sure there’s room for improvement there and I honestly haven’t taken a look at the low level TUIO libraries except to troubleshoot a few runtime errors. In summary, the reasons I recommend modest maps over google or yahoo are:
1. Faster performance;
2. Open software--easy to modify and extend;
3. Smooth scaling (AFAIK google only zooms in increments of 200%)
4. Bitmap smoothing;
5. Multiple map providers;
6. Support for custom tile sets (gigapixel photo browsing would be a really cool app);
Anything that google maps can do that modest maps can’t can probably be accessed as a web service anyway.
Point taken. My apologies, I didn’t mean to fly off the handle. It just caught me off guard at an inopportune moment in time. (mainly at the wee hours of the AM). Modest maps is definitely something I’ll look deeper into and learn to use more. Some days I just wish I got paid to work on multi-touch apps throughout the day instead of just web pages, sometimes there just not enough hours in a day.
ATM I use lagerkoller’s multi-touch implementation of the Google Maps API for flash. Its really great, the only thing is that I can’t use the markers with touch. Do you know if there is a workaround for this or, Parker, would it be possible to open custom markers with touch in your ModestMaps implementation?
ATM I use lagerkoller’s multi-touch implementation of the Google Maps API for flash. Its really great, the only thing is that I can’t use the markers with touch. Do you know if there is a workaround for this or, Parker, would it be possible to open custom markers with touch in your ModestMaps implementation?
Thanks a lot
Greg
I never set up my map to send touch events to markers. I don’t think I will have the time to work on it, unfortunately.
I checked out your modestmaps implementation and I find it quite nice. Also I am quite glad that I will be able to create my markers that will react to touches. The only minor drawback is that I can’t do address translation to lat/long coordinates, so I’ll need to change the input of my markers location to pre calculated data, but thats a minor thing compared to the advantage of being able to create custom touch markers.
So as soon as I have markers working I will send you the code so that you can re-publish the enhanced version.
I checked out your modestmaps implementation and I find it quite nice. Also I am quite glad that I will be able to create my markers that will react to touches. The only minor drawback is that I can’t do address translation to lat/long coordinates, so I’ll need to change the input of my markers location to pre calculated data, but thats a minor thing compared to the advantage of being able to create custom touch markers.
So as soon as I have markers working I will send you the code so that you can re-publish the enhanced version.
Thx
Greg
Thanks for helping out. If you are running your app in a web browser you could install google gears for the address lookup.
ATM I use lagerkoller’s multi-touch implementation of the Google Maps API for flash. Its really great, the only thing is that I can’t use the markers with touch. Do you know if there is a workaround for this or, Parker, would it be possible to open custom markers with touch in your ModestMaps implementation?
Thanks a lot
Greg
the marker icon can be any DisplayObject. create a DisplayObject of your choice and tell Google Maps to use that as the marker icon through MarkerOptions. In your new DisplayObject set up the touch events and you should be good to go.
@Parker: I tried your modest maps in my app and what I observe is that markers placed on a location are off at a small zoom amount and need to zoom in to see the marker get into the right place. Also when zooming the center of the zoom is off as well. (both are off on the positive y axis)
Do you think its because I put the map in a sprite and not directly on the stage? Or do you have an idea where I should look to fix this?
Thx
Greg
@Parker: ok the thing is that the parent of the map must be the same size as the stage, otherwise the zoom is not zooming between the two touches. I am trying to look into this to understand why, but do you have any idea how to make it work on all sizes of parents?
Thx
Greg
Ok, I think I found what was the problem. I had to transform touchpoints from global to local coordinates.
So now I can put the map on sprites as well.
By the way I found something weird in the TUIOModestMap.as. I think there is a typo at line 112:
//You check blob1Id two times which doesn't make any sense if (blob1Id && blob1Id && TUIO.getObjectById(blob1Id))
//so I changed it to: if ((blob1Id || blob2Id) && TUIO.getObjectById(blob1Id)) // tell me if I am right or not