On 20 February 2013 19:52, Kevin Meyer <[email protected]> wrote:

> Hi Dan (I guess you're the best to answer this),
>
> I'm working from memory, so I might have the name of the interface wrong...
>
> How much effort is required to extend the Locatable functionality to
> generic 2D image-based "maps"? I'm thinking of an application whereby I'd
> like to render items placed on something like a floor plan (the floor plan
> would basically be a bitmap image, possibly a vector image. Svg?).
>

You could probably carry on using Locatable (it's just two doubles for
latitude and longitude).  The larger piece of work is in writing the Wicket
Component that will grab the appropriate images and render them.
 Obviously, the googlemaps "gmap3" API makes that easy to do.  Rendering on
top of floorplans sounds like it would require you to write a lot more
custom code.  Having said that, if you have a javascript library then it
(seems to be) pretty easy to make Wicket work with JS.

If you look at the github repos [1], [2], [3] you'll see what's involved in
writing a Wicket Component.  The component automatically registers with
Isis by virtue of a bit of metadata in META-INF.



> Sticking to the floor plan concept, only certain items are actually on a
> given floor, so the extension would need a way to specify "on map Z @
> location X,Y" (where Z is approximately equivalent to a single floor in a
> multilevel building). Then have the entities available as interactive
> Pojo's, just as if they were rendered in a list..
>

In this case I think you ought to create your own equivalent of Locatable,
with that z axis.  You'll then want to have your own implementation of
"appliesTo" in the ComponentFactory for your component (again, see [1],
[2], [3]).  It's just a chain-of-responsibility pattern so all quite
straightforward.

HTH
Dan

[1] https://github.com/danhaywood/isis-wicket-gmap3
[2] https://github.com/danhaywood/isis-wicket-wickedcharts
[3] https://github.com/danhaywood/isis-wicket-fullcalendar



> Last time I looked, your wicket "locatable" was backed by google maps?
> --
> Sent from my phone with K-9 Mail.
> Please excuse my brevity.
>

Reply via email to