No more support for Google tiles in Modest Maps
At the request of the Google Maps team, I've removed support for Google Maps from all the Modest Maps libraries in our subversion repository and will shortly be updating the modestmaps.com homepage to stop claiming support for Google Maps tiles. A new downloadable archive of Modest Maps will also be posted. The list of affected files can be viewed at
http://modestmaps.mapstraction.com/tr...
In case you're wondering, the request was very friendly and polite and we can't see a good reason not to comply with it. Google has their own Flash library now (http://code.google.com/apis/maps/docu...) and although we'd love to be able to use their map tile images in Modest Maps it's not something they want to support right now.
This is a very hot topic at the moment because it also affects people wanting to write their own Google Maps code for platforms such as the iphone. If you want to let Google know about your support for this kind of feature, please vote on this issue at http://code.google.com/p/gmaps-api-is...
Thanks,
Tom.
http://modestmaps.mapstraction.com/tr...
In case you're wondering, the request was very friendly and polite and we can't see a good reason not to comply with it. Google has their own Flash library now (http://code.google.com/apis/maps/docu...) and although we'd love to be able to use their map tile images in Modest Maps it's not something they want to support right now.
This is a very hot topic at the moment because it also affects people wanting to write their own Google Maps code for platforms such as the iphone. If you want to let Google know about your support for this kind of feature, please vote on this issue at http://code.google.com/p/gmaps-api-is...
Thanks,
Tom.
Follow this update to get notifications on your dashboard.
-
Inappropriate?Hi, we are using Google Maps Flash API with Modest Maps. Google's api is responsible for handling request to tile server,the rest is done with MM. What we needed was a custom TileGrid implementation and it works just fine.
-
Inappropriate?Hi Opa,
That sounds really useful! Can you explain more about how it works, what the TileGrid gives you that Google Maps doesn't, and maybe post some code so we can see how it's done?
I’m intrigued
-
Inappropriate?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];
}
}
-
I just wanted to say thanks for alerting us to this technique. We're planning on modifying the TileGrid to make this method pluggable in the near future. -
Sounds like a great technique. Can you provide a little more detail on exactly what's required to get this working. Full code example would be ideal. -
Inappropriate?NP! We are using MM and Google this way and it really saved project of ours :)
-
Nickyro - Opa's code above shows how to use a tile layer object from the Google Maps API to paint tiles in Modest Maps. If you are having trouble with this method, please tell us what the error is so we can try and help. Feel free to start another topic for your problem. -
do you have some example code how to do that? -
Inappropriate?RandomEtc, thanks for your replay. I am very glad to see this forum is still "animated" by interested people, because a lot of comments are from few months or years ago. Anyway, that's not just a good job what you are doing there, that's a great job. Congratulations.
And now, I have to implement a simple project using a WMS. I have started using openlayers js library and flex, a mix combination between actionscript, flex and javascript, knowing nothing about modest maps or something like that till now. Making some real tests I have changed my options to modest maps, even it is still under development. In my work I have just implemented some modules of this project, modules that use a proper WMS, creating some specific MapProviders and it works like a charm. But I want to offer in the same project a solution to use Google Map, like an user's alternative option, using in the same time Modest Maps.
I want to use Google Maps API for tiles, and Modest Maps for everything else, but I am a beginner in flex and actionscript, and even I can modify your source code I don't enough experience how to change implementation as to fulfill that. I request some more details and how to do that, because I have decompiled swc google map file and it seems being crypt, or I am wrong?
Thank you
-
Have you solved it? I like Modest Maps, but I have to use maps from Google. I think in the end it's better using Google Map API for flex than using something untested.
Loading Profile...



EMPLOYEE




