Recent activity
Subscribe to this feed
Opa replied on January 26, 2009 06:54 to the update "No more support for Google tiles in Modest Maps" in Modest Maps:
Opa replied on December 22, 2008 07:40 to the update "No more support for Google tiles in Modest Maps" in Modest Maps:
Hi, TileGrid works as a integration link between MM and G Maps. Since it's not allowed to use Google's tiles directly, we are using Google's Flash API to do the job. Because we want to use MM for everything else (including drawing polygon overlays, navigator window etc) with Google tiles, we needed this "hack" :) This way we can also insert Google API key to AS code, and also if API is updated (like it seems to do couple times in a month), it's updated also (I thinkg Google Flash API dynamically loads modules that are responsible for requesting tiles).
About the overridden TileGrid, we are using com.google.maps.interfaces.ITileLayer inside custom TileGrid to handle the requests, here's the important part:
override protected function loadNextURLForTile(tile:Tile):void
{
var coord:Coordinate = layersNeeded[tile.name].copy();
if (coord) {
try
{
coord = provider.sourceCoordinate(coord);
var content:DisplayObject = tileLayer.loadTile(new Point(coord.column, coord.row), coord.zoom);
tile.addChild(content);
}
catch(error:Error) {
trace("Error: " + error.message);
tile.paintError();
}
if (tile.zoom == currentTileZoom) {
tile.show();
}
else {
tile.showNow();
}
tileCache.putTile(tile);
delete layersNeeded[tile.name];
}
}
Opa replied on December 22, 2008 06:32 to the update "No more support for Google tiles in Modest Maps" in Modest Maps:
Opa replied on December 10, 2008 07:58 to the discussion "Google,Flash and Modest Maps, what's next?" in Modest Maps:
Opa replied on December 03, 2008 11:29 to the question "Right to download Tiles" in Modest Maps:
Well, it seems that Google does not allow direct use of tiles, not event in case of Googles Enterprise/premiere license. Here's short answer from Google:
"As far as I understand you would manage the map tiles directly instead of using the Google Flash API. It is not permitted by the terms and conditions of the free and the Premier license"
Opa replied on September 12, 2008 13:18 to the question "mxml component marker" in Modest Maps:
Opa replied on September 12, 2008 05:49 to the idea "How to layer two maps with different providers (for blending, alpha transparency, etc)" in Modest Maps:
Hi, I tried to use your example in flex code, but I got error:
TypeError: Error #1009: Cannot access a property or method of a null object reference which comes from here: stage.align = StageAlign.TOP_LEFT;
it seems that stage is null.
I'm sorry this must be a newbie problem , I'm trying to create two layered map, I have class name LayersTest (which has code you posted above), and in my flex xml I'm calling init()-method (applicationComplete="init();") which contains addChild(new LayersTest()).
Opa replied on September 11, 2008 12:18 to the idea "simple, working WMS overlays (over commerical mapproviders)" in Modest Maps:
Hi again, one more question about using url array in getTIileUrls method.It seems that tile is not rendered until both urls are loaded. It would be very nice if urls are handled separately as own thread. I'm not sure if my explanation makes any sense, but here's example. As said earlier, I'm using Yahoo Road as base "background" map, and wms map on top of it. In my situation, wms tiles are mostly transparent and only some areas are rendered. My wms server happens to be a bit slow :) On these transparent areas it would be nice if Yahoo is first loaded and visible, and after that at some point wms tile is rendered on top of it. Now, Yahoo background is not rendered until wms tile is ready.
Cheers
Olli
Opa replied on September 11, 2008 09:04 to the idea "simple, working WMS overlays (over commerical mapproviders)" in Modest Maps:
I tested wms overlay with Microsoft road, and tiles are perfectly aligned.
So it seems that Yahoo's 258px tiles are causing the problem. I'm able to use Yahoo as background if I change my wms request so that it will also return 258px sized tiles. So I'm happy with current Yahoo provider :)
Thanks for the tip!
Opa replied on September 11, 2008 06:16 to the idea "simple, working WMS overlays (over commerical mapproviders)" in Modest Maps:
Hi Thanks for the reply RandomEtc,
Yes, I noticed that implementing custom mapprovider is now much easier and that's great. Setting tile alpha is not a problem, since I achieve that by letting mapserver to do that also.
Actually, I did try to do like you suggested, return two URL in array. There's a strange problem with aligning tiles, I'm using Yahoo road and ArcGis mapserver: when tiles are loading, sometimes some tiles are not aligned on top of each other properly, here's a screen shot

