Recent activity
Subscribe to this feed
Jay Wood replied on June 11, 2009 20:42 to the question "Starting in Flex!" in Modest Maps:
Paige,
If you remove the reference to MMTest from your MM library project that should get rid of the "cycle was detected" error -- the library does not need to point to the projects that use it. Until you fix that, MMTest will not even compile -- probably what you are seeing (with the gray box) is an earlier compilation of the code, i.e. before you included mapping.
Post again if that doesn't fix it -- I have been using MM with Flex for quite a while, and would be happy to guide you through it ( btw, I too work for a newspaper -- we gotta stick together ;-)
Jay
A comment on the question "Adding markers in Flex" in Modest Maps:
Homer: correct, there is no putMarker method available on MapComponent, so you have to drill down to get to the underlying Map object (MapComponent is just a Flex-friendly(ish) wrapper for the real Map object). Sounds like you are getting the hang of it, but feel free to contact me directly if you get stuck again... I've probably been there. Jay (jay.wood@uniontrib.com). – Jay Wood, on May 05, 2009 00:48
A comment on the question "Adding markers in Flex" in Modest Maps:
Homer: hard to say without seeing your code (can you post it?)... one possibility is if you mistakenly try to set zoom and center on an instance of Map instead of MapComponent, since Map does not provide setters for those properties. – Jay Wood, on May 04, 2009 21:19
A comment on the question "Adding markers in Flex" in Modest Maps:
homer: here's what I did to make flex markers work:
changed the class declaration from "extends Sprite"
to "extends UIComponent" in two classes:- com.modestmaps.Map and
- com.modestmaps.overlays.MarkerClip
- added "import mx.core.UIComponent" to both classes.
Good luck! – Jay Wood, on May 04, 2009 17:23
Jay Wood replied on March 26, 2009 19:14 to the discussion "AS3 tweening branch has been merged onto trunk!" in Modest Maps:
Thank you for all the hard work of bringing us TweenMap -- love the smooth animation!!
FYI, I just converted a Flex project to use it... the conversion was incredibly simple, took about 5 minutes, tops. All I had to do was change the type of _map var in MapComponent.as from Map to TweenMap, with corresponding changes to import TweenMap and instantiate it.
Jay Wood replied on March 16, 2009 20:00 to the question "Adding markers in Flex" in Modest Maps:
I am able to use Flex-component-based markers with a couple of minor changes to the ModestMaps code (svn trunk, r 773) -- changed the declaration of com.modestmaps.Map and com.modestmaps.overlays.MarkerClip to extend mx.core.UIComponent instead of flash.display.Sprite.
Note, I have not done much testing on this and it changes the ModestMaps core so it's no longer compatible with pure ActionScript projects -- but in the limited use case of my current project, this was an easy fix that does the job.
Jay Wood replied on February 23, 2009 18:23 to the problem "Map display does not always update on MapComponent set center" in Modest Maps:
Makes sense, thanks Daaave for pointing that out.
So, the new improved fix gets rid of the listener for EXTENT_CHANGED, and instead calls onRender() immediately after changing the map's center -- but I found I needed to use callLater() to defer the onRender call a bit, allowing time for the map to update.
Sample code is posted at http://interactives.signonsandiego.co...
Jay Wood replied on February 19, 2009 20:53 to the problem "Map display does not always update on MapComponent set center" in Modest Maps:
Okay, I've come up with a code hack -- not pretty, but it seems to work.
I believe the problem boils down to a bug in Flex (or maybe the Flash player -- see http://www.betriebsraum.de/blog/2007/11/03/stageinvalidate-and-eventrender-for-ui-elements/)...TileGrid.onRender() is not getting called reliably after every change to the map. My hack/work-around is:
-- changed access to public on TileGrid.onRender().
-- added a listener in my Flex app for MapEvent.EXTENT_CHANGED;
the handler calls mapComponent.map.grid.onRender() to force a re-draw.
Anybody have a better idea? Seems like there should be a way to force Flex to dispatch Event.RENDER, but I have not found it (tried calling stage.invalidate() in my event handler, but it had no effect).
The fixed version is posted at interactives.signonsandiego.com/MMTest/fixed
Many thanks to RandomEtc for pointing me in the right direction!
Jay Wood replied on February 19, 2009 19:01 to the problem "Map display does not always update on MapComponent set center" in Modest Maps:
I added trace statements to my code for MapEvents (>>> event.type), in addition to traces already in MapComponent.commit properties...
Trace output after the first click, which fails to re-draw the map:
commitProperties() myMap
* zoom is dirty...
* center is dirty...
>>>extentChanged
After the second click, which DOES re-draw:
commitProperties() myMap
* zoom is dirty...
* center is dirty...
>>>extentChanged
>>>rendered
>>>rendered
It seems like a timing issue, especially since it seems to dispatch the first MapEvent.RENDERED event after the second click; if I click and hold on the item for a second before releasing, it always renders correctly.
Jay Wood replied on February 19, 2009 18:51 to the problem "Map display does not always update on MapComponent set center" in Modest Maps:
I appreciate the quick reply... sorry about the messy code paste. I've posted my test code, with source-view enabled, at:
http://interactives.signonsandiego.com/MMTest/
I'll do some further debugging with MapComponent per your suggestions, and post back here if I figure anything out. Thanks!
Jay Wood replied on February 19, 2009 17:26 to the problem "Map display does not always update on MapComponent set center" in Modest Maps:
Jay Wood reported a problem in Modest Maps on February 19, 2009 04:05:
Map display does not always update on MapComponent set centerI have a list of lat/lon locations in a Flex DataGrid, with a click handler on the grid that calls MapComponent's set center method to re-center the map on the selected location. Sometimes this works, but often the display fails to update until you click the datagrid a second time. Alternatively, I found that simply mousing over another Flex control (like a button, checkbox, or silder) after making the datagrid selection will also trigger an update to center the map on the correct location.
I've tried it with the latest svn trunk version (AS3 r 767), and the zipfile swc (ModestMaps-AS3-1.0-r749), with the same result. I tested with an old swc from a prior project (1+ yr old), and the problem did not surface.
Below is a simple MXML example that demonstrates the issue... thanks for any help you can offer... this one is driving me nuts!
Jay W
<?xml version="1.0" encoding="utf-8"?>
<mx:application>
<modest:mapcomponent height="400" width="400">
<!-- displays a list of sample locations; click should center the map on that location -->
<mx:datagrid width="300">
<mx:columns>
<mx:datagridcolumn width="100">
</mx:datagridcolumn><mx:datagridcolumn>
</mx:datagridcolumn></mx:columns>
</mx:datagrid>
<mx:script>
<![CDATA[
import com.modestmaps.geo.Location;
import mx.collections.ArrayCollection;
//sample locations to plot (San Diego county)
private static const locations:ArrayCollection = new ArrayCollection([
{name:"San Diego", loc:"32.715685,-117.161724"},
{name:"La Jolla", loc:"32.83746,-117.271539"},
{name:"Del Mar", loc:"32.954892,-117.263482"},
{name:"Chula Vista", loc:"32.640565,-117.084154"},
{name:"El Cajon", loc:"32.79495,-116.959469"}
]);
[Bindable] private var centerLocation:Location = new Location(33,-117);
// centers the map on the point selected in data grid
private function setLocation():void
{
myMap.center = locationsDG.selectedItem.loc.toString();
myMap.zoom = 14;
}
]>
</mx:script>
</modest:mapcomponent></mx:application>
Jay Wood replied on July 02, 2008 16:39 to the question "How can I get access to contribute changes/enhancements to modest maps svn repository?" in Modest Maps:
Yesterday's post did not include the html_template directory, so after import it needed a Project > clean, and rebuild of the directory. I just posted a new version that includes that directory, the following should work:
-- download source zip
-- in Flexbuilder 3, File > Import > Flex Project
-- browse to the zipfile (MMPolylineDemo.zip)
-- Finish
Jay Wood replied on July 02, 2008 00:23 to the question "How can I get access to contribute changes/enhancements to modest maps svn repository?" in Modest Maps:
Mark -- excellent idea... here it is:
http://interactives.signonsandiego.co...
Source view is enabled.-
Jay Wood started following the question "Is there some kind of WMS Map Provider for modest maps? (AS3)" in Modest Maps.
-
Jay Wood started following the question "Is there some kind of WMS Map Provider for modest maps? (AS3)" in Modest Maps.
Jay Wood replied on June 24, 2008 19:28 to the question "Help with the Overlay Use" in Modest Maps:
I have posted my code changes for PolylineOverlay on google code, http://code.google.com/p/modestmaps-c.... Includes an svn repository (http://modestmaps-custom.googlecode.c...), and a sample Flex project to demo the features.
Jay Wood replied on June 24, 2008 19:26 to the question "How can I get access to contribute changes/enhancements to modest maps svn repository?" in Modest Maps:
I have posted my code changes for PolylineOverlay on google code, http://code.google.com/p/modestmaps-c.... Includes an svn repository (http://modestmaps-custom.googlecode.c...), and a sample Flex project to demo the features.
Jay Wood asked a question in Modest Maps on June 19, 2008 23:03:
How can I get access to contribute changes/enhancements to modest maps svn repository?I have been working on adding PolylineOverlay support to ModestMaps... how can I get access to add my changes to the svn repository?
Jay Wood replied on June 09, 2008 20:17 to the question "Help with the Overlay Use" in Modest Maps:
Sorry it has taken me a while to reply... Yes I am happy to share my code. Send me your email address and I will forward the code.
jay.wood@uniontrib.com
| next » « previous |
Loading Profile...
