gmap3 wicket component · 2019-01-16 · screenshots the module’s functionality can be explored...

12
GMap3 Wicket Component

Upload: others

Post on 18-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

GMap3 Wicket Component

Table of ContentsScreenshots 2

Parented collection as gmap 2

Update location using service 3

Standalone location as gmap 4

Click through 4

API amp Usage 6

Rendering objects on a map 6LocationDereferencingService 6

How to configureuse 8

Classpath 8

Bootstrapping 8

Configuration Properties 8

Known issues 9

Dependencies 10

This component (isis-wicket-gmap3) allows an entity or collection of entities tobe rendered within a map (using googlersquos gmap3 API)

1

ScreenshotsThe modulersquos functionality can be explored by running the quickstart with example usage using theorgincodedomainappexampleappmodulesExampleDomWktGmap3AppManifest

Note that the isisviewerwicketgmap3apiKey must be set to a valid value this is most easily doneusing a system property

A home page is displayed when the app is run

Parented collection as gmapThe todo itemrsquos collection contains a list of Locatable entities (also todo items) this is indicatedthrough a button to switch the view

2

Clicking the button shows the same entities on a gmap3

Update location using serviceThis module previously provided a LocationLookupService This has been removed since theunderlying gmap3 geocoding service requires an apiKey A similar GeocodingService providing asuperset of functionality is available in commchannel module (though this may move into its ownlibrary in the future see 57)

3

Standalone location as gmapInvoking an action that returns a list of Locatable entities also results in the button to view in agmap3

which then renders the items in a map Note the tooltips

Click throughClicking on a map marker drills down to the entity

4

5

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 2: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

Table of ContentsScreenshots 2

Parented collection as gmap 2

Update location using service 3

Standalone location as gmap 4

Click through 4

API amp Usage 6

Rendering objects on a map 6LocationDereferencingService 6

How to configureuse 8

Classpath 8

Bootstrapping 8

Configuration Properties 8

Known issues 9

Dependencies 10

This component (isis-wicket-gmap3) allows an entity or collection of entities tobe rendered within a map (using googlersquos gmap3 API)

1

ScreenshotsThe modulersquos functionality can be explored by running the quickstart with example usage using theorgincodedomainappexampleappmodulesExampleDomWktGmap3AppManifest

Note that the isisviewerwicketgmap3apiKey must be set to a valid value this is most easily doneusing a system property

A home page is displayed when the app is run

Parented collection as gmapThe todo itemrsquos collection contains a list of Locatable entities (also todo items) this is indicatedthrough a button to switch the view

2

Clicking the button shows the same entities on a gmap3

Update location using serviceThis module previously provided a LocationLookupService This has been removed since theunderlying gmap3 geocoding service requires an apiKey A similar GeocodingService providing asuperset of functionality is available in commchannel module (though this may move into its ownlibrary in the future see 57)

3

Standalone location as gmapInvoking an action that returns a list of Locatable entities also results in the button to view in agmap3

which then renders the items in a map Note the tooltips

Click throughClicking on a map marker drills down to the entity

4

5

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 3: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

This component (isis-wicket-gmap3) allows an entity or collection of entities tobe rendered within a map (using googlersquos gmap3 API)

1

ScreenshotsThe modulersquos functionality can be explored by running the quickstart with example usage using theorgincodedomainappexampleappmodulesExampleDomWktGmap3AppManifest

Note that the isisviewerwicketgmap3apiKey must be set to a valid value this is most easily doneusing a system property

A home page is displayed when the app is run

Parented collection as gmapThe todo itemrsquos collection contains a list of Locatable entities (also todo items) this is indicatedthrough a button to switch the view

2

Clicking the button shows the same entities on a gmap3

Update location using serviceThis module previously provided a LocationLookupService This has been removed since theunderlying gmap3 geocoding service requires an apiKey A similar GeocodingService providing asuperset of functionality is available in commchannel module (though this may move into its ownlibrary in the future see 57)

3

Standalone location as gmapInvoking an action that returns a list of Locatable entities also results in the button to view in agmap3

which then renders the items in a map Note the tooltips

Click throughClicking on a map marker drills down to the entity

4

5

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 4: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

ScreenshotsThe modulersquos functionality can be explored by running the quickstart with example usage using theorgincodedomainappexampleappmodulesExampleDomWktGmap3AppManifest

Note that the isisviewerwicketgmap3apiKey must be set to a valid value this is most easily doneusing a system property

A home page is displayed when the app is run

Parented collection as gmapThe todo itemrsquos collection contains a list of Locatable entities (also todo items) this is indicatedthrough a button to switch the view

2

Clicking the button shows the same entities on a gmap3

Update location using serviceThis module previously provided a LocationLookupService This has been removed since theunderlying gmap3 geocoding service requires an apiKey A similar GeocodingService providing asuperset of functionality is available in commchannel module (though this may move into its ownlibrary in the future see 57)