What is more stranger, that small offset happens when I'm panning the map, and disappears again with just a small amount of pan. Here's same spot after a small panning, as you can see the gap is gone:

This must have something to do with my custom overaly, I tried to overlay Yahoo road and Yahoo aerial, and it worked fine.
I just have no idea what could cause this :)
Anyways, thanks for the great product, I'm really looking forward to see how Modest Map evolves! In my opinion MM is the best open source AS3 / Flex mapping framework at the moment!
Opa replied on September 10, 2008 12:15 to the idea "simple, working WMS overlays (over commerical mapproviders)" in Modest Maps:
Hi brentb, thanks for overaly wms sample code! I made similar map where I'm using Yahoo Road as "base" map, and WMS overlay on top of it.
Overlaying WMS tiles over Yahoo was very easy, just override paint method of AbstractImageBasedMapProvider class.
Well, I then took update from SVN and noticed that code base has changed quite a lot! There's no AbstractImageBasedMapProvider nor paint method to override :(
Do you have any idea how to overlay WMS tiles in current version of Modest Maps?
I would like to work with current code base since there are other nice features but I would love to see an example of overlaying wms tiles also.
Here's my paint method, notice that I also set WMS tile alpha to 0.7 which was also nice about older code base.
override public function paint(sprite:Sprite, coord:Coordinate):void
{
var request:MapProviderPaintThrottledRequest = null;
var bg:Sprite = new Sprite();
bg.name = "bg";
sprite.addChild(bg);
request = new MapProviderPaintThrottledRequest(bg, getYahooTileUrl( coord ), coord );
request.addEventListener(ThrottledRequestEvent.REQUEST_ERROR, onRequestError);
request.addEventListener(ThrottledRequestEvent.RESPONSE_COMPLETE, onResponseComplete);
request.addEventListener(ThrottledRequestEvent.RESPONSE_ERROR, onResponseError);
request.send();
bg.x = bg.y = -.5;
var wms:Sprite = new Sprite();
wms.name = "wms";
wms.alpha = 0.5;
sprite.addChild(wms);
request = new MapProviderPaintThrottledRequest(wms, getWMSTileUrl( coord ), coord );
request.addEventListener(ThrottledRequestEvent.REQUEST_ERROR, onRequestError);
request.addEventListener(ThrottledRequestEvent.RESPONSE_COMPLETE, onResponseComplete);
request.addEventListener(ThrottledRequestEvent.RESPONSE_ERROR, onResponseError);
request.send();
wms.x = wms.y = -.5;
createMask( sprite );
}
Opa replied on June 30, 2008 09:08 to the question "Is there some kind of WMS Map Provider for modest maps? (AS3)" in Modest Maps:
Opa replied on June 30, 2008 07:44 to the question "Help with the Overlay Use" in Modest Maps:
Hi Jay, that's a great project, keep up the good work :) Are you planning to implement also Point and other types of features, Lines etc? Polygon is a good start but it would be great to have others as well. I have used OpenLayers Javascript client previously, it has very good support for drawing geographical shapes to the map and also provides basic methods to measure distance, areas and so on. I'm intrested in Flex based client since it could provide more complex ui opertations and richer user experience.
JSON format could be creat to have as overaly "datasource". Please take a look at GeoJSON specification, it defines all different vector types and basic properties and it is light weight: http://wiki.geojson.org/Main_Page.
I'm not sure if Flex 3 supports already JSON parsing, but I guess it shouldn't be problem.
Cheers
Olli Varis
Opa replied on May 22, 2008 08:41 to the question "Is there some kind of WMS Map Provider for modest maps? (AS3)" in Modest Maps:
Loading Profile...
