Re: [OpenMap Users] Screen not refreshing after changes

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Wed, 18 Mar 2015 13:45:17 -0400

Hi Gary,

I updated the CSVLocationHandler in 5.1.10 (didn’t see the change log entry for this, I need to add it) to make it a lot easier to override and create any OMGraphics you want based on the contents of the cvs file. You can override the createLocation(double lat, double lon, String name, String iconURL, List recordList) method and use any entry in the recordList to affect the OMGraphic creation and rendering parameters. So I didn’t incorporate your changes, per se, but I changed the overall API to make it easier for anyone to make any modification they need.

Come to think of it, I think I was still working on the DBLocationHandler modifications, which might be why I didn’t update the CHANGELOG. I’ll have to look into that too.

Hope that helps,

Don


> On Mar 14, 2015, at 7:47 PM, Gary Briggs <chunky_at_icculus.org> wrote:
>
> Afternoon
>
> Quick first question: With the demise of google code, are you planning
> on migrating to github or other repo anytime soon?
> ref: http://google-opensource.blogspot.co.uk/2015/03/farewell-to-google-code.html
>
> Now the real question:
> I'm currently using openmap-5.1.10 embedded a mapbean in my application.
> Here's a mostly-simplified code example showing the issue:
>
> // Previously:
> OverlayMapPanel mp = new OverlayMapPanel();
> LayerHandler lh = new LayerHandler();
> mp.getMapHandler().add(lh);
>
>
> OMGraphicHandlerLayer layer = null;
> public void doThings() {
> if(null == layer) {
> layer = new OMGraphicHandlerLayer();
> Properties props = new Properties();
> props.setProperty("prettyName", "Blah");
> layer.setProperties(props);
> }
>
> lh.removeLayer(layer); // First time through will do nothing
>
> OMGraphicList gl = new OMGraphicList();
> // Do a whole bunch of gl.add(new OMText(...)) and gl.add(new OMPoint(...))
> layer.setList(gl);
>
> lh.addLayer(layer, 0); // HERE
> }
>
> The first time through this code, everything works perfectly.
> On second and subsequent times through, the layer doesn't appear on the
> map until I resize or zoom the map window. I tried a number of different
> ways to force a repaint [including moving the map center away and then
> back again immediately], but none of them seem to work.
>
> Please could I get some direction on what's going wrong? I've tried
> without the remove/add, but it didn't make a difference.
>
> Gary
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe openmap-users"]

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Mar 18 2015 - 13:48:01 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT