A cool new evony map tool
Posted by: merkavah in Community Tools, tags: alliance coordinates, Evony, EvonyMap.com, google maps, mapI have written an evony map tool using the google maps api (please don’t try this at home, you will get injured. I’m a professional). It will be released soon on evonynet. The plan is to have players specify their city locations and their alliance names and to show them where everyone is, with associated distances. Let me know what you think about the idea, and what else you’d like to add to it.
Here are the resources I used for the buggy and poorly documented google maps api:
- http://code.google.com/apis/maps/documentation/ - The official google maps api site, dah! Use version two of the maps api. As of this writing, version 3 does not support customizing your maps, and it has a huge api change. Why would they release it at all?
- Beginning Google maps applications with PHP and AJAX – If you can’t bother buy that book, google books has enough free excerpts to make it worth your while! It’s seems like a great book for google maps.
- http://econym.org.uk/gmap/ – despite how it looks it’s an awesome resource with lots of working examples you wouldn’t find anywhere else!
Pitfalls to watch out for (if you don’t know what I’m talking about ignore it):
- Even though the function GProjection.getWrapWidth(zoom) returns Infinity by default to indicate no wrapping, if you actually use that value Google will decide to play practical jokes on you as you zoom in or out. Oh, did I mention you can’t debug the api properly since it fails on some obscure google code (with generic variable names like a, b, c).
- Google maps actually only support zoom x2, you can’t use any other zoom! That’s because when you zoom in, google magnifies the current map by 2 and then fades to the loaded new map.
- Well documented bug: you need 18 levels of zoom to get polylines working with google maps. You basically need a map as detailed as the satellite map google has to get 2^18 resolution. Evony has 8 levels – I can show you the math. Seriously, I’ve done it. I just don’t want to bore myself to death by copying it here. I fell asleep 4 times just writing it out – it’s barely grade 2 equations.
- Evony map is not square, a google map tile is. So when you zoom out to one square you have to use png transparency.
- Did you know that you can write scripts for photoshop? There is a cool script for cutting a map to general google map tiles! I’m sure it’s in my 3rd link somewhere, I’m just too lazy to post it here, sorry! Don’t hate me please. Write if you’re desparate and I’ll send it to you. I might even post the link here.
















Entries (RSS)