Brandon Opfermann
2009-Feb-12 18:17 UTC
[Mapstraction] Patch to handle MapQuest icon size and icon anchor parameters
This is a patch we had to implement to use custom icons in mapquest. We needed to use a custom icon size and offset, so I added a small bit of code to handle this. We use MapQuest API v5.3. That may make this not work in all cases, I know the icon stuff changed somewhat between 5.2&5.3. To make work on MapQuests 5.2 API, I *think* would only take the following conversions. 1) MapIcon -> Icon 2) mqmarker.setValue(''iconOffset'', new MQA.Point(x,y)); -> icon.setAnchorOffset(new MQA.Point(x,y)); based on http://developer.mapquest.com/content/documentation/ApiDocumentation/53/JavaScript/JS_DeveloperGuide_v5.3.0.1.htm#styler-id1.6.5 Since I am only able to test using the 5.3, I am going to post the diff to make that work. svn diff is attached. Thanks, Brandon Opfermann Entertainment Publications -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mapstraction.js.svndiff URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090212/7ef894fe/attachment.txt>