3

Standalone location as gmapInvoking an action that returns a list of Locatable entities also results in the button to view in agmap3

which then renders the items in a map Note the tooltips

Click throughClicking on a map marker drills down to the entity

4

5

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 5: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

Clicking the button shows the same entities on a gmap3

Update location using serviceThis module previously provided a LocationLookupService This has been removed since theunderlying gmap3 geocoding service requires an apiKey A similar GeocodingService providing asuperset of functionality is available in commchannel module (though this may move into its ownlibrary in the future see 57)

3

Standalone location as gmapInvoking an action that returns a list of Locatable entities also results in the button to view in agmap3

which then renders the items in a map Note the tooltips

Click throughClicking on a map marker drills down to the entity

4

5

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 6: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

Standalone location as gmapInvoking an action that returns a list of Locatable entities also results in the button to view in agmap3

which then renders the items in a map Note the tooltips

Click throughClicking on a map marker drills down to the entity

4

5

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 7: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

5

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 8: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

API amp Usage

Rendering objects on a mapMake your entity implement orgisisaddonswicketgmap3applibLocatable such that it provides aLocation property of type orgisisaddonswicketgmap3applibLocation

This property will need to be annotated as javaxjdoannotationsPersistent

For example

import orgisisaddonswicketgmap3cptapplibLocatableimport orgisisaddonswicketgmap3cptapplibLocation

public class ToDoItem implements Locatable javaxjdoannotationsPersistent private Location location

MemberOrder(name=Detail sequence = 10) Nullable public Location getLocation() return location public void setLocation(Location location) thislocation = location

You should then find that any collections of entities that have Locatable properties (either returnedfrom an action or as a parented collection) will be rendered in a map

LocationDereferencingService

Sometimes the domain object that implements Locatable will be a supporting object such as anAddress belonging to a Customer say When the location marker is clicked in the map we wouldrather that the UI opens up the Customer rather than the associated Address (in other words saving aclick)

This requirement is supported by providing an implementation of theLocationDereferencingService

public interface LocationDereferencingService Programmatic Object dereference(final Object locatable)

6

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 9: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

for example one might have

public class LocationDereferencingServiceForAddress implementsLocationDereferencingService Programmatic public Object dereference(final Object locatable) if ((locatable instanceof Address)) return null final Address address = (Address) locatable return addressgetCustomer()

Note that there can be multiple implementations of this service the component will check all thatare available The order in which they are checked depends upon theDomainServiceLayout(menuOrder=hellip) attribute

7

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 10: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

How to configureuse

ClasspathAdd the component to your projectrsquos dom modulersquos pomxml

ltdependencygt ltgroupIdgtorgisisaddonswicketgmap3ltgroupIdgt ltartifactIdgtisis-wicket-gmap3-cptltartifactIdgtltdependencygt

Check for later releases by searching Maven Central Repo

BootstrappingIn the AppManifest update its getModules() method eg

Overridepublic ListltClassltgtgt getModules() return ArraysasList( orgisisaddonswicketgmap3cptapplibGmap3ApplibModuleclass )

Configuration Properties

gmap3 API Key

In order to use the component an API key is required See the google documentation forinstructions as to how to do this a free key (with quite generous daily limits) can be used

Configure the key in WEB-INFviewer_wicketproperties (or WEB-INFisisproperties)

isisviewerwicketgmap3apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX

The commchannel module also requires the same configuration though under adifferent configuration property

8

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 11: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

Known issuesNone known at this time

9

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies
Page 12: GMap3 Wicket Component · 2019-01-16 · Screenshots The module’s functionality can be explored by running the quickstart with example usage using the org.incode.domainapp.example.app.modules.ExampleDomWktGmap3AppManifest

DependenciesMaven can report modules dependencies using

mvn dependencylist -o -pl moduleswktgmap3impl -D excludeTransitive=true

which excluding Apache Isis itself returns these compileruntime dependencies

orgjdomjdomjar202orgwicketstuffwicketstuff-gmap3jar780orgapachehttpcomponentshttpclientjar452

For further details on 3rd-party dependencies see

bull 42Lineswicket-fullcalendar

In addition to Apache Isis this component depends on

bull wicketstuffcore (gmap3 component)

which integrates the Google Maps Javascript API

bull JDOM

bull Apache HttpComponents

10

  • GMap3 Wicket Component
  • Table of Contents
  • Screenshots
    • Parented collection as gmap
    • Update location using service
    • Standalone location as gmap
    • Click through
      • API amp Usage
        • Rendering objects on a map
        • LocationDereferencingService
          • How to configureuse
            • Classpath
            • Bootstrapping
            • Configuration Properties
              • Known issues
              • Dependencies