You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Christoph Glass <ma...@googlemail.com> on 2011/01/15 14:03:25 UTC

Help with ClientSideImageMap needed

Hello,

could please any of you provide a working example with ClientSideImageMap?
I dont get it to work, there are no error messages, the page leaves blank.

My code example:

Java:

add(getPlzMap("plzmap");

private ClientSideImageMap getPlzMap(String id)
{
ClientSideImageMap csim=new ClientSideImageMap(id, new Image("map",new
ResourceReference(PlzMapTestPage.class, "map.jpg")));
 Map<String, Boolean> customMap=getCustomPlzMapData(getPlzByAdressid());
Map<String, int[]> defaultData=getDefaultPlzMapData();
 Iterator<String> cmksi=customMap.keySet().iterator();
while(cmksi.hasNext())
{
String key=cmksi.next();
if(defaultData.containsKey(key))
{
IndicatingAjaxLink<Object> link=getLink(key.replaceAll(",", ""),
key.split(","), customMap.get(key));
csim.addPolygonArea(link, defaultData.get(key));
}
}
 return csim;
}

HTML:

<wicket:panel>

<p>Plz Map Test</p>
 <map wicket:id="plzmap" />

</wicket:panel>

Thank you and best regards
Christoph

Re: Help with ClientSideImageMap needed

Posted by Christoph Glass <ma...@googlemail.com>.
Thank you, this hint was very helpful, I was able to solve the problem.

Best regards
Christoph


On Sat, Jan 15, 2011 at 2:59 PM, Martin Grigorov <mg...@apache.org>wrote:

> Check in wicket-examples.jar
> : org.apache.wicket.examples.linkomatic.Home.Home()
>
> On Sat, Jan 15, 2011 at 2:03 PM, Christoph Glass <
> mail.kaffeeserver@googlemail.com> wrote:
>
> > Hello,
> >
> > could please any of you provide a working example with
> ClientSideImageMap?
> > I dont get it to work, there are no error messages, the page leaves
> blank.
> >
> > My code example:
> >
> > Java:
> >
> > add(getPlzMap("plzmap");
> >
> > private ClientSideImageMap getPlzMap(String id)
> > {
> > ClientSideImageMap csim=new ClientSideImageMap(id, new Image("map",new
> > ResourceReference(PlzMapTestPage.class, "map.jpg")));
> >  Map<String, Boolean> customMap=getCustomPlzMapData(getPlzByAdressid());
> > Map<String, int[]> defaultData=getDefaultPlzMapData();
> >  Iterator<String> cmksi=customMap.keySet().iterator();
> > while(cmksi.hasNext())
> > {
> > String key=cmksi.next();
> > if(defaultData.containsKey(key))
> > {
> > IndicatingAjaxLink<Object> link=getLink(key.replaceAll(",", ""),
> > key.split(","), customMap.get(key));
> > csim.addPolygonArea(link, defaultData.get(key));
> > }
> > }
> >  return csim;
> > }
> >
> > HTML:
> >
> > <wicket:panel>
> >
> > <p>Plz Map Test</p>
> >  <map wicket:id="plzmap" />
> >
> > </wicket:panel>
> >
> > Thank you and best regards
> > Christoph
> >
>

Re: Help with ClientSideImageMap needed

Posted by Martin Grigorov <mg...@apache.org>.
Check in wicket-examples.jar
: org.apache.wicket.examples.linkomatic.Home.Home()

On Sat, Jan 15, 2011 at 2:03 PM, Christoph Glass <
mail.kaffeeserver@googlemail.com> wrote:

> Hello,
>
> could please any of you provide a working example with ClientSideImageMap?
> I dont get it to work, there are no error messages, the page leaves blank.
>
> My code example:
>
> Java:
>
> add(getPlzMap("plzmap");
>
> private ClientSideImageMap getPlzMap(String id)
> {
> ClientSideImageMap csim=new ClientSideImageMap(id, new Image("map",new
> ResourceReference(PlzMapTestPage.class, "map.jpg")));
>  Map<String, Boolean> customMap=getCustomPlzMapData(getPlzByAdressid());
> Map<String, int[]> defaultData=getDefaultPlzMapData();
>  Iterator<String> cmksi=customMap.keySet().iterator();
> while(cmksi.hasNext())
> {
> String key=cmksi.next();
> if(defaultData.containsKey(key))
> {
> IndicatingAjaxLink<Object> link=getLink(key.replaceAll(",", ""),
> key.split(","), customMap.get(key));
> csim.addPolygonArea(link, defaultData.get(key));
> }
> }
>  return csim;
> }
>
> HTML:
>
> <wicket:panel>
>
> <p>Plz Map Test</p>
>  <map wicket:id="plzmap" />
>
> </wicket:panel>
>
> Thank you and best regards
> Christoph
>