Recent activity
Subscribe to this feed
RandomEtc replied on November 18, 2009 05:01 to the question "Transformation calculator tool goes wonky on negative longitude?" in Modest Maps:
Repeats: yes. It doesn't do it by default in the zoomify providers so you'll need to subclass and override the relevant functions or make a new provider.
Basically, in getTileUrls you check the coord.column against the number of columns at coord.zoom. For a linear projection map you'll probably have two tiles at zoom 0, so it'd be something like:
override public function getTileUrls(coord:Coordinate):Array
{
// the first two here is for the number of cols at zoom=0
var numColumns:int = 2 * Math.pow(2, coord.zoom);
while (coord.column >= numColumns) {
coord.column -= numColumns;
}
while (coord.column < 0) {
coord.column += numColumns;
}
return [ __baseDirectory+'TileGroup'+coordinateGroup(coord)+'/'+(coord.zoom)+'-'+(coord.column)+'-'+(coord.row)+'.jpg' ];
}
You can do the same for rows if you want, or have the function return an empty array above and below the map (fewer 404s that way). You can also adjust the bottomRight and topLeft coordinate limits to use infinity for the columns, which will allow you to scroll your map all the way around.
Hopefully that helps you understand the other providers. The OpenStreetMap and BlueMarble ones are the simplest I think.
RandomEtc replied on November 16, 2009 03:49 to the question "Transformation calculator tool goes wonky on negative longitude?" in Modest Maps:
Given the similarity between Miller and Mercator (mathematically speaking) I can't think of a reason why it wouldn't work. I always get columns and rows mixed up in the calculator though, which is why I made the dynamic class.
We'll gladly accept your projection classes once you've worked the kinks out! BSD license OK? Email me (tom at stamen) or post a link and I'll grab 'em.
RandomEtc replied on November 15, 2009 22:28 to the question "Transformation calculator tool goes wonky on negative longitude?" in Modest Maps:
If you're using the as3 version and want to try this more iteratively, the transform derivation functions from the calculator are also implemented in a new provider available in our subversion repository:
http://modestmaps.googlecode.com/svn/...
Forgive the lack of tutorial for this one, but if you look at the constructor you can see it takes l1, p1, l2, p2, l3, p3 - these are the locations (l, in degrees) and points (p, in pixel space in the original image) of your control points.
Instead of my lazy implementation (with a boolean flag for mercator) you'll want to copy this into a new file and also include your custom projection class and replace the rawProject function. (This is because we conflate projection from lat lon and transformation into tile coordinates into one class.). Hopefully that won't be too tricky.
We're in the bad habit of only using Mercator projections for things at the moment. If you run into other issues, especially around the dateline, feel free to let us know! In theory everything is general enough...
RandomEtc replied on November 10, 2009 17:49 to the question "JS canvas and animated zoom" in Modest Maps:
Depends on your definition of "plans" :)
I'm assuming you've seen modestmaps.js but you think it's a bit basic and you're wondering if it's going to do anything nicer?
I'm definitely interested in adapting modestmaps.js into something closer to Seajax - http://livelabs.com/seadragon-ajax/ - which is the slickest js tile-based viewer I've seen yet. I also did some brief (broken, unfinished) experiments using CSS transitions and matrix transforms to position layers.
There's been some talk of moving modestmaps.js over to github as the future flagship implementation of the project. Would that be of interest to you?
RandomEtc replied on November 10, 2009 16:49 to the question "mapExtent" in Modest Maps:
TileGrid should work with any zoomLevel now, so the original request is possible.
You'll need to modify setExtent to generate precise coordinates instead of nearest-whole-zoom. It's not something I've ever wanted or needed so I don't have anything to hand, sorry. Let me know if it's completely baffling.
RandomEtc replied on November 10, 2009 00:12 to the question "getTileUrls gets different BBOX from map extent" in Modest Maps:
Not sure what's happening here. Can you post your full WMS provider constructor call?
It might be worth specifying an explicit zoom level in a call to setCenterZoom instead of setCenter... zoom levels can be tricky to derive but in general the projections we're using treat the whole world as 1 or 2 tiles at zoom level 0 and double the width and height after that. Try zoom level 17 or 18, judging by your MapExtent it's a pretty small area you're looking at?
A comment on the question "is there a map provider which give birds eye view??" in Modest Maps:
The Bing Bird's Eye maps are great, but I've never seen them working with Modest Maps. It's not a simple question :) – RandomEtc, on October 14, 2009 21:38
RandomEtc replied on October 14, 2009 18:49 to the question "Flash Animation Stops or Hangs at 3,243. Why?" in Modest Maps:
A comment on the question "Flash Animation Stops or Hangs at 3,243. Why?" in Modest Maps:
Sorry, I just realised you already confirmed it's not a bad value. Let us know if you're using the debugging stuff, it will help locate the problem. – RandomEtc, on October 14, 2009 17:54
RandomEtc replied on October 14, 2009 17:52 to the question "Flash Animation Stops or Hangs at 3,243. Why?" in Modest Maps:
Hi Eric,
I'm not overly familiar with that exact code, but you might check a few things.
First make sure you're compiling and running with debugging enabled and using the debug version of the flash player - that way if an error occurs you'll find out where it is in your code.
Second, perhaps it's an erroneous value in your data? A bad lat/lon that doesn't get parsed might cause an error. Or if the size of the dots depends on a value from your file, watch out for errors like divide by zero.
There isn't a limit on numbers of Sprites that I'm aware of, except for the performance-related implications of trying to do too much stuff per frame in animations.
Tom.
RandomEtc replied on September 30, 2009 02:20 to the problem "Pan animation on the edge and locationPoint-function" in Modest Maps:
Thanks for the bug report. Can you confirm which version of Modest Maps you're using?
If it's actionscript 3 then a short term fix could be to set map.grid.enforceBounds to false - does that help?
Otherwise a few things need rearranging in the TileGrid so that bounds are enforced correctly before events are dispatched - I've added this issue to the google code issue tracker and hopefully someone will get to it in the next couple of weeks (probably me!) http://code.google.com/p/modestmaps/i...
RandomEtc replied on September 19, 2009 18:45 to the question "How use Flex Button as a marker???" in Modest Maps:
Flex is built on top of Flash as you're aware, and reuses a lot of the basic Flash elements. However, Flex overrides some of the default Flash behaviours (like addChild) in complex ways. For example, Flex components expect to be measured and sized by their parents. Flash components don't do anything except display graphics/text, it's up to you to measure and position them.
It's hard to write things that work both the Flex way and the regular Flash way. We chose not to worry about Flex, so I don't know for sure how to fix things to work the way you expect. Sorry!
A comment on the question "How do I take a snapshot of the map image provided through ModestMaps library?" in Modest Maps:
Yes, that would work. You can use the Modest Maps python code to do things like this using a similar format for map providers. – RandomEtc, on September 16, 2009 14:44
RandomEtc replied on September 16, 2009 14:42 to the question "GeoDjango" in Modest Maps:
What does the data look like? Can you link to an example?
It should be quite easy to adapt a common output format to Modest Maps. We haven't added this to the library because it's a fairly big commitment to maintain against all the different implementations, but if you have a specific one in mind it should be quite easy.
RandomEtc replied on September 15, 2009 07:32 to the question "ModestMaps project activity ???" in Modest Maps:
Look for examples that reference MarkerClip (this is built-in to Map, see Map.putMarker) and for polygons see PolygonMarker. You can safely ignore the Overlay and PolylineClip classes unless you know they do something you need.
e.g. http://modestmaps.googlecode.com/svn/... and http://modestmaps.googlecode.com/svn/...
RandomEtc replied on September 14, 2009 18:39 to the question "ModestMaps project activity ???" in Modest Maps:
Hi Neil,
Aha. Tricky. We might sound very mean and snooty, but...
It's a stated aim of Modest Maps to not include default markers, info windows and so on. That's for you to do yourself... if you wanted everything to look the same you'd just use Google Maps :)
However! There are some things like this in a Flex Builder project called Modest Maps Examples included in the source repository. And I'm interested in having things available for myself that make this sort of thing easier too.
I've posted an example at http://blog.modestmaps.com/2009/02/he... that's extremely simple, but it's easy to adapt to an infobubble that could also contain text, images etc.
As for why not addChild, if anything I think it was a mistake to add MarkerClip to Map at all. It should be completely separate functionality and only talk to Map via MapEvents. Overloading addChild for markers would be bad - there's quite a lot of complicated stuff that happens in MarkerClip to keep things off the stage unless they're visible... conflating that behaviour with the default behaviour of addChild would be confusing. Better that addChild does what it does with regular Flash DisplayObjects and putMarker (or attachMarker, sorry for the inconsistency) is the function you call to hand over responsibility for adding/removing as necessary.
Hope that makes sense! Let me know if you have any specific questions about the infobubble example and I'll try to help out as best I can. But in the short term it's unlikely we'd add anything like this to the library: we're expecting custom implementations of this kind of thing and Google, Yahoo and UMapper provide libraries for people who want out of the box functionality already.
RandomEtc replied on September 02, 2009 20:31 to the idea "Use flash 10 upgrades to increase perf ?" in Modest Maps:
It's definitely an attractive feature. The looping doesn't really take up much time though - I've timed it to less than 10ms per frame at its heaviest, and mostly 1ms. This makes sense when you consider that most of the arrays and dictionaries Modest Maps uses contain less than 100 things. And matrix maths is fast too.
The biggest overhead is rendering, and I'm interested in rearranging our use of the display list to keep that overhead to a minimum, but that wouldn't really need Flash 10.
Something you might want to try is to copy MarkerClip to MarkerClipTen and change the Arrays it uses into Vectors. I imagine for maps with lots of markers that it would help to have those loops run quicker when panning and especially when animating a zoom.
RandomEtc replied on September 01, 2009 17:23 to the problem "Flash example doesn't compile in Flash CS4" in Modest Maps:
Hi,
This is my fault, sorry. The three errors above can be corrected in ModestMapsSample.as by changing the following values:
MarkerEvent.CLICK should be MarkerEvent.MARKER_CLICK
MarkerEvent.ROLL_OVER should be MarkerEvent.MARKER_ROLL_OVER
MarkerEvent.ROLL_OUT should be MarkerEvent.MARKER_ROLL_OUT
This is to avoid clashes (and event type errors) if you're also listening for MouseEvents on the same map.
We'll try to update the downloads soon - thanks for letting us know.
A comment on the question "How to have a loading bar for ModestMap?" in Modest Maps:
Right! Good stuff. Thanks for the speedy response. We're digging around TileGrid quite a bit in the new Google Code repository. It's not currently getting any cleaner, but it really should soon. Watch this space! – RandomEtc, on August 26, 2009 02:46
A comment on the question "How to have a loading bar for ModestMap?" in Modest Maps:
What modification did you make? Was something wrong, or was it just to get it working with the Flex ProgessBar? – RandomEtc, on August 26, 2009 02:20
| next » « previous |
Loading Profile...




