Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JSO wrapper for MarkerClustererPlus
- Loading branch information
Showing
11 changed files
with
696 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.github.branflake2267</groupId> | ||
<artifactId>gwt-maps</artifactId> | ||
<version>3.9.0-build-17</version> | ||
</parent> | ||
|
||
<artifactId>gwt-maps-utility-markerclustererplus</artifactId> | ||
<name>GWT Maps API V3 - Utility API - MarkerClustererPlus</name> | ||
<version>2.0.15-SNAPSHOT</version> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/java</directory> | ||
<includes> | ||
<include>**/*.java</include> | ||
<include>**/*.gwt.xml</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
|
||
<plugins> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.12</version> | ||
<configuration> | ||
<excludes> | ||
<exclude>**/*GwtTest.java</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>gwt-maven-plugin</artifactId> | ||
<version>${gwt.maven.version}</version> | ||
<configuration> | ||
<extraJvmArgs>-Xss1024k -Xmx512M</extraJvmArgs> | ||
<includes>**/*GwtTestSuite.java</includes> | ||
<excludes>**/*GwtTest.java</excludes> | ||
<mode>htmlunit</mode> | ||
<testTimeOut>180</testTimeOut> | ||
<strict>true</strict> | ||
<style>${gwt.style}</style> | ||
<compileSourcesArtifacts> | ||
<compileSourcesArtifact>com.google.gwt.maps:Maps</compileSourcesArtifact> | ||
</compileSourcesArtifacts> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>test</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-user</artifactId> | ||
<version>${gwt.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-servlet</artifactId> | ||
<version>${gwt.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
</build> | ||
|
||
<dependencies> | ||
<!-- GWT --> | ||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-user</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.branflake2267</groupId> | ||
<artifactId>gwt-maps-api</artifactId> | ||
<version>3.9.0-build-17</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.2</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.9</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> | ||
|
45 changes: 45 additions & 0 deletions
45
...src/main/java/com/google/gwt/maps/utility/markerclustererplus/MarkerClustererPlus.gwt.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- | ||
#%L | ||
GWT Maps API V3 - Utility API - MarkerClustererPlus | ||
%% | ||
Copyright (C) 2011 - 2013 GWT Maps API V3 | ||
%% | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
#L% | ||
--> | ||
<!-- | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!DOCTYPE module PUBLIC "//gwt-module/" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.2/distro-source/core/src/gwt-module.dtd"> | ||
<module> <!-- rename-to='markerclustererplus'> --> | ||
|
||
<!-- GWT Core --> | ||
<inherits name='com.google.gwt.user.User' /> | ||
|
||
<!-- GWT Maps --> | ||
<inherits name='com.google.gwt.maps.Maps' /> | ||
|
||
<!-- translate the client to javascript --> | ||
<source path='client' /> | ||
|
||
</module> |
28 changes: 28 additions & 0 deletions
28
...c/main/java/com/google/gwt/maps/utility/markerclustererplus/client/ClusterCalculator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.google.gwt.maps.utility.markerclustererplus.client; | ||
|
||
/* | ||
* #%L | ||
* GWT Maps API V3 - Utility API - MarkerClustererPlus | ||
* %% | ||
* Copyright (C) 2011 - 2013 GWT Maps API V3 | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* #L% | ||
*/ | ||
|
||
import com.google.gwt.core.client.JsArray; | ||
import com.google.gwt.maps.client.overlays.Marker; | ||
|
||
public interface ClusterCalculator { | ||
ClusterIconInfo execute(JsArray<Marker> markers, int numStyles); | ||
} |
58 changes: 58 additions & 0 deletions
58
...src/main/java/com/google/gwt/maps/utility/markerclustererplus/client/ClusterIconInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.google.gwt.maps.utility.markerclustererplus.client; | ||
|
||
/* | ||
* #%L | ||
* GWT Maps API V3 - Utility API - MarkerClustererPlus | ||
* %% | ||
* Copyright (C) 2011 - 2013 GWT Maps API V3 | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* #L% | ||
*/ | ||
|
||
import com.google.gwt.core.client.JavaScriptObject; | ||
|
||
public class ClusterIconInfo extends JavaScriptObject { | ||
|
||
protected ClusterIconInfo() { | ||
} | ||
|
||
public static ClusterIconInfo getInstance() { | ||
JavaScriptObject jso = JavaScriptObject.createObject(); | ||
return jso.cast(); | ||
} | ||
|
||
public final native int getIndex() /*-{ | ||
return this.index; | ||
}-*/; | ||
|
||
public final native void setIndex(int index) /*-{ | ||
this.index = index; | ||
}-*/; | ||
|
||
public final native int getText() /*-{ | ||
return this.text; | ||
}-*/; | ||
|
||
public final native void setText(String text) /*-{ | ||
this.text = text; | ||
}-*/; | ||
|
||
public final native String getTitle() /*-{ | ||
return this.title; | ||
}-*/; | ||
|
||
public final native void setTitle(String title) /*-{ | ||
this.title = title; | ||
}-*/; | ||
} |
90 changes: 90 additions & 0 deletions
90
...rc/main/java/com/google/gwt/maps/utility/markerclustererplus/client/ClusterIconStyle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
package com.google.gwt.maps.utility.markerclustererplus.client; | ||
|
||
/* | ||
* #%L | ||
* GWT Maps API V3 - Utility API - MarkerClustererPlus | ||
* %% | ||
* Copyright (C) 2011 - 2013 GWT Maps API V3 | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* #L% | ||
*/ | ||
|
||
import com.google.gwt.core.client.JavaScriptObject; | ||
import com.google.gwt.core.client.JsArrayInteger; | ||
|
||
public class ClusterIconStyle extends JavaScriptObject { | ||
|
||
protected ClusterIconStyle() { | ||
} | ||
|
||
public static ClusterIconStyle getInstance() { | ||
return createObject().cast(); | ||
} | ||
|
||
public final void setAnchor(int yOffset, int xOffset) { | ||
setAnchor(JsUtil.toIntegerArray(yOffset, xOffset)); | ||
} | ||
|
||
public final native void setAnchor(JsArrayInteger value) /*-{ | ||
this.anchor = value; | ||
}-*/; | ||
|
||
public final void setAnchorIcon(int yOffset, int xOffset) { | ||
setAnchorIcon(JsUtil.toIntegerArray(yOffset, xOffset)); | ||
} | ||
|
||
public final native void setAnchorIcon(JsArrayInteger value) /*-{ | ||
this.anchorIcon = value; | ||
}-*/; | ||
|
||
public final native void setBackgroundPosition(String value) /*-{ | ||
this.backgroundPosition = value; | ||
}-*/; | ||
|
||
public final native void setFontFamily(String value) /*-{ | ||
this.fontFamily = value; | ||
}-*/; | ||
|
||
public final native void setFontStyle(String value) /*-{ | ||
this.fontStyle = value; | ||
}-*/; | ||
|
||
public final native void setFontWeight(String value) /*-{ | ||
this.fontWeight = value; | ||
}-*/; | ||
|
||
public final native void setHeight(int value) /*-{ | ||
this.height = value; | ||
}-*/; | ||
|
||
public final native void setTextColor(String value) /*-{ | ||
this.textColor = value; | ||
}-*/; | ||
|
||
public final native void setTextDecoration(String value) /*-{ | ||
this.textDecoration = value; | ||
}-*/; | ||
|
||
public final native void setTextSize(int value) /*-{ | ||
this.textSize = value; | ||
}-*/; | ||
|
||
public final native void setUrl(String value) /*-{ | ||
this.url = value; | ||
}-*/; | ||
|
||
public final native void setWidth(int value) /*-{ | ||
this.width = value; | ||
}-*/; | ||
} |
Oops, something went wrong.