mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 22:15:26 +00:00
Merge branch 'd24d71c78497b3a8483014a5a58f7649c001907b' into bug4221
This commit is contained in:
commit
9f74c595b3
917 files changed
+46535
-5924
No files matched your search
Executable
+130
@@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is a template for creating backup of data and persist them
|
||||
# to a central backup server. Make sure to adapt this script to your needs.
|
||||
#
|
||||
# Please do not change the name of the bakup (bup save -n) because that can
|
||||
# have strange effects. If you change it you absolutely need to make sure that
|
||||
# only the same root directories are associated to that name. It is NOT possible
|
||||
# to backup different root directories to the same backup name.
|
||||
#
|
||||
# Maintainer: simon.marcel.pamies@sap.com, axel.uhl@sap.com
|
||||
|
||||
# Directories to backup
|
||||
BACKUP_DIRECTORIES="/etc /var/log/mongodb"
|
||||
|
||||
# Prefix for backup - set that to the hostname of your server
|
||||
# Make sure to change this!
|
||||
PREFIX="database"
|
||||
|
||||
# Directory for temporary files
|
||||
TARGET_DIR=/var/lib/mongodb/backup
|
||||
|
||||
# Configuration for MongoDB backup
|
||||
MONGO_PORTS="10202 10201"
|
||||
MONGO_INSTALLATION=/opt/mongodb-linux-x86_64-2.6.7
|
||||
MONGO_CMD=$MONGO_INSTALLATION/bin/mongo
|
||||
MONGOEXPORT_CMD=$MONGO_INSTALLATION/bin/mongoexport
|
||||
MONGODB_COLLECTION_WIND="WIND_TRACKS"
|
||||
MONGODB_EXCLUDE_DBS="local 29erWorlds2016 29erWorlds2016-replica 49er-n17-euros2017 49er-n17-euros2017-replica 49erEuros2015 49erEuros2016 49erEuros2016-replica 49erJWC2015 49erWorlds_2016 49erWorlds_2016-replica 49erWorlds_2016-replica2 49erWorlds_2016-replica3 49erworlds2015 505-2017 505-2017-replica 505-2017-replica-1 505-2017-replica-2 505Worlds2016 505Worlds2016-replica 505_WORLDS_2015 6mworlds2017 6mworlds2017-replica 8MWORLDS2017 8MWORLDS2017-replica AustrianLeague2015 Bodenseewoche_2015 Championsleague_2015 Championsleague_2015-Replica DANISHLEAGUE2017 DANISHLEAGUE2017-replica DUTCH_LEAGUE_2017 DUTCH_LEAGUE_2017-replica DanishSailingLeague_2015 DutchSailingLeague_2015 FinnishSailingLeague_2015 GermanSailingLeague_2015 GermanSailingLeague_2015-Replica HANSESAIL2017 IDMFINN2017 KW2015 KW2015-replica KW2015-replica2 KW2017 KW2017-replica Norwegianleague_2015 POLISHLEAGUE2017 RosAtomCup_2015 SAPOPTICUP2015 SCL2017 SCL2017-replica SGCN_Smartphone_2016 SGCN_Smartphone_2016-replica SPEEDSAILING2016 SWC2016-Melbourne SWC2016-Melbourne-replica SWC2016-Qingdao SWC2016-Qingdao-replica SWC2017-Aarhus SWC2017-HYERES SWC2017-HYERES-replica SWC2017-Miami SWC2017-Miami-replica SWC2017-SANTANDER SWC2017-SANTANDER-replica SWEDISHLEAGUE2017 SWEDISHLEAGUE2017-replica TW2015 TW2015-REPLICA TW2015-test-replica TW2017 TW2017-replica WORLDCUPSYLT2015 YES2015 YES2015-REPLICA YES2015-REPLICA2 allsvenskan2015 austrianleague2016 austrianleague2017 bartsbash2015 bundesliga2-2017 bundesliga2-2017-replica bundesliga2016 bundesliga2016-replica bundesliga2016_2 bundesliga2017 bundesliga2017-replica crw2016 crw2016-replica danishleague2016 danishleague2016-replica dsl-pokal2017 dutchleague2016 dutchleague2016-replica ess2015 ess2016 ess2017 ess2017_foiling_test ess40-2015-replica2 finnishleague2016 finnishleague2017 forumvostok2016 frenchleague2017 germanleague2016-replica idmstar2016 isafwc2014 kielerwoche2016 kielerwoche2016-replica kiellauf2017 northsearegatta2017 northstreamrace2017 norwegianleague2016 norwegianleague2016-replica norwegianleague2017 norwegianleague2017-replica rsc2016 scl2016 scl2016-replica swedishleague2016 swedishleague2016-replica tw2016 tw2016-replica usoda2016 wmrt2016"
|
||||
|
||||
# Configuration for MySQL
|
||||
MYSQL_DATABASES="bugs mysql"
|
||||
MYSQLEXPORT_CMD="mysqldump -u root --password=sailaway"
|
||||
|
||||
# Configuration for external backup server - needs a ssh key
|
||||
BACKUP_SERVER="backup@172.31.25.136"
|
||||
|
||||
# Set date for this backup - this makes it possible to restore
|
||||
# files from different branches (named backups)
|
||||
BACKUP_DATE=`date +%s`
|
||||
|
||||
# Aliases
|
||||
BUP_DIR=/var/lib/mongodb/backup/bup
|
||||
BUP_CMD="/opt/bup/bup -d $BUP_DIR"
|
||||
BUP_ADDITIONAL="-r $BACKUP_SERVER:/home/backup/$PREFIX"
|
||||
BUP_IGNORES='--exclude-rx=/war/$'
|
||||
BUP_CMD_INDEX="$BUP_CMD index $BUP_IGNORES"
|
||||
BUP_CMD_SAVE="$BUP_CMD save --date=$BACKUP_DATE $BUP_ADDITIONAL"
|
||||
|
||||
PARAM=$@
|
||||
|
||||
# Make sure to install the right libraries
|
||||
yum install python-devel fuse-python pyxattr pylibacl perl-Time-HiRes
|
||||
|
||||
# We need to set HOME in case it isn't set right - assuming root is calling
|
||||
export HOME=/root
|
||||
|
||||
# Make sure to init local and remote repository
|
||||
# It is perfectly safe to reinitialize a repository w/o overwriting data
|
||||
$BUP_CMD init
|
||||
ssh $BACKUP_SERVER "/opt/bup/bup init -r /home/backup/$PREFIX"
|
||||
|
||||
# Backup general directories
|
||||
for OTHER_DIR in $BACKUP_DIRECTORIES; do
|
||||
NORMALIZED_DIR_NAME=${OTHER_DIR//\//-}
|
||||
echo "Backing up $OTHER_DIR"
|
||||
$BUP_CMD_INDEX $OTHER_DIR
|
||||
$BUP_CMD_SAVE -n dir$NORMALIZED_DIR_NAME $OTHER_DIR
|
||||
# no need to remove any backup files here
|
||||
done
|
||||
|
||||
# **************************************
|
||||
# Start of database specific backup
|
||||
# **************************************
|
||||
|
||||
# Export MongoDB instances with wind upon request (weekly parameter provided)
|
||||
for MONGO_PORT in $MONGO_PORTS; do
|
||||
echo Backing up MongoDB running on port $MONGO_PORT
|
||||
MONGODB_DATABASES=`echo "show dbs" | $MONGO_CMD --port $MONGO_PORT | tail -n +3 | grep -v "^bye$" | awk '{print $1;}'`
|
||||
for i in $MONGODB_DATABASES; do
|
||||
echo " Backing up database $i in MongoDB running on port $MONGO_PORT"
|
||||
MONGODB_COLLECTIONS=`echo "use $i
|
||||
show collections" | $MONGO_CMD --port $MONGO_PORT | tail -n +4 | grep -v "^system.indexes$" | grep -v "^bye$"`
|
||||
echo "Collections in MongoDB $i running on port $MONGO_PORT: $MONGODB_COLLECTIONS"
|
||||
for j in $MONGODB_COLLECTIONS; do
|
||||
if [ "$j" = "$MONGODB_COLLECTION_WIND" ]; then
|
||||
WIND_SUFFIX="-wind"
|
||||
else
|
||||
WIND_SUFFIX=
|
||||
fi
|
||||
if [ "$i" != "winddb" ]; then
|
||||
DB_DIR=$TARGET_DIR/mongodb-$MONGO_PORT-$i$WIND_SUFFIX
|
||||
else
|
||||
DB_DIR=$TARGET_DIR/mongodb-$MONGO_PORT$WIND_SUFFIX
|
||||
fi
|
||||
exclude=0
|
||||
for exclude_collection in $MONGODB_EXCLUDE_DBS; do
|
||||
if [ "$i" = "$exclude_collection" ]; then
|
||||
echo "Excluding $i from backup based on exclude list"
|
||||
exclude=1
|
||||
fi
|
||||
done
|
||||
if [ "$exclude" = "0" -a \( "$j" != "$MONGODB_COLLECTION_WIND" -o "$PARAM" = "weekly" \) ]; then
|
||||
echo " Backing up collection $j in MongoDB $i running on port $MONGO_PORT"
|
||||
echo "$MONGOEXPORT_CMD --port $MONGO_PORT -d $i -c $j > $DB_DIR/$j.json"
|
||||
mkdir -p $DB_DIR
|
||||
$MONGOEXPORT_CMD --port $MONGO_PORT -d $i -c $j > $DB_DIR/$j.json
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
# Export MySQL dump for selected databases
|
||||
for MYSQL_DB in $MYSQL_DATABASES; do
|
||||
mkdir $TARGET_DIR/mysql
|
||||
echo "$MYSQLEXPORT_CMD $MYSQL_DB > $TARGET_DIR/mysql/$MYSQL_DB.sql"
|
||||
$MYSQLEXPORT_CMD $MYSQL_DB > $TARGET_DIR/mysql/$MYSQL_DB.sql
|
||||
done
|
||||
|
||||
# Backup the whole thing now and push to external server
|
||||
$BUP_CMD_INDEX $TARGET_DIR
|
||||
$BUP_CMD_SAVE -n databases $TARGET_DIR/
|
||||
|
||||
# clean up
|
||||
find $TARGET_DIR -name *.json | xargs rm -f
|
||||
rm -f $TARGET_DIR/mysql/*.sql
|
||||
|
||||
# **************************************
|
||||
# End of database specific backup
|
||||
# **************************************
|
||||
@@ -1,149 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is a template for creating backup of data and persist them
|
||||
# to a central backup server. Make sure to adapt this script to your needs.
|
||||
#
|
||||
# Please do not change the name of the bakup (bup save -n) because that can
|
||||
# have strange effects. If you change it you absolutely need to make sure that
|
||||
# only the same root directories are associated to that name. It is NOT possible
|
||||
# to backup different root directories to the same backup name.
|
||||
#
|
||||
# Maintainer: simon.marcel.pamies@sap.com
|
||||
#
|
||||
# ######################################################################
|
||||
# CHANGELOG
|
||||
#
|
||||
# 2016-09-13 (Steffen Wagner):
|
||||
# - extracting all databases from a mongo connection instead of defining
|
||||
# the exportable databases manually
|
||||
# - made databases excludeable (by regex and name)
|
||||
#
|
||||
|
||||
# Directories to backup
|
||||
BACKUP_DIRECTORIES="/etc /var/log/mongodb"
|
||||
|
||||
# Prefix for backup - set that to the hostname of your server
|
||||
# Make sure to change this!
|
||||
PREFIX="database"
|
||||
|
||||
# Directory for temporary files
|
||||
TARGET_DIR=/var/lib/mysql/backup
|
||||
|
||||
# Configuration for MongoDB backup
|
||||
MONGO_CONNECTIONS="localhost:10201 localhost:10202"
|
||||
MONGOEXPORT_CMD="/opt/mongodb-linux-x86_64-1.8.1/bin/mongoexport"
|
||||
MONGODB_COLLECTIONS_NO_WIND="ActiveFileStorageService COMMAND_MESSAGES COMPETITORS CONFIGURATIONS EVENTS FileStorageServiceProperties GPS_FIXES GPS_FIXES_METADATA IGTIMI_ACCESS_TOKENS LAST_MESSAGE_COUNT LEADERBOARDS LEADERBOARD_GROUPS LEADERBOARD_GROUP_LINKS_FOR_EVENTS PREFERENCES RACES_MESSAGES RACE_LOGS REGATTAS REGATTA_FOR_RACE_ID REGATTA_LOGS RESULT_URLS SAILING_SERVERS SETTINGS SWISSTIMING_ARCHIVE_CONFIGURATIONS SWISSTIMING_CONFIGURATIONS TRACTRAC_CONFIGURATIONS USERS VIDEOS"
|
||||
MONGODB_COLLECTIONS_WIND="WIND_TRACKS"
|
||||
MONGODB_EXCLUDEDB="10201:LOAD-TEST 10201:winddb 10201:live 10201:local 10201:admin 10202:DNSTEST2 10202:imagetest 10202:live 10202:replication-test-master 10202:load-test 10202:admin 10202:dev 10202:dev-2010 10202:BYC-2010 10202:sapsailinganalytics-dev 10202:test"
|
||||
|
||||
# Configuration for MySQL
|
||||
MYSQL_DATABASES="bugs mysql"
|
||||
MYSQLEXPORT_CMD="mysqldump -u root --password=sailaway"
|
||||
|
||||
# Configuration for external backup server - needs a ssh key
|
||||
BACKUP_SERVER="backup@172.31.25.136"
|
||||
|
||||
# Set date for this backup - this makes it possible to restore
|
||||
# files from different branches (named backups)
|
||||
BACKUP_DATE=`date +%s`
|
||||
|
||||
# Aliases
|
||||
BUP_CMD="/opt/bup/bup"
|
||||
BUP_ADDITIONAL="-r $BACKUP_SERVER:/home/backup/$PREFIX"
|
||||
BUP_IGNORES='--exclude-rx=/war/$'
|
||||
BUP_CMD_INDEX="$BUP_CMD index $BUP_IGNORES"
|
||||
BUP_CMD_SAVE="$BUP_CMD save --date=$BACKUP_DATE $BUP_ADDITIONAL"
|
||||
|
||||
PARAM=$@
|
||||
|
||||
# Make sure to install the right libraries
|
||||
yum install python-devel fuse-python pyxattr pylibacl perl-Time-HiRes
|
||||
|
||||
# We need to set HOME in case it isn't set right - assuming root is calling
|
||||
export HOME=/root
|
||||
|
||||
# Make sure to init local and remote repository
|
||||
# It is perfectly safe to reinitialize a repository w/o overwriting data
|
||||
$BUP_CMD init
|
||||
ssh $BACKUP_SERVER "/opt/bup/bup init -r /home/backup/$PREFIX"
|
||||
|
||||
# Backup general directories
|
||||
for OTHER_DIR in $BACKUP_DIRECTORIES; do
|
||||
NORMALIZED_DIR_NAME=${OTHER_DIR//\//-}
|
||||
echo "Backing up $OTHER_DIR"
|
||||
$BUP_CMD_INDEX $OTHER_DIR
|
||||
$BUP_CMD_SAVE -n dir$NORMALIZED_DIR_NAME $OTHER_DIR
|
||||
# no need to remove any backup files here
|
||||
done
|
||||
|
||||
# **************************************
|
||||
# Start of database backups
|
||||
# **************************************
|
||||
|
||||
# Backup all databases from all mongo connections
|
||||
for MONGO_DB in $MONGO_CONNECTIONS; do
|
||||
CONNECTION=(${MONGO_DB//:/ })
|
||||
DATABASES_UNFORMATTED=($(mongo --host ${CONNECTION[0]} --port ${CONNECTION[1]} --quiet --eval "JSON.stringify(db.adminCommand('listDatabases'))"))
|
||||
DATABASES_FORMATTED=`echo ${DATABASES_UNFORMATTED} | jq -r --arg port ${CONNECTION[1]} '.databases| map($port + ":" + .name)|@csv' | tr -d '"' | tr ',' ' '`
|
||||
|
||||
# Remove all explicit excluded databases
|
||||
LIST_DATABASES_FORMATTED=( $DATABASES_FORMATTED )
|
||||
LIST_MONGODB_EXCLUDEDB=( $MONGODB_EXCLUDEDB )
|
||||
DATABASES_EXCLUDED=`echo ${LIST_DATABASES_FORMATTED[@]} ${LIST_MONGODB_EXCLUDEDB[@]} | tr ' ' '\n' | sort | uniq -u`
|
||||
|
||||
# Remove all regex excluded databases
|
||||
DATABASES_FINAL=`echo ${DATABASES_EXCLUDED} | sed -r 's/[0-9]{5}:replica[0-9]+//gi'`
|
||||
|
||||
# Export MongoDB instances with wind upon request (weekly parameter provided)
|
||||
if [ "$PARAM" = "weekly" ]; then
|
||||
for MONGO_CONFIG in $DATABASES_FINAL; do
|
||||
PARTS=(${MONGO_CONFIG//:/ })
|
||||
if [ "${PARTS[1]}" != "winddb" ]; then
|
||||
mkdir $TARGET_DIR/mongodb-${PARTS[0]}-${PARTS[1]}-wind
|
||||
DB_SUFFIX=${PARTS[0]}-${PARTS[1]}-wind
|
||||
else
|
||||
mkdir $TARGET_DIR/mongodb-${PARTS[0]}-wind
|
||||
DB_SUFFIX=${PARTS[0]}-wind
|
||||
fi
|
||||
for COLLECTION in $MONGODB_COLLECTIONS_WIND; do
|
||||
echo "$MONGOEXPORT_CMD --port ${PARTS[0]} -d ${PARTS[1]} -c $COLLECTION > $TARGET_DIR/mongodb-$DB_SUFFIX/$COLLECTION.json"
|
||||
$MONGOEXPORT_CMD --port ${PARTS[0]} -d ${PARTS[1]} -c $COLLECTION > $TARGET_DIR/mongodb-$DB_SUFFIX/$COLLECTION.json
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Export MongoDB instances without wind
|
||||
for MONGO_CONFIG in $DATABASES_FINAL; do
|
||||
PARTS=(${MONGO_CONFIG//:/ })
|
||||
if [ "${PARTS[1]}" != "winddb" ]; then
|
||||
mkdir $TARGET_DIR/mongodb-${PARTS[0]}-${PARTS[1]}
|
||||
DB_SUFFIX=${PARTS[0]}-${PARTS[1]}
|
||||
else
|
||||
mkdir $TARGET_DIR/mongodb-${PARTS[0]}
|
||||
DB_SUFFIX=${PARTS[0]}
|
||||
fi
|
||||
for COLLECTION in $MONGODB_COLLECTIONS_NO_WIND; do
|
||||
echo "$MONGOEXPORT_CMD --port ${PARTS[0]} -d ${PARTS[1]} -c $COLLECTION > $TARGET_DIR/mongodb-$DB_SUFFIX/$COLLECTION.json"
|
||||
$MONGOEXPORT_CMD --port ${PARTS[0]} -d ${PARTS[1]} -c $COLLECTION > $TARGET_DIR/mongodb-$DB_SUFFIX/$COLLECTION.json
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
# Export MySQL dump for selected databases
|
||||
for MYSQL_DB in $MYSQL_DATABASES; do
|
||||
mkdir $TARGET_DIR/mysql
|
||||
echo "$MYSQLEXPORT_CMD $MYSQL_DB > $TARGET_DIR/mysql/$MYSQL_DB.sql"
|
||||
$MYSQLEXPORT_CMD $MYSQL_DB > $TARGET_DIR/mysql/$MYSQL_DB.sql
|
||||
done
|
||||
|
||||
# Backup the whole thing now and push to external server
|
||||
$BUP_CMD_INDEX $TARGET_DIR
|
||||
$BUP_CMD_SAVE -n databases $TARGET_DIR/
|
||||
|
||||
# clean up
|
||||
find $TARGET_DIR -name *.json | xargs rm -f
|
||||
rm -f $TARGET_DIR/mysql/*.sql
|
||||
|
||||
# **************************************
|
||||
# End of database specific backup
|
||||
# **************************************
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -o functrace
|
||||
source ./configuration/correctFilePathInRelationToCurrentOs.sh
|
||||
|
||||
# This indicates the type of the project
|
||||
# and is used to correctly resolve bundle names
|
||||
@@ -23,7 +24,7 @@ find_project_home ()
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo $1 | sed -e 's/\/cygdrive\/\([a-zA-Z]\)/\1:/'
|
||||
echo $(correct_file_path "$1")
|
||||
}
|
||||
|
||||
# this holds for default installation
|
||||
@@ -40,8 +41,9 @@ if [[ "$PROJECT_HOME" == "" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#reading the filepath and editing it, so it fits for eclipse #currently save works for cygwin, gitbash and linux
|
||||
if [ "$SERVERS_HOME" = "" ]; then
|
||||
SERVERS_HOME=`echo "$USER_HOME/servers" | sed -e 's/\/cygdrive\/\([a-zA-Z]\)/\1:/'`
|
||||
SERVERS_HOME=$(correct_file_path "$USER_HOME/servers")
|
||||
fi
|
||||
|
||||
# x86 or x86_64 should work for most cases
|
||||
@@ -634,6 +636,9 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
||||
SDK_MANAGER="$ANDROID_HOME/tools/bin/sdkmanager.bat"
|
||||
fi
|
||||
|
||||
# Uncomment the following line for testing an artifact stages in the SAP-central Nexus system:
|
||||
# mobile_extra="-P -with-not-android-relevant -P with-mobile -P use-staged-third-party-artifacts -Dmaven.repo.local=${TMP}/temp_maven_repo"
|
||||
# Use the following line for regular builds with no staged Nexus artifacts:
|
||||
mobile_extra="-P -with-not-android-relevant -P with-mobile"
|
||||
|
||||
if [ $testing -eq 0 ]; then
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
#editing the filepath, so it fits for operating system #currently savely works for cygwin, gitbash and linux
|
||||
correct_file_path()
|
||||
{
|
||||
if [[ "$1" == '/' ]] || [[ "$1" == "" ]]; then
|
||||
echo ""
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "$OSTYPE" == "cygwin" ]; then
|
||||
echo $1 | sed 's/^\/cygdrive\/\([a-zA-Z]\)\//\1:\//'
|
||||
elif [ "$OSTYPE" == "msys" ]; then
|
||||
echo $1 | sed 's/^\/\([a-zA-Z]\)\//\1:\//'
|
||||
else
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
# Executes the following script on the DB server:
|
||||
##!/bin/sh
|
||||
#useremail=$1
|
||||
#for i in `echo "show dbs" | /opt/mongodb-linux-x86_64-2.6.7/bin/mongo --port 10202 | grep -v "^bye$" | awk '{print $1;'}`; do
|
||||
#for i in `echo "show dbs" | /opt/mongodb-linux-x86_64-2.6.7/bin/mongo --port 10202 | tail -n +3 | grep -v "^bye$" | awk '{print $1;}'`; do
|
||||
# match=`echo "db.USERS.find({EMAIL: '$useremail'}); db.COMPETITORS.find({email: '$useremail'})" | /opt/mongodb-linux-x86_64-2.6.7/bin/mongo --quiet --port 10202 $i`
|
||||
# if [ "$match" != "" ]; then
|
||||
# echo ${i}: $match
|
||||
|
||||
Regular → Executable
File mode changed.
@@ -33,6 +33,22 @@
|
||||
</parameters.integration-tests>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>use-staged-third-party-artifacts</id>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>staged-third-party-artifacts</id>
|
||||
<url>http://nexus.wdf.sap.corp:8081/nexus/content/repositories/3rd-party.releases.manual-uploads.all-closed-stages/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>staged-third-party-artifacts</id>
|
||||
<url>http://nexus.wdf.sap.corp:8081/nexus/content/repositories/3rd-party.releases.manual-uploads.all-closed-stages/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="11">
|
||||
<profile kind="CodeFormatterProfile" name="Spaces" version="11">
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_object_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_comma_in_objlit_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.wrap_before_binary_operator" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indentation.size" value="4"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.compiler.compliance" value="1.5"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_objlit_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.compiler.problem.assertIdentifier" value="error"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_objlit_initializer_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.compiler.source" value="1.5"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="80"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_objlit_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_function_keyword" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_object_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_objlit_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_objlit_initializer" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.compiler.codegen.targetPlatform" value="1.5"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="120"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.line_length" value="80"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description" value="true"/>
|
||||
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1 @@
|
||||
bin
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.github.branflake2267.gwt-maps-api</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,81 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
@@ -0,0 +1,4 @@
|
||||
#Tue Feb 28 12:33:59 CET 2012
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,91 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Google Maps API
|
||||
Bundle-SymbolicName: com.github.branflake2267.gwt-maps-api
|
||||
Bundle-Version: 3.10.0.qualifier
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Require-Bundle: com.google.gwt.user;bundle-version="2.8.2";resolution:=optional,
|
||||
com.google.gwt.dev;bundle-version="2.8.2";resolution:=optional,
|
||||
com.google.gwt.ajaxloader;bundle-version="1.1.0";visibility:=reexport
|
||||
Automatic-Module-Name: com.github.branflake2267.gwt-maps-api
|
||||
Bundle-ClassPath: .
|
||||
Export-Package: com.google.gwt.maps.client,
|
||||
com.google.gwt.maps.client.adsense,
|
||||
com.google.gwt.maps.client.base,
|
||||
com.google.gwt.maps.client.controls,
|
||||
com.google.gwt.maps.client.drawinglib,
|
||||
com.google.gwt.maps.client.events,
|
||||
com.google.gwt.maps.client.events.animation,
|
||||
com.google.gwt.maps.client.events.bounds,
|
||||
com.google.gwt.maps.client.events.center,
|
||||
com.google.gwt.maps.client.events.channelnumber,
|
||||
com.google.gwt.maps.client.events.click,
|
||||
com.google.gwt.maps.client.events.clickable,
|
||||
com.google.gwt.maps.client.events.closeclick,
|
||||
com.google.gwt.maps.client.events.content,
|
||||
com.google.gwt.maps.client.events.cursor,
|
||||
com.google.gwt.maps.client.events.dblclick,
|
||||
com.google.gwt.maps.client.events.directions,
|
||||
com.google.gwt.maps.client.events.domready,
|
||||
com.google.gwt.maps.client.events.drag,
|
||||
com.google.gwt.maps.client.events.dragend,
|
||||
com.google.gwt.maps.client.events.draggable,
|
||||
com.google.gwt.maps.client.events.dragstart,
|
||||
com.google.gwt.maps.client.events.flat,
|
||||
com.google.gwt.maps.client.events.format,
|
||||
com.google.gwt.maps.client.events.fusiontablemouse,
|
||||
com.google.gwt.maps.client.events.heading,
|
||||
com.google.gwt.maps.client.events.icon,
|
||||
com.google.gwt.maps.client.events.idle,
|
||||
com.google.gwt.maps.client.events.insertat,
|
||||
com.google.gwt.maps.client.events.kmlmouse,
|
||||
com.google.gwt.maps.client.events.kmlviewport,
|
||||
com.google.gwt.maps.client.events.links,
|
||||
com.google.gwt.maps.client.events.mapchange,
|
||||
com.google.gwt.maps.client.events.maptypeid,
|
||||
com.google.gwt.maps.client.events.mousedown,
|
||||
com.google.gwt.maps.client.events.mousemove,
|
||||
com.google.gwt.maps.client.events.mouseout,
|
||||
com.google.gwt.maps.client.events.mouseover,
|
||||
com.google.gwt.maps.client.events.mouseup,
|
||||
com.google.gwt.maps.client.events.overlaycomplete,
|
||||
com.google.gwt.maps.client.events.overlaycomplete.circle,
|
||||
com.google.gwt.maps.client.events.overlaycomplete.marker,
|
||||
com.google.gwt.maps.client.events.overlaycomplete.polygon,
|
||||
com.google.gwt.maps.client.events.overlaycomplete.polyline,
|
||||
com.google.gwt.maps.client.events.overlaycomplete.rectangle,
|
||||
com.google.gwt.maps.client.events.pano,
|
||||
com.google.gwt.maps.client.events.panoramiomouse,
|
||||
com.google.gwt.maps.client.events.place,
|
||||
com.google.gwt.maps.client.events.position,
|
||||
com.google.gwt.maps.client.events.pov,
|
||||
com.google.gwt.maps.client.events.projection,
|
||||
com.google.gwt.maps.client.events.radius,
|
||||
com.google.gwt.maps.client.events.removeat,
|
||||
com.google.gwt.maps.client.events.resize,
|
||||
com.google.gwt.maps.client.events.rightclick,
|
||||
com.google.gwt.maps.client.events.setat,
|
||||
com.google.gwt.maps.client.events.shadow,
|
||||
com.google.gwt.maps.client.events.shape,
|
||||
com.google.gwt.maps.client.events.tiles,
|
||||
com.google.gwt.maps.client.events.tilt,
|
||||
com.google.gwt.maps.client.events.title,
|
||||
com.google.gwt.maps.client.events.visible,
|
||||
com.google.gwt.maps.client.events.weatherlibmouse,
|
||||
com.google.gwt.maps.client.events.zindex,
|
||||
com.google.gwt.maps.client.events.zoom,
|
||||
com.google.gwt.maps.client.geometrylib,
|
||||
com.google.gwt.maps.client.layers,
|
||||
com.google.gwt.maps.client.maptypes,
|
||||
com.google.gwt.maps.client.mvc,
|
||||
com.google.gwt.maps.client.overlays,
|
||||
com.google.gwt.maps.client.overlays.overlayhandlers,
|
||||
com.google.gwt.maps.client.panoramiolib,
|
||||
com.google.gwt.maps.client.placeslib,
|
||||
com.google.gwt.maps.client.placeslib.placeresult,
|
||||
com.google.gwt.maps.client.services,
|
||||
com.google.gwt.maps.client.streetview,
|
||||
com.google.gwt.maps.client.visualizationlib,
|
||||
com.google.gwt.maps.client.weatherlib,
|
||||
com.google.gwt.maps.client.workaround
|
||||
@@ -0,0 +1,4 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>root</artifactId>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.github.branflake2267.gwt-maps-api</artifactId>
|
||||
<groupId>com.github.branflake2267</groupId>
|
||||
<version>3.10.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-source-plugin</artifactId>
|
||||
<version>${tycho-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>plugin-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>plugin-source</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!-- This dependency is required because the GWT Maven Plugin searches
|
||||
other GWT modules only in Maven dependencies -->
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>com.google.gwt.ajaxloader</artifactId>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- This dependency is required because the GWT Maven Plugin searches
|
||||
other GWT modules only in Maven dependencies -->
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>com.google.gwt.ajaxloader</artifactId>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
#%L
|
||||
GWT Maps API V3 - Core API
|
||||
%%
|
||||
Copyright (C) 2011 - 2012 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%
|
||||
-->
|
||||
<!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='maps'>
|
||||
|
||||
<!-- GWT Core -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<!-- Load the api with -->
|
||||
<inherits name='com.google.gwt.ajaxloader.AjaxLoader' />
|
||||
|
||||
<!-- -->
|
||||
<inherits name="com.google.gwt.i18n.I18N" />
|
||||
|
||||
<!-- translate the client to javascript -->
|
||||
<source path='client' />
|
||||
|
||||
</module>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
#%L
|
||||
GWT Maps API V3 - Core API
|
||||
%%
|
||||
Copyright (C) 2011 - 2012 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%
|
||||
-->
|
||||
<!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='maps'>
|
||||
|
||||
<!-- GWT Core -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<!-- Load the api with -->
|
||||
<inherits name='com.google.gwt.ajaxloader.AjaxLoader' />
|
||||
|
||||
<!-- -->
|
||||
<inherits name="com.google.gwt.i18n.I18N" />
|
||||
<inherits name="com.google.gwt.json.JSON" />
|
||||
|
||||
<!-- <set-property name="user.agent" value="safari" /> -->
|
||||
|
||||
<!-- translate the client to javascript -->
|
||||
<source path='client' />
|
||||
|
||||
</module>
|
||||
+325
@@ -0,0 +1,325 @@
|
||||
package com.google.gwt.maps.client;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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 java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.google.gwt.ajaxloader.client.AjaxLoader;
|
||||
import com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions;
|
||||
|
||||
/**
|
||||
* Load Maps javascript v3 api
|
||||
*
|
||||
* TODO maybe move to the new loading system they have in google apis
|
||||
*/
|
||||
public class LoadApi {
|
||||
|
||||
/**
|
||||
* Note: If you use 3, it will take the newest stable available. Don't want that. We didn't test with that yet!
|
||||
*/
|
||||
public final static String API_VERSION = "3.32";
|
||||
|
||||
/**
|
||||
* Libraries not loaded by default <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/basics.html#Libraries" >Libraries API
|
||||
* Doc</a>
|
||||
*/
|
||||
public static enum LoadLibrary {
|
||||
|
||||
/**
|
||||
* Allows your Maps API application to include context-sensitive text ads, allowing you to share in ad revenue for
|
||||
* ads shown to your users. Consult the AdSense Library documentation for more information.
|
||||
*/
|
||||
ADSENSE,
|
||||
|
||||
/**
|
||||
* Provides a graphical interface for users to draw polygons, rectangles, polylines, circles, and markers on the
|
||||
* map. Consult the Drawing Library documentation for more information.
|
||||
*/
|
||||
DRAWING,
|
||||
|
||||
/**
|
||||
* Geometry includes utility functions for calculating scalar geometric values (such as distance and area) on the
|
||||
* the surface of the earth. Consult the Geometry Library documentation for more information.
|
||||
*/
|
||||
GEOMETRY,
|
||||
|
||||
/**
|
||||
* Panoramio contains functionality for adding Panoramio photo layers to your Maps API application. Consult the
|
||||
* Panoramio Layers documentation for more information.
|
||||
*/
|
||||
PANORAMIO,
|
||||
|
||||
/**
|
||||
* Places enables your application to search for businesses, geographic locations, and points of interest near a
|
||||
* given location, or as a user types. Consult the Places Library documentation for more information.
|
||||
*/
|
||||
PLACES,
|
||||
|
||||
/**
|
||||
* Weather contains functionality for adding meterological layers to your Maps API application. Consult the Weather
|
||||
* Layers documentation for more information.
|
||||
*/
|
||||
WEATHER,
|
||||
|
||||
/**
|
||||
* Visualization contains functionality for adding advanced visualization layers to your Maps API application.
|
||||
* Consult the Visualization documentation for more information.
|
||||
*/
|
||||
VISUALIZATION;
|
||||
|
||||
public String value() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
public static LoadLibrary fromValue(String value) {
|
||||
return valueOf(value.toUpperCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @See <a href="https://developers.google.com/maps/documentation/javascript/basics#Localization">Localization docs</a>
|
||||
* @See <a href="https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1">List of languages</a>
|
||||
*/
|
||||
public static enum Language {
|
||||
|
||||
GERMAN("de"),
|
||||
GREEK("el"),
|
||||
ENGLISH("en"),
|
||||
ENGLISH_AUSTRALIAN("en-AU"),
|
||||
ENGLISH_GREAT_BRITAIN("en-GB"),
|
||||
SPANISH("es"),
|
||||
BASQUE("eu"),
|
||||
FARSI("fa"),
|
||||
FINNISH("fi"),
|
||||
FILIPINO("fil"),
|
||||
FRENCH("fr"),
|
||||
GALICIAN("gl"),
|
||||
GUJARATI("gu"),
|
||||
HINDI("hi"),
|
||||
CROATIAN("hr"),
|
||||
HUNGARIAN("hu"),
|
||||
INDONESIAN("id"),
|
||||
ITALIAN("it"),
|
||||
HEBREW("iw"),
|
||||
JAPANESE("ja"),
|
||||
KANNADA("kn"),
|
||||
KOREAN("ko"),
|
||||
LITHUANIAN("lt"),
|
||||
LATVIAN("lv"),
|
||||
MALAYALAM("ml"),
|
||||
MARATHI("mr"),
|
||||
DUTCH("nl"),
|
||||
NORWEGIAN_NYNORSK("nn"),
|
||||
NORWEGIAN("no"),
|
||||
ORIYA("or"),
|
||||
POLISH("pl"),
|
||||
PORTUGUESE("pt"),
|
||||
PORTUGUESE_BRAZIL("pt-BR"),
|
||||
PORTUGUESE_PORTUGAL("pt-PT"),
|
||||
ROMANSCH("rm"),
|
||||
ROMANIAN("ro"),
|
||||
RUSSIAN("ru"),
|
||||
SLOVAK("sk"),
|
||||
SLOVENIAN("sl"),
|
||||
SERBIAN("sr"),
|
||||
SWEDISH("sv"),
|
||||
TAGALOG("tl"),
|
||||
TAMIL("ta"),
|
||||
TELUGU("te"),
|
||||
THAI("th"),
|
||||
TURKISH("tr"),
|
||||
UKRAINIAN("uk"),
|
||||
VIETNAMESE("vi"),
|
||||
CHINESE_SIMPLIFIED("zh-CN"),
|
||||
CHINESE_TRADITIONAL("zh-TW"),
|
||||
DANISH("da");
|
||||
|
||||
private String value;
|
||||
|
||||
Language(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Language fromValue(String value) {
|
||||
return valueOf(value.toUpperCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().toLowerCase() + "(" + value + ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Maps javascript v3 api with default libraries. these are not loaded {@link LoadLibrary}
|
||||
*
|
||||
* @param onLoad - callback on success
|
||||
*/
|
||||
public static void go(Runnable onLoad) {
|
||||
load(onLoad, null, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads maps api
|
||||
*
|
||||
* @param onLoad callback on success
|
||||
* @param loadLibraries load additional libraries like geometry
|
||||
* @param sensor derive location [true|false]
|
||||
*/
|
||||
public static void go(Runnable onLoad, ArrayList<LoadLibrary> loadLibraries) {
|
||||
load(onLoad, loadLibraries, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads maps api
|
||||
*
|
||||
* @param onLoad callback on success
|
||||
* @param loadLibraries load additional libraries like geometry
|
||||
* @param sensor derive location [true|false]
|
||||
* @param language choose a language
|
||||
*/
|
||||
public static void go(Runnable onLoad, ArrayList<LoadLibrary> loadLibraries, Language language) {
|
||||
load(onLoad, loadLibraries, language, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads maps api
|
||||
*
|
||||
* @param onLoad callback on success
|
||||
* @param loadLibraries load additional libraries like geometry
|
||||
* @param sensor derive location [true|false]
|
||||
*/
|
||||
public static void go(Runnable onLoad, LoadLibrary[] loadLibraries) {
|
||||
ArrayList<LoadLibrary> loadLibrariesList = new ArrayList<LoadLibrary>(Arrays.asList(loadLibraries));
|
||||
load(onLoad, loadLibrariesList, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads maps api
|
||||
*
|
||||
* @param onLoad callback on success
|
||||
* @param loadLibraries load additional libraries like geometry
|
||||
* @param sensor derive location [true|false]
|
||||
* @param language choose a language
|
||||
*/
|
||||
public static void go(Runnable onLoad, LoadLibrary[] loadLibraries, Language language) {
|
||||
ArrayList<LoadLibrary> loadLibrariesList = new ArrayList<LoadLibrary>(Arrays.asList(loadLibraries));
|
||||
load(onLoad, loadLibrariesList, language, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads maps api
|
||||
*
|
||||
* @param onLoad callback on success
|
||||
* @param sensor derive location [true|false]
|
||||
* @param otherParams add additional params. like "key=YOUR_API_KEY"
|
||||
*/
|
||||
public static void go(Runnable onLoad, String otherParams) {
|
||||
load(onLoad, null, null, otherParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads maps api
|
||||
*
|
||||
* @param onLoad callback on success
|
||||
* @param loadLibraries load additional libraries like geometry
|
||||
* @param sensor sensor derive location [true|false]
|
||||
* @param otherParams add additional params. like "key=YOUR_API_KEY"
|
||||
*/
|
||||
public static void go(Runnable onLoad, ArrayList<LoadLibrary> loadLibraries, String otherParams) {
|
||||
load(onLoad, loadLibraries, null, otherParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads maps api
|
||||
*
|
||||
* @param onLoad callback on success
|
||||
* @param loadLibraries load additional libraries like geometry
|
||||
* @param sensor sensor derive location [true|false]
|
||||
* @param language choose a language
|
||||
* @param otherParams add additional params. like "key=YOUR_API_KEY"
|
||||
*/
|
||||
public static void go(Runnable onLoad, ArrayList<LoadLibrary> loadLibraries, Language language,
|
||||
String otherParams) {
|
||||
load(onLoad, loadLibraries, language, otherParams);
|
||||
}
|
||||
|
||||
private static void load(Runnable onLoad, ArrayList<LoadLibrary> loadLibraries, Language language,
|
||||
String otherParams) {
|
||||
|
||||
if (loadLibraries != null) {
|
||||
otherParams += "&" + getLibraries(loadLibraries);
|
||||
}
|
||||
|
||||
if (language != null) {
|
||||
otherParams += "&language=" + language.getValue();
|
||||
}
|
||||
|
||||
AjaxLoaderOptions settings = AjaxLoaderOptions.newInstance();
|
||||
settings.setOtherParms(otherParams);
|
||||
AjaxLoader.loadApi("maps", API_VERSION, onLoad, settings);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the url libraries parameter
|
||||
*
|
||||
* @param loadLibraries
|
||||
*/
|
||||
private static String getLibraries(ArrayList<LoadLibrary> loadLibraries) {
|
||||
if (loadLibraries == null) {
|
||||
return "";
|
||||
}
|
||||
String s = "libraries=";
|
||||
Iterator<LoadLibrary> itr = loadLibraries.iterator();
|
||||
int i = 0;
|
||||
while (itr.hasNext()) {
|
||||
LoadLibrary ll = itr.next();
|
||||
if (ll != null) {
|
||||
if (i > 0) {
|
||||
s += ",";
|
||||
}
|
||||
s += ll.value();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* private constructor
|
||||
*/
|
||||
private LoadApi() {
|
||||
}
|
||||
}
|
||||
+618
@@ -0,0 +1,618 @@
|
||||
package com.google.gwt.maps.client;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.dom.client.Element;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.maps.client.base.LatLng;
|
||||
import com.google.gwt.maps.client.base.LatLngBounds;
|
||||
import com.google.gwt.maps.client.controls.ControlPosition;
|
||||
import com.google.gwt.maps.client.events.MapEventType;
|
||||
import com.google.gwt.maps.client.events.MapHandlerRegistration;
|
||||
import com.google.gwt.maps.client.events.bounds.BoundsChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.bounds.BoundsChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.center.CenterChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.center.CenterChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.click.ClickEventFormatter;
|
||||
import com.google.gwt.maps.client.events.click.ClickMapHandler;
|
||||
import com.google.gwt.maps.client.events.dblclick.DblClickEventFormatter;
|
||||
import com.google.gwt.maps.client.events.dblclick.DblClickMapHandler;
|
||||
import com.google.gwt.maps.client.events.drag.DragEventFormatter;
|
||||
import com.google.gwt.maps.client.events.drag.DragMapHandler;
|
||||
import com.google.gwt.maps.client.events.dragend.DragEndEventFormatter;
|
||||
import com.google.gwt.maps.client.events.dragend.DragEndMapHandler;
|
||||
import com.google.gwt.maps.client.events.dragstart.DragStartEventFormatter;
|
||||
import com.google.gwt.maps.client.events.dragstart.DragStartMapHandler;
|
||||
import com.google.gwt.maps.client.events.heading.HeadingChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.heading.HeadingChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.idle.IdleEventFormatter;
|
||||
import com.google.gwt.maps.client.events.idle.IdleMapHandler;
|
||||
import com.google.gwt.maps.client.events.maptypeid.MapTypeIdChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.maptypeid.MapTypeIdChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.mousemove.MouseMoveEventFormatter;
|
||||
import com.google.gwt.maps.client.events.mousemove.MouseMoveMapHandler;
|
||||
import com.google.gwt.maps.client.events.mouseout.MouseOutEventFormatter;
|
||||
import com.google.gwt.maps.client.events.mouseout.MouseOutMapHandler;
|
||||
import com.google.gwt.maps.client.events.mouseover.MouseOverEventFormatter;
|
||||
import com.google.gwt.maps.client.events.mouseover.MouseOverMapHandler;
|
||||
import com.google.gwt.maps.client.events.projection.ProjectionChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.projection.ProjectionChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.resize.ResizeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.resize.ResizeMapHandler;
|
||||
import com.google.gwt.maps.client.events.rightclick.RightClickEventFormatter;
|
||||
import com.google.gwt.maps.client.events.rightclick.RightClickMapHandler;
|
||||
import com.google.gwt.maps.client.events.tiles.TilesLoadedEventFormatter;
|
||||
import com.google.gwt.maps.client.events.tiles.TilesLoadedMapHandler;
|
||||
import com.google.gwt.maps.client.events.tilt.TiltChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.tilt.TiltChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.zoom.ZoomChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.zoom.ZoomChangeMapHandler;
|
||||
import com.google.gwt.maps.client.maptypes.MapTypeRegistry;
|
||||
import com.google.gwt.maps.client.maptypes.Projection;
|
||||
import com.google.gwt.maps.client.maptypes.StyledMapType;
|
||||
import com.google.gwt.maps.client.mvc.MVCArray;
|
||||
import com.google.gwt.maps.client.mvc.MVCObject;
|
||||
import com.google.gwt.maps.client.streetview.StreetViewPanoramaImpl;
|
||||
|
||||
/**
|
||||
* Creates a new map inside of the given HTML container, which is typically a DIV element <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#Map" >Map API Doc</a>
|
||||
*/
|
||||
public class MapImpl extends MVCObject<MapImpl> {
|
||||
|
||||
/**
|
||||
* Creates a new map inside of the given HTML container, which is typically a DIV element.
|
||||
*/
|
||||
protected MapImpl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new map inside of the given HTML container, which is typically a DIV element.
|
||||
*
|
||||
* @param element - map dom element container, like a div
|
||||
* @param options - {@link MapOptions}
|
||||
* @return {@link MapImpl}
|
||||
*/
|
||||
public final static MapImpl newInstance(Element element, MapOptions options) {
|
||||
return createJso(element, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* private native method
|
||||
*
|
||||
* @param id - dom element id
|
||||
* @param {@link MapOptions}
|
||||
*/
|
||||
private final static native MapImpl createJso(Element element, MapOptions options) /*-{
|
||||
return new $wnd.google.maps.Map(element, options);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Sets the viewport to contain the given bounds.
|
||||
*
|
||||
* @param bounds {@link LatLngBounds}
|
||||
*/
|
||||
public final native void fitBounds(LatLngBounds bounds) /*-{
|
||||
this.fitBounds(bounds);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the lat/lng bounds of the current viewport. If the map is not yet initialized (i.e. the mapType is still
|
||||
* null), or center and zoom have not been set then the result is null or undefined.
|
||||
*
|
||||
* @return {@link LatLngBounds}
|
||||
*/
|
||||
public final native LatLngBounds getBounds() /*-{
|
||||
return this.getBounds();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* return map center in coordinates
|
||||
*/
|
||||
public final native LatLng getCenter() /*-{
|
||||
return this.getCenter();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Get map's containing element
|
||||
*/
|
||||
public final native Element getDiv() /*-{
|
||||
return this.getDiv();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the compass heading of aerial imagery. The heading value is measured in degrees (clockwise) from cardinal
|
||||
* direction North.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public final native int getHeading() /*-{
|
||||
return this.getHeading() || 0;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets {@link MapTypeId}
|
||||
*
|
||||
* @return {@link MapTypeId}
|
||||
*/
|
||||
public final MapTypeId getMapTypeId() {
|
||||
return MapTypeId.fromValue(getMapTypeIdImpl());
|
||||
}
|
||||
|
||||
private final native String getMapTypeIdImpl() /*-{
|
||||
return this.getMapTypeId();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the current Projection. If the map is not yet initialized (i.e. the mapType is still null) then the result
|
||||
* is null. Listen to projection_changed and check its value to ensure it is not null.
|
||||
*
|
||||
* @return {@link Projection}
|
||||
*/
|
||||
public final native Projection getProjection() /*-{
|
||||
return this.getProjection();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the default StreetViewPanorama bound to the map, which may be a default panorama embedded within the map,
|
||||
* or the panorama set using setStreetView(). Changes to the map's streetViewControl will be reflected in the display
|
||||
* of such a bound panorama.
|
||||
*
|
||||
* @return {@link StreetViewPanoramaImpl}
|
||||
*/
|
||||
public final native StreetViewPanoramaImpl getStreetView() /*-{
|
||||
return this.getStreetView();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets Returns the angle of incidence for aerial imagery (available for SATELLITE and HYBRID map types) measured in
|
||||
* degrees from the viewport plane to the map plane. A value of 0 indicates no angle of incidence (no tilt) while 45°
|
||||
* imagery will return a value of 45.
|
||||
*/
|
||||
public final native int getTilt() /*-{
|
||||
return this.getTilt();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get zoom
|
||||
*/
|
||||
public final native int getZoom() /*-{
|
||||
return this.getZoom();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Changes the center of the map by the given distance in pixels. If the distance is less than both the width and
|
||||
* height of the map, the transition will be smoothly animated. Note that the map coordinate system increases from
|
||||
* west to east (for x values) and north to south (for y values).
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
*/
|
||||
public final native void panBy(int x, int y) /*-{
|
||||
this.panBy(x, y);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Changes the center of the map to the given LatLng. If the change is less than both the width and height of the map,
|
||||
* the transition will be smoothly animated.
|
||||
*
|
||||
* @param latLng
|
||||
*/
|
||||
public final native void panTo(LatLng latLng) /*-{
|
||||
this.panTo(latLng);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Pans the map by the minimum amount necessary to contain the given LatLngBounds. It makes no guarantee where on the
|
||||
* map the bounds will be, except that as much of the bounds as possible will be visible. The bounds will be
|
||||
* positioned inside the area bounded by the map type and navigation (pan, zoom, and Street View) controls, if they
|
||||
* are present on the map. If the bounds is larger than the map, the map will be shifted to include the northwest
|
||||
* corner of the bounds. If the change in the map's position is less than both the width and height of the map, the
|
||||
* transition will be smoothly animated.
|
||||
*
|
||||
* @param latLngBounds
|
||||
*/
|
||||
public final native void panToBounds(LatLngBounds latLngBounds) /*-{
|
||||
this.panToBounds(latLngBounds);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set center
|
||||
*
|
||||
* @param latlng
|
||||
*/
|
||||
public final native void setCenter(LatLng latlng) /*-{
|
||||
this.setCenter(latlng);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Sets the compass heading for aerial imagery measured in degrees from cardinal direction North.
|
||||
*
|
||||
* @param heading
|
||||
*/
|
||||
public final native void setHeading(int heading) /*-{
|
||||
this.setHeading(heading);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set MapTypeId
|
||||
*
|
||||
* @param mapTypeId
|
||||
*/
|
||||
public final void setMapTypeId(MapTypeId mapTypeId) {
|
||||
setMapTypeIdImpl(mapTypeId.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* set MapTypeId
|
||||
*
|
||||
* @param mapTypeId
|
||||
*/
|
||||
public final void setMapTypeId(String mapTypeId) {
|
||||
setMapTypeIdImpl(mapTypeId);
|
||||
}
|
||||
|
||||
private final native void setMapTypeIdImpl(String mapTypeId) /*-{
|
||||
this.setMapTypeId(mapTypeId);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set MapOptions
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
public final native void setOptions(MapOptions options) /*-{
|
||||
this.setOptions(options);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Sets the angle of incidence for aerial imagery (available for SATELLITE and HYBRID map types) measured in degrees
|
||||
* from the viewport plane to the map plane. The only supported values are 0, indicating no angle of incidence (no
|
||||
* tilt), and 45 indicating a tilt of 45°.
|
||||
*
|
||||
* @param panorama
|
||||
*/
|
||||
public final native void setStreetView(StreetViewPanoramaImpl panorama) /*-{
|
||||
this.setStreetView(panorama);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Sets the angle of incidence for aerial imagery (available for SATELLITE and HYBRID map types) measured in degrees
|
||||
* from the viewport plane to the map plane. The only supported values are 0, indicating no angle of incidence (no
|
||||
* tilt), and 45 indicating a tilt of 45°.
|
||||
*
|
||||
* @param tilt
|
||||
*/
|
||||
public final native void setTilt(int tilt) /*-{
|
||||
this.setTilt(tilt);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets map zoom
|
||||
*
|
||||
* @param zoom
|
||||
*/
|
||||
public final native void setZoom(int zoom) /*-{
|
||||
this.setZoom(zoom);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* TODO sets Additional controls to attach to the map. To add a control to the map, add the control's
|
||||
* <code><div></code> to the MVCArray corresponding to the ControlPosition where it should be rendered.
|
||||
*
|
||||
* @param controls
|
||||
*/
|
||||
public final native void setControls(MVCArray<Element> controls) /*-{
|
||||
this.controls = controls;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets Additional controls to attach to the map. To add a control to the map, add the control's
|
||||
* <code><div></code> to the MVCArray corresponding to the ControlPosition where it should be rendered.
|
||||
*
|
||||
* @param controlPosition
|
||||
* @param element
|
||||
*/
|
||||
public final void setControls(ControlPosition controlPosition, Element element) {
|
||||
setControls(controlPosition.value(), element);
|
||||
}
|
||||
|
||||
private final native void setControls(int controlPosition, Element element) /*-{
|
||||
this.controls[controlPosition].push(element);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* TODO gets Additional controls to attach to the map. To add a control to the map, add the control's
|
||||
* <code><div></code> to the MVCArray corresponding to the ControlPosition where it should be rendered.
|
||||
*/
|
||||
public final native MVCArray<Element> getControls() /*-{
|
||||
return this.controls;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* returns all controls for a controlPosition
|
||||
*
|
||||
* @param controlPosition
|
||||
* @return controls
|
||||
*/
|
||||
public final MVCArray<Element> getControls(ControlPosition controlPosition) {
|
||||
return getControls(controlPosition.value());
|
||||
}
|
||||
|
||||
/**
|
||||
* returns all controls for a controlPosition
|
||||
*
|
||||
* @param controlPosition
|
||||
* @return controls
|
||||
*/
|
||||
private final native MVCArray<Element> getControls(int controlPosition) /*-{
|
||||
return this.controls[controlPosition];
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* TODO sets A registry of MapType instances by string ID.
|
||||
*
|
||||
* @param mapTypes
|
||||
*/
|
||||
public final native void setMapTypesRegistry(MapTypeRegistry mapTypes) /*-{
|
||||
this.mapTypes = mapTypes;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Set the custom map type into the map's registry
|
||||
*
|
||||
* @param mapTypeId
|
||||
* @param styledType
|
||||
*/
|
||||
public final native void setCustomMapType(String mapTypeId, StyledMapType styledType) /*-{
|
||||
this.mapTypes.set(mapTypeId, styledType);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets A registry of MapType instances by string ID.
|
||||
*/
|
||||
public final native MapTypeRegistry getMapTypeRegistry() /*-{
|
||||
return this.mapTypes;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* TODO sets Additional map types to overlay.
|
||||
*
|
||||
* @param overlayMapTypes
|
||||
*/
|
||||
public final native void setOverlayMapTypes(MVCArray<JavaScriptObject> overlayMapTypes) /*-{
|
||||
this.overlayMapTypes = overlayMapTypes;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* TODO gets Additional map types to overlay.
|
||||
*/
|
||||
public final native MVCArray<JavaScriptObject> getOverlayMapTypes() /*-{
|
||||
return this.overlayMapTypes;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Has to be called to resize the map if the canvas has changed.
|
||||
*/
|
||||
public final native void triggerResize() /*-{
|
||||
$wnd.google.maps.event.trigger(this, 'resize');
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* This event is fired when the viewport bounds have changed.
|
||||
*
|
||||
* @param handler {@link BoundsChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addBoundsChangeHandler(BoundsChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.BOUNDS_CHANGED, handler,
|
||||
new BoundsChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map center property changes.
|
||||
*
|
||||
* @param handler {@link CenterChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addCenterChangeHandler(CenterChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.CENTER_CHANGED, handler,
|
||||
new CenterChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user clicks on the map (but not when they click on a marker or infowindow).
|
||||
*
|
||||
* @param handler {@link ClickMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addClickHandler(ClickMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.CLICK, handler, new ClickEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user double-clicks on the map. Note that the click event will also fire, right before
|
||||
* this one.
|
||||
*
|
||||
* @param handler {@link DblClickMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addDblClickHandler(DblClickMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.DBLCLICK, handler, new DblClickEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is repeatedly fired while the user drags the map.
|
||||
*
|
||||
* @param handler {@link DragMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addDragHandler(DragMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.DRAG, handler, new DragEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user stops dragging the map.
|
||||
*
|
||||
* @param handler {@link DragEndMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addDragEndHandler(DragEndMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.DRAGEND, handler, new DragEndEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user starts dragging the map.
|
||||
*
|
||||
* @param handler {@link DragStartMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addDragStartHandler(DragStartMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.DRAGSTART, handler, new DragStartEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map heading property changes.
|
||||
*
|
||||
* @param handler {@link HeadingChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addHeadingChangeHandler(HeadingChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.HEADING_CHANGED, handler,
|
||||
new HeadingChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map becomes idle after panning or zooming.
|
||||
*
|
||||
* @param handler {@link IdleMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addIdleHandler(IdleMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.IDLE, handler, new IdleEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the mapTypeId property changes.
|
||||
*
|
||||
* @param handler {@link MapTypeIdChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addMapTypeIdChangeHandler(MapTypeIdChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.MAPTYPEID_CHANGED, handler,
|
||||
new MapTypeIdChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired whenever the user's mouse moves over the map container.
|
||||
*
|
||||
* @param handler {@link MouseMoveMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addMouseMoveHandler(MouseMoveMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.MOUSEMOVE, handler, new MouseMoveEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user's mouse exits the map container.
|
||||
*
|
||||
* @param handler {@link MouseOutMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addMouseOutMoveHandler(MouseOutMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.MOUSEOUT, handler, new MouseOutEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user's mouse enters the map container.
|
||||
*
|
||||
* @param handler {@link MouseOverMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addMouseOverHandler(MouseOverMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.MOUSEOVER, handler, new MouseOverEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the projection has changed.
|
||||
*
|
||||
* @param handler {@link ProjectionChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addProjectionChangeHandler(ProjectionChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.PROJECTION_CHANGED, handler,
|
||||
new ProjectionChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* Developers should trigger this event on the map when the div changes size: google.maps.event.trigger(map, 'resize')
|
||||
* .
|
||||
*
|
||||
* @param handler {@link ResizeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addResizeHandler(ResizeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.RESIZE, handler, new ResizeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the DOM contextmenu event is fired on the map container.
|
||||
*
|
||||
* @param handler {@link RightClickMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addRightClickHandler(RightClickMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.RIGHTCLICK, handler, new RightClickEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the visible tiles have finished loading.
|
||||
*
|
||||
* @param handler {@link TilesLoadedMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addTilesLoadedHandler(TilesLoadedMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.TILESLOADED, handler, new TilesLoadedEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map tilt property changes.
|
||||
*
|
||||
* @param handler {@link TiltChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addTiltChangeHandler(TiltChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.TILT_CHANGED, handler, new TiltChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map zoom property changes.
|
||||
*
|
||||
* @param handler {@link ZoomChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public final HandlerRegistration addZoomChangeHandler(ZoomChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.ZOOM_CHANGED, handler, new ZoomChangeEventFormatter());
|
||||
}
|
||||
|
||||
}
|
||||
+745
@@ -0,0 +1,745 @@
|
||||
package com.google.gwt.maps.client;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.ArrayHelper;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArray;
|
||||
import com.google.gwt.maps.client.base.LatLng;
|
||||
import com.google.gwt.maps.client.controls.MapTypeControlOptions;
|
||||
import com.google.gwt.maps.client.controls.MapTypeStyle;
|
||||
import com.google.gwt.maps.client.controls.OverviewMapControlOptions;
|
||||
import com.google.gwt.maps.client.controls.PanControlOptions;
|
||||
import com.google.gwt.maps.client.controls.RotateControlOptions;
|
||||
import com.google.gwt.maps.client.controls.ScaleControlOptions;
|
||||
import com.google.gwt.maps.client.controls.StreetViewControlOptions;
|
||||
import com.google.gwt.maps.client.controls.ZoomControlOptions;
|
||||
|
||||
/**
|
||||
* Map rendering options<br>
|
||||
* <b>Note:</b> Defaults to LatLng(26.4,-9) <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#MapOptions" >MapOptions API
|
||||
* Doc</a>
|
||||
*/
|
||||
public class MapOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* This will tell the map how to render and with with what features<br>
|
||||
* Use newInstance();
|
||||
*/
|
||||
protected MapOptions() {
|
||||
}
|
||||
|
||||
public static final double DEFAULT_LATLNG_LAT = 26.4d;
|
||||
public static final double DEFAULT_LATLNG_LNG = -9d;
|
||||
|
||||
/**
|
||||
* Create a new Instance of the MapOptions This will also create a defaults center, mapTypeId and Zoom
|
||||
*
|
||||
* @return MapOptions
|
||||
*/
|
||||
public final static MapOptions newInstance() {
|
||||
MapOptions options = newInstanceDefault();
|
||||
setDefaults(options);
|
||||
return options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Instance of the MapOptions
|
||||
*
|
||||
* @param withdefaults - [true]= setup required defaults, center, mapTypeId and Zoom. [false]= will not use defaults
|
||||
* @return MapOptions
|
||||
*/
|
||||
public final static MapOptions newInstance(boolean withdefaults) {
|
||||
MapOptions options = newInstanceDefault();
|
||||
if (withdefaults == true) {
|
||||
setDefaults(options);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Required defaults, this should help prevent setup errors<br>
|
||||
* NOTE: These are the defaults as would be applied to a map if no options were used. They are set here so that NPE's
|
||||
* are not thrown if you access an unset field.
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
private static void setDefaults(MapOptions options) {
|
||||
options.setCenter(LatLng.newInstance(DEFAULT_LATLNG_LAT, DEFAULT_LATLNG_LNG));
|
||||
options.setMapTypeId(MapTypeId.ROADMAP);
|
||||
options.setZoom(0);
|
||||
options.setDisableDefaultUi(false);
|
||||
options.setDisableDoubleClickZoom(false);
|
||||
options.setDraggable(true);
|
||||
options.setDraggableCursor(null);
|
||||
options.setDraggingCursor(null);
|
||||
options.setHeading(0);
|
||||
options.setKeyboardShortcuts(true);
|
||||
options.setMapTypeControl(true);
|
||||
options.setScrollWheel(true);
|
||||
options.setNoClear(false);
|
||||
options.setRotateControl(false);
|
||||
options.setTilt(0);
|
||||
options.setScaleControl(false);
|
||||
options.setStreetViewControl(true);
|
||||
options.setStreetViewControlOptions(null);
|
||||
options.setOverviewMapControl(false);
|
||||
options.setPanControl(true);
|
||||
options.setZoomControl(true);
|
||||
options.setMapMaker(false);
|
||||
// Max/Min zoom not set with default here because it depends on the map type in use
|
||||
// We don't want to risk overriding that
|
||||
}
|
||||
|
||||
/**
|
||||
* setup a javascript object to store the values in
|
||||
*
|
||||
* @return MapOptions
|
||||
*/
|
||||
private final static MapOptions newInstanceDefault() {
|
||||
JavaScriptObject jso = JavaScriptObject.createObject();
|
||||
// WorkAroundUtils.removeGwtObjectId(jso); TODO Still needed?
|
||||
return jso.cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* set Color used for the background of the Map div. This color will be visible when tiles have not yet loaded as the
|
||||
* user pans. This option can only be set when the map is initialized.
|
||||
*
|
||||
* @param backgroundColor
|
||||
*/
|
||||
public final native void setBackgroundColor(String backgroundColor) /*-{
|
||||
this.backgroundColor = backgroundColor;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get Color used for the background of the Map div.
|
||||
*/
|
||||
public final native String getBackgroundColor() /*-{
|
||||
return this.backgroundColor;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The initial Map center. Required.
|
||||
*
|
||||
* @param center {@link LatLng}
|
||||
*/
|
||||
public final native void setCenter(LatLng center) /*-{
|
||||
this.center = center;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get {@link LatLng}
|
||||
*
|
||||
* @return {@link LatLng}
|
||||
*/
|
||||
public final native LatLng getCenter() /*-{
|
||||
return this.center;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set Enables/disables all default UI. May be overridden individually.
|
||||
*
|
||||
* @param disableDefaultUI
|
||||
*/
|
||||
public final native void setDisableDefaultUi(boolean disableDefaultUI) /*-{
|
||||
this.disableDefaultUI = disableDefaultUI;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get Enables/disables all default UI. May be overridden individually.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean getDisableDefaultUi() /*-{
|
||||
return this.disableDefaultUI;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set Enables/disables zoom and center on double click. Enabled by default.
|
||||
*
|
||||
* @param disableDoubleClickZoom
|
||||
*/
|
||||
public final native void setDisableDoubleClickZoom(boolean disableDoubleClickZoom) /*-{
|
||||
this.disableDoubleClickZoom = disableDoubleClickZoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get enables/disables zoom and center on double click. Enabled by default.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean getDisableDoubleClickZoom() /*-{
|
||||
return this.disableDoubleClickZoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set If false, prevents the map from being dragged. Dragging is enabled by default.
|
||||
*
|
||||
* @param draggable
|
||||
*/
|
||||
public final native void setDraggable(boolean draggable) /*-{
|
||||
this.draggable = draggable;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get If false, prevents the map from being dragged. Dragging is enabled by default.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean getDraggable() /*-{
|
||||
return this.draggable;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The name or url of the cursor to display on a draggable object.
|
||||
*
|
||||
* @param draggableCursor
|
||||
*/
|
||||
public final native void setDraggableCursor(String draggableCursor) /*-{
|
||||
this.draggableCursor = draggableCursor;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The name or url of the cursor to display on a draggable object.
|
||||
*/
|
||||
public final native String getDraggableCursor() /*-{
|
||||
return this.draggableCursor;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The name or url of the cursor to display when an object is dragging.
|
||||
*
|
||||
* @param draggingCursor
|
||||
*/
|
||||
public final native void setDraggingCursor(String draggingCursor) /*-{
|
||||
this.draggingCursor = draggingCursor;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The name or url of the cursor to display when an object is dragging.
|
||||
*/
|
||||
public final native String getDraggingCursor() /*-{
|
||||
return this.draggingCursor;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are
|
||||
* snapped to the nearest available angle for which imagery is available.
|
||||
*
|
||||
* @param heading
|
||||
*/
|
||||
public final native void setHeading(int heading) /*-{
|
||||
this.heading = heading;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are
|
||||
* snapped to the nearest available angle for which imagery is available.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public final native int getHeading() /*-{
|
||||
return this.heading;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are enabled by default.
|
||||
*
|
||||
* @param keyboardShortcuts
|
||||
*/
|
||||
public final native void setKeyboardShortcuts(boolean keyboardShortcuts) /*-{
|
||||
this.keyboardShortcuts = keyboardShortcuts;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are enabled by default.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean getKeyboardShortcuts() /*-{
|
||||
return this.keyboardShortcuts;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The initial enabled/disabled state of the Map type control.
|
||||
*
|
||||
* @param mapTypeControl
|
||||
*/
|
||||
public final native void setMapTypeControl(boolean mapTypeControl) /*-{
|
||||
this.mapTypeControl = mapTypeControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The initial enabled/disabled state of the Map type control.
|
||||
*/
|
||||
public final native boolean getMapTypeControl() /*-{
|
||||
return this.mapTypeControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The initial display options for the Map type control.
|
||||
*
|
||||
* @param mapTypeControlOptions
|
||||
*/
|
||||
public final native void setMapTypeControlOptions(MapTypeControlOptions mapTypeControlOptions) /*-{
|
||||
this.mapTypeControlOptions = mapTypeControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The initial display options for the Map type control.
|
||||
*
|
||||
* @return {@link MapTypeControlOptions}
|
||||
*/
|
||||
public final native MapTypeControlOptions getMapTypeControlOptions() /*-{
|
||||
return this.mapTypeControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The initial Map {@link MapTypeId}. Required.
|
||||
*
|
||||
* @param mapTypeId {@link MapTypeId}
|
||||
*/
|
||||
public final void setMapTypeId(MapTypeId mapTypeId) {
|
||||
setMapTypeIdJs(mapTypeId.value());
|
||||
}
|
||||
|
||||
/**
|
||||
* The initial Map {@link MapTypeId}. Required.
|
||||
*
|
||||
* @param mapTypeId String
|
||||
*/
|
||||
public final void setMapTypeId(String mapTypeId) {
|
||||
setMapTypeIdStringJs(mapTypeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Native Use. Use setMapTypeId(MapTypeId mapTypeId). The initial Map {@link MapTypeId}. Required.
|
||||
*/
|
||||
private final native void setMapTypeIdJs(String type) /*-{
|
||||
this.mapTypeId = $wnd.google.maps.MapTypeId[type];
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Native Use. Apply a given user defined map type string. Required.
|
||||
*/
|
||||
private final native void setMapTypeIdStringJs(String type) /*-{
|
||||
this.mapTypeId = type;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Get {@link MapTypeId}
|
||||
*/
|
||||
public final MapTypeId getMapTypeId() {
|
||||
String type = getMapTypeIdJs();
|
||||
return MapTypeId.fromValue(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapTypeId string
|
||||
*/
|
||||
public final String getMapTypeIdString() {
|
||||
return getMapTypeIdJs();
|
||||
}
|
||||
|
||||
/**
|
||||
* native use. get {@link MapTypeId}
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
private final native String getMapTypeIdJs() /*-{
|
||||
return this.mapTypeId;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The maximum zoom level which will be displayed on the map. If omitted, or set to null, the maximum zoom from
|
||||
* the current map type is used instead.
|
||||
*
|
||||
* @param maxZoom
|
||||
*/
|
||||
public final native void setMaxZoom(int maxZoom) /*-{
|
||||
this.maxZoom = maxZoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get maxZoom
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public final native int getMaxZoom() /*-{
|
||||
return this.maxZoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The minimum zoom level which will be displayed on the map. If omitted, or set to null, the minimum zoom from
|
||||
* the current map type is used instead.
|
||||
*
|
||||
* @param minZoom
|
||||
*/
|
||||
public final native void setMinZoom(int minZoom) /*-{
|
||||
this.minZoom = minZoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The minimum zoom level which will be displayed on the map. If omitted, or set to null, the minimum zoom from
|
||||
* the current map type is used instead.
|
||||
*/
|
||||
public final native int getMinZoom() /*-{
|
||||
return this.minZoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set If true, do not clear the contents of the Map div.
|
||||
*
|
||||
* @param noClear
|
||||
*/
|
||||
public final native void setNoClear(boolean noClear) /*-{
|
||||
this.noClear = noClear;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get If true, do not clear the contents of the Map div.
|
||||
*/
|
||||
public final native boolean getNoClear() /*-{
|
||||
return this.noClear;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The enabled/disabled state of the Overview Map control.
|
||||
*
|
||||
* @param overviewMapControl
|
||||
*/
|
||||
public final native void setOverviewMapControl(boolean overviewMapControl) /*-{
|
||||
this.overviewMapControl = overviewMapControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The enabled/disabled state of the Overview Map control.
|
||||
*/
|
||||
public final native boolean getOverviewMapControl() /*-{
|
||||
return this.overviewMapControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The display options for the Overview Map control. {@link OverviewMapControlOptions}
|
||||
*
|
||||
* @param overviewMapControlOptions
|
||||
*/
|
||||
public final native void setOverviewMapControlOptions(OverviewMapControlOptions overviewMapControlOptions) /*-{
|
||||
this.overviewMapControlOptions = overviewMapControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The display options for the Overview Map control.
|
||||
*
|
||||
* @return {@link OverviewMapControlOptions}
|
||||
*/
|
||||
public final native OverviewMapControlOptions getOverviewMapControlOptions() /*-{
|
||||
return this.overviewMapControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The enabled/disabled state of the Pan control.
|
||||
*
|
||||
* @param panControl
|
||||
*/
|
||||
public final native void setPanControl(boolean panControl) /*-{
|
||||
this.panControl = panControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The enabled/disabled state of the Pan control.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean getPanControl() /*-{
|
||||
return this.panControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets The display options for the Pan control.
|
||||
*
|
||||
* @param panControlOptions {@link PanControlOptions}
|
||||
*/
|
||||
public final native void setPanControlOptions(PanControlOptions panControlOptions) /*-{
|
||||
this.panControlOptions = panControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets The display options for the Pan control.
|
||||
*
|
||||
* @return {@link PanControlOptions}
|
||||
*/
|
||||
public final native PanControlOptions getPanControlOptions() /*-{
|
||||
return this.panControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The enabled/disabled state of the Rotate control.
|
||||
*
|
||||
* @param rotateControl
|
||||
*/
|
||||
public final native void setRotateControl(boolean rotateControl) /*-{
|
||||
this.rotateControl = rotateControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The enabled/disabled state of the Rotate control.
|
||||
*/
|
||||
public final native boolean getRotateControl() /*-{
|
||||
return this.rotateControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The display options for the Rotate control.
|
||||
*
|
||||
* @param rotateControlOptions {@link RotateControlOptions}
|
||||
*/
|
||||
public final native void setRotateControlOptions(RotateControlOptions rotateControlOptions) /*-{
|
||||
this.rotateControlOptions = rotateControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get set The display options for the Rotate control.
|
||||
*
|
||||
* @return {@link RotateControlOptions}
|
||||
*/
|
||||
public final native RotateControlOptions getRotateControlOptions() /*-{
|
||||
return this.rotateControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The initial enabled/disabled state of the Scale control.
|
||||
*
|
||||
* @param scaleControl
|
||||
*/
|
||||
public final native void setScaleControl(boolean scaleControl) /*-{
|
||||
this.scaleControl = scaleControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The initial enabled/disabled state of the Scale control.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean getScaleControl() /*-{
|
||||
return this.scaleControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The initial display options for the Scale control.
|
||||
*
|
||||
* @param scaleControlOptions {@link ScaleControlOptions}
|
||||
*/
|
||||
public final native void setScaleControlOptions(ScaleControlOptions scaleControlOptions) /*-{
|
||||
this.scaleControlOptions = scaleControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The initial display options for the Scale control.
|
||||
*
|
||||
* @return {@link ScaleControlOptions}
|
||||
*/
|
||||
public final native ScaleControlOptions getScaleControlOptions() /*-{
|
||||
return this.scaleOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.
|
||||
*
|
||||
* @param scrollWheel
|
||||
*/
|
||||
public final native void setScrollWheel(boolean scrollWheel) /*-{
|
||||
this.scrollwheel = scrollWheel;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.
|
||||
*/
|
||||
public final native boolean getScrollWheel() /*-{
|
||||
return this.scrollwheel;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set A StreetViewPanorama to display when the Street View Pegman is dropped on the map. If no panorama is specified,
|
||||
* a default StreetViewPanorama will be displayed in the map's div when the pegman is dropped.
|
||||
*
|
||||
* @param streetViewControl
|
||||
*/
|
||||
public final native void setStreetViewControl(boolean streetViewControl) /*-{
|
||||
this.streetViewControl = streetViewControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get set A StreetViewPanorama to display when the Street View pegman is dropped on the map. If no panorama is
|
||||
* specified, a default StreetViewPanorama will be displayed in the map's div when the pegman is dropped.
|
||||
*/
|
||||
public final native boolean getStreetViewControl() /*-{
|
||||
return this.streetViewControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The initial enabled/disabled state of the Street View Pegman control. This control is part of the default UI, and
|
||||
* should be set to false when displaying a map type on which the Street View road overlay should not appear (e.g. a
|
||||
* non-Earth map type).
|
||||
*
|
||||
* @param streetViewControlOptions {@link StreetViewControlOptions}
|
||||
*/
|
||||
public final native void setStreetViewControlOptions(StreetViewControlOptions streetViewControlOptions) /*-{
|
||||
this.streetViewControlOptions = streetViewControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get The initial enabled/disabled state of the Street View Pegman control. This control is part of the default UI,
|
||||
* and should be set to false when displaying a map type on which the Street View road overlay should not appear (e.g.
|
||||
* a non-Earth map type).
|
||||
*
|
||||
* @return {@link StreetViewControlOptions}
|
||||
*/
|
||||
public final native StreetViewControlOptions getStreetViewControlOptions() /*-{
|
||||
return this.streetViewControlOptions;
|
||||
}-*/;
|
||||
|
||||
public final void setMapTypeStyles(MapTypeStyle[] styles) {
|
||||
JsArray<MapTypeStyle> arr = ArrayHelper.toJsArray(styles);
|
||||
setMapTypeStyles(arr);
|
||||
}
|
||||
|
||||
/**
|
||||
* set Styles to apply to each of the default map types. Note that styles will apply only to the labels and geometry
|
||||
* in Satellite/Hybrid and Terrain modes.
|
||||
*/
|
||||
private final native void setMapTypeStyles(JsArray<MapTypeStyle> styles) /*-{
|
||||
this.styles = styles;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get set Styles to apply to each of the default map types. Note that styles will apply only to the labels and
|
||||
* geometry in Satellite/Hybrid and Terrain modes.
|
||||
*/
|
||||
public final MapTypeStyle[] getMapTypeStyles() {
|
||||
JsArray<MapTypeStyle> arr = getMapTypeStylesJs();
|
||||
MapTypeStyle[] r = new MapTypeStyle[arr.length()];
|
||||
for (int i = 0; i < arr.length(); i++) {
|
||||
r[i] = arr.get(i);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* get set Styles to apply to each of the default map types. Note that styles will apply only to the labels and
|
||||
* geometry in Satellite/Hybrid and Terrain modes.
|
||||
*/
|
||||
private final native JsArray<MapTypeStyle> getMapTypeStylesJs() /*-{
|
||||
return this.styles;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets The angle of incidence of the map as measured in degrees from the viewport plane to the map plane. The only
|
||||
* currently supported values are 0, indicating no angle of incidence (no tilt), and 45, indicating a tilt of 45°.
|
||||
* 45° imagery is only available for SATELLITE and HYBRID map types, within some locations, and at some zoom
|
||||
* levels.
|
||||
*/
|
||||
public final native void setTilt(int tilt) /*-{
|
||||
this.tilt = tilt;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets The angle of incidence of the map as measured in degrees from the viewport plane to the map plane. The only
|
||||
* currently supported values are 0, indicating no angle of incidence (no tilt), and 45, indicating a tilt of 45°.
|
||||
* 45° imagery is only available for SATELLITE and HYBRID map types, within some locations, and at some zoom
|
||||
* levels.
|
||||
*/
|
||||
public final native int getTilt() /*-{
|
||||
return this.tilt;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The initial Map zoom level. Required.
|
||||
*
|
||||
* @param zoom
|
||||
*/
|
||||
public final native void setZoom(int zoom) /*-{
|
||||
this.zoom = zoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get Map zoom level
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public final native int getZoom() /*-{
|
||||
return this.zoom;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets The enabled/disabled state of the Zoom control.
|
||||
*
|
||||
* @param zoomControl
|
||||
*/
|
||||
public final native void setZoomControl(boolean zoomControl) /*-{
|
||||
this.zoomControl = zoomControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets The enabled/disabled state of the Zoom control.
|
||||
*/
|
||||
public final native boolean getZoomControl() /*-{
|
||||
return this.zoomControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Sets Map Maker usage.
|
||||
*
|
||||
* @param mapMaker True if Map Maker tiles should be used instead of regular tiles.
|
||||
*/
|
||||
public final native void setMapMaker(boolean mapMaker) /*-{
|
||||
this.mapMaker = mapMaker;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Gets Map Maker usage.
|
||||
*
|
||||
* @return True if Map Maker tiles are used instead of regular tiles.
|
||||
*/
|
||||
public final native boolean getMapMaker() /*-{
|
||||
return this.mapMaker;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets The display options for the Zoom control.
|
||||
*
|
||||
* @param zoomControlOptions
|
||||
*/
|
||||
public final native void setZoomControlOptions(ZoomControlOptions zoomControlOptions) /*-{
|
||||
this.zoomControlOptions = zoomControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets The display options for the Zoom control.
|
||||
*/
|
||||
public final native ZoomControlOptions getZoomControlOptions() /*-{
|
||||
return this.zoomControlOptions;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.google.gwt.maps.client;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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%
|
||||
*/
|
||||
|
||||
/**
|
||||
* Identifiers for common MapTypes <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#MapTypeId" >MapTypeId API Doc</a>
|
||||
*/
|
||||
public enum MapTypeId {
|
||||
|
||||
/**
|
||||
* This map type displays a transparent layer of major streets on satellite images.
|
||||
*/
|
||||
HYBRID,
|
||||
|
||||
/**
|
||||
* This map type displays a normal street map.
|
||||
*/
|
||||
ROADMAP,
|
||||
|
||||
/**
|
||||
* This map type displays satellite images.
|
||||
*/
|
||||
SATELLITE,
|
||||
|
||||
/**
|
||||
* This map type displays maps with physical features such as terrain and vegetation.
|
||||
*/
|
||||
TERRAIN;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static MapTypeId fromValue(String type) {
|
||||
return valueOf(type.toUpperCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
}
|
||||
+668
@@ -0,0 +1,668 @@
|
||||
package com.google.gwt.maps.client;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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 java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.maps.client.base.LatLng;
|
||||
import com.google.gwt.maps.client.base.LatLngBounds;
|
||||
import com.google.gwt.maps.client.controls.ControlPosition;
|
||||
import com.google.gwt.maps.client.events.MapHandlerRegistration;
|
||||
import com.google.gwt.maps.client.events.MapPanel;
|
||||
import com.google.gwt.maps.client.events.bounds.BoundsChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.center.CenterChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.click.ClickMapHandler;
|
||||
import com.google.gwt.maps.client.events.dblclick.DblClickMapHandler;
|
||||
import com.google.gwt.maps.client.events.drag.DragMapHandler;
|
||||
import com.google.gwt.maps.client.events.dragend.DragEndMapHandler;
|
||||
import com.google.gwt.maps.client.events.dragstart.DragStartMapHandler;
|
||||
import com.google.gwt.maps.client.events.heading.HeadingChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.idle.IdleMapHandler;
|
||||
import com.google.gwt.maps.client.events.maptypeid.MapTypeIdChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.mousemove.MouseMoveMapHandler;
|
||||
import com.google.gwt.maps.client.events.mouseout.MouseOutMapHandler;
|
||||
import com.google.gwt.maps.client.events.mouseover.MouseOverMapHandler;
|
||||
import com.google.gwt.maps.client.events.projection.ProjectionChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.resize.ResizeMapHandler;
|
||||
import com.google.gwt.maps.client.events.rightclick.RightClickMapHandler;
|
||||
import com.google.gwt.maps.client.events.tiles.TilesLoadedMapHandler;
|
||||
import com.google.gwt.maps.client.events.tilt.TiltChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.zoom.ZoomChangeMapHandler;
|
||||
import com.google.gwt.maps.client.maptypes.MapTypeRegistry;
|
||||
import com.google.gwt.maps.client.maptypes.Projection;
|
||||
import com.google.gwt.maps.client.maptypes.StyledMapType;
|
||||
import com.google.gwt.maps.client.mvc.MVCArray;
|
||||
import com.google.gwt.maps.client.mvc.MVCObjectWidget;
|
||||
import com.google.gwt.maps.client.streetview.StreetViewPanoramaImpl;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class MapWidget extends MVCObjectWidget<MapImpl> {
|
||||
|
||||
/**
|
||||
* added controls, must remove them when finished
|
||||
*/
|
||||
private HashMap<Integer, Widget> controls = null;
|
||||
|
||||
/**
|
||||
* Reconstruct the mapWidget from JSO
|
||||
*
|
||||
* @param impl
|
||||
* @return NULL if input is NULL
|
||||
*/
|
||||
public static MapWidget newInstance(MapImpl impl) {
|
||||
if (impl == null) {
|
||||
return null;
|
||||
}
|
||||
return new MapWidget(impl);
|
||||
}
|
||||
|
||||
/**
|
||||
* create a new Map Widget
|
||||
*
|
||||
* @param options {@link MapOptions}
|
||||
*/
|
||||
public MapWidget(MapOptions options) {
|
||||
Element div = DOM.createDiv();
|
||||
setElement(div);
|
||||
impl = MapImpl.newInstance(div, options);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetach() {
|
||||
super.onDetach();
|
||||
removeControls();
|
||||
}
|
||||
|
||||
private void removeControls() {
|
||||
if (controls == null) {
|
||||
return;
|
||||
}
|
||||
Collection<Widget> widgets = controls.values();
|
||||
Iterator<Widget> itr = widgets.iterator();
|
||||
while (itr.hasNext()) {
|
||||
Widget w = itr.next();
|
||||
w.removeFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* reconstruct the mapWidget from jso
|
||||
*
|
||||
* @param impl JavaScriptObject
|
||||
*/
|
||||
private MapWidget(MapImpl impl) {
|
||||
this.impl = impl;
|
||||
setElement(impl.getDiv());
|
||||
}
|
||||
|
||||
/**
|
||||
* get JavaScriptObject instance.
|
||||
*
|
||||
* @return {@link MapImpl}
|
||||
*/
|
||||
public MapImpl getJso() {
|
||||
return impl;
|
||||
}
|
||||
|
||||
/**
|
||||
* sets JavaScriptObject instance.
|
||||
*
|
||||
* @param impl {@link MapImpl}
|
||||
*/
|
||||
public void setJso(MapImpl impl) {
|
||||
this.impl = impl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the viewport to contain the given bounds.
|
||||
*
|
||||
* @param bounds {@link LatLngBounds}
|
||||
*/
|
||||
public void fitBounds(LatLngBounds bounds) {
|
||||
impl.fitBounds(bounds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the lat/lng bounds of the current viewport. If the map is not yet initialized (i.e. the mapType is still
|
||||
* null), or center and zoom have not been set then the result is null or undefined.
|
||||
*
|
||||
* @return {@link LatLngBounds}
|
||||
*/
|
||||
public LatLngBounds getBounds() {
|
||||
return impl.getBounds();
|
||||
}
|
||||
|
||||
/**
|
||||
* get Center
|
||||
*
|
||||
* @return {@link LatLng}
|
||||
*/
|
||||
public LatLng getCenter() {
|
||||
return impl.getCenter();
|
||||
}
|
||||
|
||||
/**
|
||||
* get Element
|
||||
*/
|
||||
public Element getDiv() {
|
||||
return impl.getDiv();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the compass heading of aerial imagery. The heading value is measured in degrees (clockwise) from cardinal
|
||||
* direction North.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public int getHeading() {
|
||||
return impl.getHeading();
|
||||
}
|
||||
|
||||
/**
|
||||
* gets {@link MapTypeId}
|
||||
*
|
||||
* @return {@link MapTypeId}
|
||||
*/
|
||||
public final MapTypeId getMapTypeId() {
|
||||
return impl.getMapTypeId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current Projection. If the map is not yet initialized (i.e. the mapType is still null) then the result
|
||||
* is null. Listen to projection_changed and check its value to ensure it is not null.
|
||||
*
|
||||
* @return {@link Projection}
|
||||
*/
|
||||
public Projection getProjection() {
|
||||
return impl.getProjection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default StreetViewPanorama bound to the map, which may be a default panorama embedded within the map,
|
||||
* or the panorama set using setStreetView(). Changes to the map's streetViewControl will be reflected in the display
|
||||
* of such a bound panorama.
|
||||
*
|
||||
* @return {@link StreetViewPanoramaImpl}
|
||||
*/
|
||||
public StreetViewPanoramaImpl getStreetView() {
|
||||
return impl.getStreetView();
|
||||
};
|
||||
|
||||
/**
|
||||
* gets Returns the angle of incidence for aerial imagery (available for SATELLITE and HYBRID map types) measured in
|
||||
* degrees from the viewport plane to the map plane. A value of 0 indicates no angle of incidence (no tilt) while 45°
|
||||
* imagery will return a value of 45.
|
||||
*/
|
||||
public int getTilt() {
|
||||
return impl.getTilt();
|
||||
};
|
||||
|
||||
/**
|
||||
* get zoom
|
||||
*/
|
||||
public int getZoom() {
|
||||
return impl.getZoom();
|
||||
};
|
||||
|
||||
/**
|
||||
* Changes the center of the map by the given distance in pixels. If the distance is less than both the width and
|
||||
* height of the map, the transition will be smoothly animated. Note that the map coordinate system increases from
|
||||
* west to east (for x values) and north to south (for y values).
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
*/
|
||||
public void panBy(int x, int y) {
|
||||
impl.panBy(x, y);
|
||||
};
|
||||
|
||||
/**
|
||||
* Changes the center of the map to the given LatLng. If the change is less than both the width and height of the map,
|
||||
* the transition will be smoothly animated.
|
||||
*
|
||||
* @param latLng
|
||||
*/
|
||||
public void panTo(LatLng latLng) {
|
||||
impl.panTo(latLng);
|
||||
};
|
||||
|
||||
/**
|
||||
* Pans the map by the minimum amount necessary to contain the given LatLngBounds. It makes no guarantee where on the
|
||||
* map the bounds will be, except that as much of the bounds as possible will be visible. The bounds will be
|
||||
* positioned inside the area bounded by the map type and navigation (pan, zoom, and Street View) controls, if they
|
||||
* are present on the map. If the bounds is larger than the map, the map will be shifted to include the northwest
|
||||
* corner of the bounds. If the change in the map's position is less than both the width and height of the map, the
|
||||
* transition will be smoothly animated.
|
||||
*
|
||||
* @param latLngBounds
|
||||
*/
|
||||
public void panToBounds(LatLngBounds latLngBounds) {
|
||||
impl.panToBounds(latLngBounds);
|
||||
};
|
||||
|
||||
/**
|
||||
* set center
|
||||
*
|
||||
* @param latlng
|
||||
*/
|
||||
public void setCenter(LatLng latlng) {
|
||||
impl.setCenter(latlng);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the compass heading for aerial imagery measured in degrees from cardinal direction North.
|
||||
*
|
||||
* @param heading
|
||||
*/
|
||||
public void setHeading(int heading) {
|
||||
impl.setHeading(heading);
|
||||
};
|
||||
|
||||
/**
|
||||
* set MapTypeId
|
||||
*
|
||||
* @param mapTypeId
|
||||
*/
|
||||
public final void setMapTypeId(MapTypeId mapTypeId) {
|
||||
impl.setMapTypeId(mapTypeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* set MapTypeId (custom id if not in standard enum)
|
||||
*
|
||||
* @param mapTypeId
|
||||
*/
|
||||
public final void setMapTypeId(String mapTypeId) {
|
||||
impl.setMapTypeId(mapTypeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* set MapOptions
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
public void setOptions(MapOptions options) {
|
||||
impl.setOptions(options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the angle of incidence for aerial imagery (available for SATELLITE and HYBRID map types) measured in degrees
|
||||
* from the viewport plane to the map plane. The only supported values are 0, indicating no angle of incidence (no
|
||||
* tilt), and 45 indicating a tilt of 45°.
|
||||
*
|
||||
* @param panorama
|
||||
*/
|
||||
public void setStreetView(StreetViewPanoramaImpl panorama) {
|
||||
impl.setStreetView(panorama);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the angle of incidence for aerial imagery (available for SATELLITE and HYBRID map types) measured in degrees
|
||||
* from the viewport plane to the map plane. The only supported values are 0, indicating no angle of incidence (no
|
||||
* tilt), and 45 indicating a tilt of 45°.
|
||||
*
|
||||
* @param tilt
|
||||
*/
|
||||
public void setTilt(int tilt) {
|
||||
impl.setTilt(tilt);
|
||||
};
|
||||
|
||||
/**
|
||||
* sets map zoom
|
||||
*
|
||||
* @param zoom
|
||||
*/
|
||||
public void setZoom(int zoom) {
|
||||
impl.setZoom(zoom);
|
||||
};
|
||||
|
||||
/**
|
||||
* TODO sets Additional controls to attach to the map. To add a control to the map, add the control's
|
||||
* <code><div></code> to the MVCArray corresponding to the ControlPosition where it should be rendered.
|
||||
*
|
||||
* @param controls
|
||||
*/
|
||||
public void setControls(MVCArray<Element> controls) {
|
||||
impl.setControls(controls);
|
||||
};
|
||||
|
||||
/**
|
||||
* sets Additional controls to attach to the map. To add a control to the map, add the control's
|
||||
* <code><div></code> to the MVCArray corresponding to the ControlPosition where it should be rendered.
|
||||
*
|
||||
* @param controlPosition
|
||||
* @param element
|
||||
*/
|
||||
public void setControls(ControlPosition controlPosition, Element element) {
|
||||
impl.setControls(controlPosition, element);
|
||||
};
|
||||
|
||||
/**
|
||||
* sets Additional controls to attach to the map. To add a control to the map, add the control's
|
||||
* <code><div></code> to the MVCArray corresponding to the ControlPosition where it should be rendered.
|
||||
*
|
||||
* @param controlPosition
|
||||
* @param widget
|
||||
*/
|
||||
public void setControls(ControlPosition controlPosition, Widget widget) {
|
||||
|
||||
// remove any pre-existing controls
|
||||
removePriorControlFirst(controlPosition);
|
||||
|
||||
// use a panel that controls onAttatch
|
||||
MapPanel mapPanel = new MapPanel();
|
||||
mapPanel.add(widget);
|
||||
|
||||
// add it to array for detaching
|
||||
if (controls == null) {
|
||||
controls = new HashMap<Integer, Widget>();
|
||||
}
|
||||
controls.put(controlPosition.value(), mapPanel);
|
||||
|
||||
// add it to the map
|
||||
impl.setControls(controlPosition, mapPanel.getElement());
|
||||
};
|
||||
|
||||
/**
|
||||
* remove an pre-existing control so we don't get a mem leak
|
||||
*
|
||||
* @param controlPosition
|
||||
* @param widget
|
||||
*/
|
||||
private void removePriorControlFirst(ControlPosition controlPosition) {
|
||||
if (controls == null) {
|
||||
return;
|
||||
}
|
||||
Widget w = controls.get(controlPosition.value());
|
||||
if (w == null) {
|
||||
return;
|
||||
}
|
||||
w.removeFromParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO gets Additional controls to attach to the map. To add a control to the map, add the control's
|
||||
* <code><div></code> to the MVCArray corresponding to the ControlPosition where it should be rendered.
|
||||
*/
|
||||
public MVCArray<Element> getControls() {
|
||||
return impl.getControls();
|
||||
}
|
||||
|
||||
/**
|
||||
* returns all controls for a controlPosition
|
||||
*
|
||||
* @param controlPosition
|
||||
* @return controls
|
||||
*/
|
||||
public MVCArray<Element> getControls(ControlPosition controlPosition) {
|
||||
return impl.getControls(controlPosition);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO sets A registry of MapType instances by string ID.
|
||||
*
|
||||
* @param mapTypes
|
||||
*/
|
||||
public void setMapTypesRegistry(MapTypeRegistry mapTypes) {
|
||||
impl.setMapTypesRegistry(mapTypes);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the custom map type into the map's registry
|
||||
*
|
||||
* @param mapTypeId
|
||||
* @param styledType
|
||||
*/
|
||||
public void setCustomMapType(String mapTypeId, StyledMapType styledType) {
|
||||
impl.setCustomMapType(mapTypeId, styledType);
|
||||
}
|
||||
|
||||
/**
|
||||
* gets a registry of MapType instances
|
||||
*/
|
||||
public MapTypeRegistry getMapTypeRegistry() {
|
||||
return impl.getMapTypeRegistry();
|
||||
};
|
||||
|
||||
/**
|
||||
* TODO sets Additional map types to overlay.
|
||||
*
|
||||
* @param overlayMapTypes
|
||||
*/
|
||||
public void setOverlayMapTypes(MVCArray<JavaScriptObject> overlayMapTypes) {
|
||||
impl.setOverlayMapTypes(overlayMapTypes);
|
||||
};
|
||||
|
||||
/**
|
||||
* TODO gets Additional map types to overlay.
|
||||
*/
|
||||
public MVCArray<JavaScriptObject> getOverlayMapTypes() {
|
||||
return impl.getOverlayMapTypes();
|
||||
};
|
||||
|
||||
/**
|
||||
* This event is fired when the viewport bounds have changed.
|
||||
*
|
||||
* @param handler {@link BoundsChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addBoundsChangeHandler(BoundsChangeMapHandler handler) {
|
||||
return impl.addBoundsChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map center property changes.
|
||||
*
|
||||
* @param handler {@link CenterChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addCenterChangeHandler(CenterChangeMapHandler handler) {
|
||||
return impl.addCenterChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user clicks on the map (but not when they click on a marker or infowindow).
|
||||
*
|
||||
* @param handler {@link ClickMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addClickHandler(ClickMapHandler handler) {
|
||||
return impl.addClickHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user double-clicks on the map. Note that the click event will also fire, right before
|
||||
* this one.
|
||||
*
|
||||
* @param handler {@link DblClickMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addDblClickHandler(DblClickMapHandler handler) {
|
||||
return impl.addDblClickHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is repeatedly fired while the user drags the map.
|
||||
*
|
||||
* @param handler {@link DragMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addDragHandler(DragMapHandler handler) {
|
||||
return impl.addDragHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user stops dragging the map.
|
||||
*
|
||||
* @param handler {@link DragEndMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addDragEndHandler(DragEndMapHandler handler) {
|
||||
return impl.addDragEndHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user starts dragging the map.
|
||||
*
|
||||
* @param handler {@link DragStartMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addDragStartHandler(DragStartMapHandler handler) {
|
||||
return impl.addDragStartHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map heading property changes.
|
||||
*
|
||||
* @param handler {@link HeadingChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addHeadingChangeHandler(HeadingChangeMapHandler handler) {
|
||||
return impl.addHeadingChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map becomes idle after panning or zooming.
|
||||
*
|
||||
* @param handler {@link IdleMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addIdleHandler(IdleMapHandler handler) {
|
||||
return impl.addIdleHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the mapTypeId property changes.
|
||||
*
|
||||
* @param handler {@link MapTypeIdChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addMapTypeIdChangeHandler(MapTypeIdChangeMapHandler handler) {
|
||||
return impl.addMapTypeIdChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired whenever the user's mouse moves over the map container.
|
||||
*
|
||||
* @param handler {@link MouseMoveMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addMouseMoveHandler(MouseMoveMapHandler handler) {
|
||||
return impl.addMouseMoveHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user's mouse exits the map container.
|
||||
*
|
||||
* @param handler {@link MouseOutMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addMouseOutMoveHandler(MouseOutMapHandler handler) {
|
||||
return impl.addMouseOutMoveHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user's mouse enters the map container.
|
||||
*
|
||||
* @param handler {@link MouseOverMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addMouseOverHandler(MouseOverMapHandler handler) {
|
||||
return impl.addMouseOverHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the projection has changed.
|
||||
*
|
||||
* @param handler {@link ProjectionChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addProjectionChangeHandler(ProjectionChangeMapHandler handler) {
|
||||
return impl.addProjectionChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Developers should trigger this event on the map when the div changes size: google.maps.event.trigger(map, 'resize')
|
||||
* .
|
||||
*
|
||||
* @param handler {@link ResizeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addResizeHandler(ResizeMapHandler handler) {
|
||||
return impl.addResizeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the DOM contextmenu event is fired on the map container.
|
||||
*
|
||||
* @param handler {@link RightClickMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addRightClickHandler(RightClickMapHandler handler) {
|
||||
return impl.addRightClickHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the visible tiles have finished loading.
|
||||
*
|
||||
* @param handler {@link TilesLoadedMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addTilesLoadedHandler(TilesLoadedMapHandler handler) {
|
||||
return impl.addTilesLoadedHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map tilt property changes.
|
||||
*
|
||||
* @param handler {@link TiltChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addTiltChangeHandler(TiltChangeMapHandler handler) {
|
||||
return impl.addTiltChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the map zoom property changes.
|
||||
*
|
||||
* @param handler {@link ZoomChangeMapHandler}
|
||||
* @return {@link MapHandlerRegistration}
|
||||
*/
|
||||
public HandlerRegistration addZoomChangeHandler(ZoomChangeMapHandler handler) {
|
||||
return impl.addZoomChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Has to be called to resize the map if the canvas has changed.
|
||||
*/
|
||||
public final void triggerResize() {
|
||||
final LatLng center = getCenter();
|
||||
impl.triggerResize();
|
||||
setCenter(center);
|
||||
}
|
||||
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
package com.google.gwt.maps.client.adsense;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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%
|
||||
*/
|
||||
|
||||
/**
|
||||
* Identifiers used to specify an AdSense For Content format. <br>
|
||||
* <br>
|
||||
* See <a href="https://google.com/adsense/adformats">AdFormats</a><br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#AdFormat">AdFormat API Doc</a> <br>
|
||||
* <br>
|
||||
* <b>Note:</b> class is <code>$wnd.google.maps.adsense.AdFormat</code>
|
||||
*/
|
||||
public enum AdFormat {
|
||||
|
||||
/**
|
||||
* A horizontal "banner" ad. (468x60px)
|
||||
*/
|
||||
BANNER("468x60_as"),
|
||||
|
||||
/**
|
||||
* A small ad. (125x125px)
|
||||
*/
|
||||
BUTTON("125x125_as"),
|
||||
|
||||
/**
|
||||
* A smaller horizontal "banner" ad. (234x60px)
|
||||
*/
|
||||
HALF_BANNER("234x60_as"),
|
||||
|
||||
/**
|
||||
* A large rectangulare ad. (336x280px)
|
||||
*/
|
||||
LARGE_RECTANGLE("336x280_as"),
|
||||
|
||||
/**
|
||||
* A fully horizontal display area. (728x90px)
|
||||
*/
|
||||
LEADERBOARD("728x90_as"),
|
||||
|
||||
/**
|
||||
* A medium rectangular ad. (300x250px)
|
||||
*/
|
||||
MEDIUM_RECTANGLE("300x250_as"),
|
||||
|
||||
/**
|
||||
* A large vertical ad. (120x600px)
|
||||
*/
|
||||
SKYSCRAPER("120x600_as"),
|
||||
|
||||
/**
|
||||
* A small rectangular ad. (180x150px)
|
||||
*/
|
||||
SMALL_RECTANGLE("180x150_as"),
|
||||
|
||||
/**
|
||||
* A smaller square ad. (200x200px)
|
||||
*/
|
||||
SMALL_SQUARE("200x200_as"),
|
||||
|
||||
/**
|
||||
* A square ad with large type. (250x250px)
|
||||
*/
|
||||
SQUARE("250x250_as"),
|
||||
|
||||
/**
|
||||
* A medium-sized vertical ad. (120x240px)
|
||||
*/
|
||||
VERTICAL_BANNER("120x240_as"),
|
||||
|
||||
/**
|
||||
* A wide, vertical ad using larger type. (160x600px)
|
||||
*/
|
||||
WIDE_SKYSCRAPER("160x600_as");
|
||||
|
||||
private String value;
|
||||
|
||||
AdFormat(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return name() + "(" + value + ")";
|
||||
}
|
||||
|
||||
public static AdFormat fromValue(String value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
AdFormat r = null;
|
||||
if (value.equals("468x60_as")) {
|
||||
r = BANNER;
|
||||
|
||||
} else if (value.equals("125x125_as")) {
|
||||
r = BUTTON;
|
||||
|
||||
} else if (value.equals("234x60_as")) {
|
||||
r = HALF_BANNER;
|
||||
|
||||
} else if (value.equals("336x280_as")) {
|
||||
r = LARGE_RECTANGLE;
|
||||
|
||||
} else if (value.equals("728x90_as")) {
|
||||
r = LEADERBOARD;
|
||||
|
||||
} else if (value.equals("300x250_as")) {
|
||||
r = MEDIUM_RECTANGLE;
|
||||
|
||||
} else if (value.equals("120x600_as")) {
|
||||
r = SKYSCRAPER;
|
||||
|
||||
} else if (value.equals("180x150_as")) {
|
||||
r = SMALL_RECTANGLE;
|
||||
|
||||
} else if (value.equals("200x200_as")) {
|
||||
r = SMALL_SQUARE;
|
||||
|
||||
} else if (value.equals("250x250_as")) {
|
||||
r = SQUARE;
|
||||
|
||||
} else if (value.equals("120x240_as")) {
|
||||
r = VERTICAL_BANNER;
|
||||
|
||||
} else if (value.equals("160x600_as")) {
|
||||
r = WIDE_SKYSCRAPER;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
package com.google.gwt.maps.client.adsense;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.dom.client.Element;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.maps.client.MapImpl;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
import com.google.gwt.maps.client.controls.ControlPosition;
|
||||
import com.google.gwt.maps.client.events.MapEventType;
|
||||
import com.google.gwt.maps.client.events.MapHandlerRegistration;
|
||||
import com.google.gwt.maps.client.events.channelnumber.ChannelNumberChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.channelnumber.ChannelNumberChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.format.FormatChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.format.FormatChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.mapchange.MapChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.mapchange.MapChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.position.PositionChangeEventFormatter;
|
||||
import com.google.gwt.maps.client.events.position.PositionChangeMapHandler;
|
||||
import com.google.gwt.maps.client.mvc.MVCObject;
|
||||
|
||||
/**
|
||||
* Implements AdSense for Content advertising on an associated map. To use an AdUnit, you must obtain and specify an
|
||||
* AdSense for Content publisher ID within the AdUnit's constructor options. This class extends MVCObject. <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#AdUnit" >AdUnit API Doc</a>
|
||||
*/
|
||||
public class AdUnitImpl extends MVCObject<AdUnitImpl> {
|
||||
|
||||
private final static native JavaScriptObject createJso(Element container, AdUnitOptions options) /*-{
|
||||
return new $wnd.google.maps.adsense.AdUnit(container, options);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Creates an AdSense for Content display ad on the associated map.
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
public final static AdUnitImpl newInstance(Element container, AdUnitOptions options) {
|
||||
return createJso(container, options).cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* use newInstance();
|
||||
*/
|
||||
protected AdUnitImpl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's channelNumber property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addChannelNumberChangeHandler(ChannelNumberChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.CHANNELNUMBER_CHANGED, handler,
|
||||
new ChannelNumberChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's format property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addFormatChangeHandler(FormatChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.FORMAT_CHANGED, handler,
|
||||
new FormatChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's map property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addMapChangeHandler(MapChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.MAP_CHANGED, handler, new MapChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's position property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addPositionChangeHandler(PositionChangeMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.POSITION_CHANGED, handler,
|
||||
new PositionChangeEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the channel number in use by this AdUnit.
|
||||
*/
|
||||
public final native String getChannelNumber() /*-{
|
||||
return this.getChannelNumber();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the containing element of the AdUnit.
|
||||
*/
|
||||
public final native Element getContainer() /*-{
|
||||
return this.getContainer();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the format in use by this AdUnit.
|
||||
*/
|
||||
public final AdFormat getFormat() {
|
||||
return AdFormat.fromValue(getFormatImpl());
|
||||
}
|
||||
|
||||
public final native String getFormatImpl() /*-{
|
||||
return this.getFormat();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the map to which this AdUnit's ads are targeted.
|
||||
*/
|
||||
public final MapWidget getMap() {
|
||||
return MapWidget.newInstance(getMapImpl());
|
||||
}
|
||||
|
||||
private final native MapImpl getMapImpl() /*-{
|
||||
return this.getMap();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the ControlPosition at which this AdUnit is displayed on the map.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.getPosition();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the specified AdSense For Content publisher ID.
|
||||
*/
|
||||
public final native String getPublisherId() /*-{
|
||||
return this.getPublisherId();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Specifies the channel number for this AdUnit. Channel numbers are optional and can be created for Google AdSense
|
||||
* tracking.
|
||||
*
|
||||
* @param channelNumber
|
||||
*/
|
||||
public final native void setChannelNumber(String channelNumber) /*-{
|
||||
this.channelNumber = channelNumber;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Specifies the display format for this AdUnit.
|
||||
*
|
||||
* @param format
|
||||
*/
|
||||
public final native void setFormat(AdFormat format) /*-{
|
||||
this.setFormat(format);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Associates this AdUnit with the specified map. Ads will be targeted to the map's viewport. The map must be
|
||||
* specified in order to display ads.
|
||||
*
|
||||
* @param mapWidget
|
||||
*/
|
||||
public final void setMap(MapWidget mapWidget) {
|
||||
if (mapWidget == null) {
|
||||
setMapImpl(null);
|
||||
} else {
|
||||
setMapImpl(mapWidget.getJso());
|
||||
}
|
||||
}
|
||||
|
||||
private final native void setMapImpl(MapImpl map) /*-{
|
||||
this.setMap(map);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Sets the ControlPosition at which to display the AdUnit on the map. If the position is set to null, the AdUnit is
|
||||
* removed from the map.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.setPosition(position);
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
package com.google.gwt.maps.client.adsense;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.MapImpl;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
import com.google.gwt.maps.client.controls.ControlPosition;
|
||||
|
||||
/**
|
||||
* ad unit options <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#AdUnitOptions" >AdUnitOptions API
|
||||
* Doc</a>
|
||||
*/
|
||||
public class AdUnitOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* creates options for adunit
|
||||
*/
|
||||
public static final AdUnitOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* use newInstance();
|
||||
*/
|
||||
protected AdUnitOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* The AdSense For Content channel number for tracking the performance of this AdUnit. It must be stored as a string
|
||||
* as it will typically be a large UINT64. (Optional)
|
||||
*/
|
||||
public final native String getChannelNumber() /*-{
|
||||
return this.channelNumber;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The Format of the AdUnit. <br>
|
||||
* <br>
|
||||
* See <a href="https://google.com/adsense/adformats">AdFormats</a>
|
||||
*/
|
||||
public final AdFormat getFormat() {
|
||||
return AdFormat.fromValue(getFormatImpl());
|
||||
}
|
||||
|
||||
private final native String getFormatImpl() /*-{
|
||||
return this.format;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The map associated with this AdUnit. Ads will be targeted to the location the map's viewport. (Required)
|
||||
*/
|
||||
public final MapWidget getMap() {
|
||||
return MapWidget.newInstance(getMapImpl());
|
||||
}
|
||||
|
||||
private final native MapImpl getMapImpl() /*-{
|
||||
return this.map;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The position of the AdUnit. If specified, the AdUnit will be displayed at this position. Otherwise, it will not be
|
||||
* added to the map. (Optional)
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Your AdSense for Content publisher ID. Required and must be set at the time of initialization. (Required)
|
||||
*/
|
||||
public final native String getPublisherId() /*-{
|
||||
return this.publisherId;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set The AdSense For Content channel number for tracking the performance of this AdUnit. It must be stored as a
|
||||
* string as it will typically be a large UINT64. (Optional)
|
||||
*
|
||||
* @param channelNumber
|
||||
*/
|
||||
public final native void setChannelNumber(String channelNumber) /*-{
|
||||
this.channelNumber = channelNumber;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* the Format of the AdUnit. <br>
|
||||
* <br>
|
||||
* See <a href="https://google.com/adsense/adformats">AdFormats</a>
|
||||
*
|
||||
* @param format
|
||||
*/
|
||||
public final void setFormat(AdFormat format) {
|
||||
setFormatImpl(format.value());
|
||||
};
|
||||
|
||||
private final native void setFormatImpl(String format) /*-{
|
||||
this.format = format;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The map associated with this AdUnit. Ads will be targeted to the location the map's viewport. (Required)
|
||||
*
|
||||
* @param mapWidget
|
||||
*/
|
||||
public final void setMap(MapWidget mapWidget) {
|
||||
MapImpl value = mapWidget != null ? mapWidget.getJso() : null;
|
||||
setMapImpl(value);
|
||||
}
|
||||
|
||||
private final native void setMapImpl(MapImpl map) /*-{
|
||||
this.map = map;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The position of the AdUnit. If specified, the AdUnit will be displayed at this position. Otherwise, it will not be
|
||||
* added to the map. (Optional)
|
||||
*
|
||||
* @param position
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Your AdSense for Content publisher ID. Required and must be set at the time of initialization. (Required)
|
||||
*
|
||||
* @param publisherId
|
||||
*/
|
||||
public final native void setPublisherId(String publisherId) /*-{
|
||||
this.publisherId = publisherId;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
package com.google.gwt.maps.client.adsense;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.dom.client.Element;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
import com.google.gwt.maps.client.controls.ControlPosition;
|
||||
import com.google.gwt.maps.client.events.channelnumber.ChannelNumberChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.format.FormatChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.mapchange.MapChangeMapHandler;
|
||||
import com.google.gwt.maps.client.events.position.PositionChangeMapHandler;
|
||||
import com.google.gwt.maps.client.mvc.MVCObjectWidget;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
|
||||
/**
|
||||
* Implements AdSense for Content advertising on an associated map. To use an AdUnit, you must obtain and specify an
|
||||
* AdSense for Content publisher ID within the AdUnit's constructor options. This class extends MVCObject. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#AdUnit">AdUnit API Doc</a>
|
||||
*/
|
||||
public class AdUnitWidget extends MVCObjectWidget<AdUnitImpl> {
|
||||
|
||||
/**
|
||||
* jso
|
||||
*/
|
||||
private AdUnitImpl impl;
|
||||
|
||||
/**
|
||||
* create AdUnit widget
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
public AdUnitWidget(AdUnitOptions options) {
|
||||
Element div = DOM.createDiv();
|
||||
impl = AdUnitImpl.newInstance(div, options);
|
||||
setElement(div);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's channelNumber property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addChannelNumberChangeHandler(ChannelNumberChangeMapHandler handler) {
|
||||
return impl.addChannelNumberChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's format property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addFormatChangeHandler(FormatChangeMapHandler handler) {
|
||||
return impl.addFormatChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's map property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addMapChangeHandler(MapChangeMapHandler handler) {
|
||||
return impl.addMapChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the AdUnit's position property changes.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addPositionChangeHandler(PositionChangeMapHandler handler) {
|
||||
return impl.addPositionChangeHandler(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the channel number in use by this AdUnit.
|
||||
*/
|
||||
public final String getChannelNumber() {
|
||||
return impl.getChannelNumber();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the containing element of the AdUnit.
|
||||
*/
|
||||
public final Element getContainer() {
|
||||
return impl.getContainer();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the format in use by this AdUnit.
|
||||
*/
|
||||
public final AdFormat getFormat() {
|
||||
return impl.getFormat();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the map to which this AdUnit's ads are targeted.
|
||||
*/
|
||||
public final MapWidget getMap() {
|
||||
return impl.getMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ControlPosition at which this AdUnit is displayed on the map.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return impl.getPosition();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the specified AdSense For Content publisher ID.
|
||||
*/
|
||||
public final String getPublisherId() {
|
||||
return impl.getPublisherId();
|
||||
};
|
||||
|
||||
/**
|
||||
* Specifies the channel number for this AdUnit. Channel numbers are optional and can be created for Google AdSense
|
||||
* tracking.
|
||||
*
|
||||
* @param channelNumber
|
||||
*/
|
||||
public final void setChannelNumber(String channelNumber) {
|
||||
impl.setChannelNumber(channelNumber);
|
||||
};
|
||||
|
||||
/**
|
||||
* Specifies the display format for this AdUnit.
|
||||
*
|
||||
* @param format
|
||||
*/
|
||||
public final void setFormat(AdFormat format) {
|
||||
impl.setFormat(format);
|
||||
};
|
||||
|
||||
/**
|
||||
* Associates this AdUnit with the specified map. Ads will be targeted to the map's viewport. The map must be
|
||||
* specified in order to display ads.
|
||||
*
|
||||
* @param mapWidget
|
||||
*/
|
||||
public final void setMap(MapWidget mapWidget) {
|
||||
impl.setMap(mapWidget);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ControlPosition at which to display the AdUnit on the map. If the position is set to null, the AdUnit is
|
||||
* removed from the map.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
impl.setPosition(position);
|
||||
}
|
||||
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
package com.google.gwt.maps.client.base;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* LatLng is a point in geographical coordinates, latitude and longitude.
|
||||
*
|
||||
* Notice that although usual map projections associate longitude with the x-coordinate of the map, and latitude with
|
||||
* the y-coordinate, the latitude coordinate is always written first, followed by the longitude. Notice also that you
|
||||
* cannot modify the coordinates of a LatLng. If you want to compute another point, you have to create a new one.
|
||||
*
|
||||
* <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#LatLng">LatLng API Doc</a>
|
||||
*/
|
||||
public class LatLng extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* LatLng is a point in geographical coordinates, latitude and longitude.
|
||||
*/
|
||||
protected LatLng() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Notice the ordering of latitude and longitude. If the noWrap flag is true, then the numbers will be used as passed,
|
||||
* otherwise latitude will be clamped to lie between -90° and +90 °, and longitude will be wrapped to lie
|
||||
* between -180 ° and +180 °.
|
||||
*
|
||||
* @param lat
|
||||
* @param lng
|
||||
*/
|
||||
public static LatLng newInstance(double lat, double lng) {
|
||||
return newInstance(lat, lng, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notice the ordering of latitude and longitude. If the noWrap flag is true, then the numbers will be used as passed,
|
||||
* otherwise latitude will be clamped to lie between -90° and +90 °, and longitude will be wrapped to lie
|
||||
* between -180 ° and +180 °.
|
||||
*
|
||||
* @param lat
|
||||
* @param lng
|
||||
* @param noWrap
|
||||
*/
|
||||
public static LatLng newInstance(double lat, double lng, boolean noWrap) {
|
||||
return createJso(lat, lng, noWrap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notice the ordering of latitude and longitude. If the noWrap flag is true, then the numbers will be used as passed,
|
||||
* otherwise latitude will be clamped to lie between -90° and +90°, and longitude will be wrapped to lie
|
||||
* between -180° and +180°. LatLng(lat:number, lng:number, noWrap?:boolean)
|
||||
*
|
||||
* @return LatLng
|
||||
*/
|
||||
private static native LatLng createJso(double lat, double lng, boolean noWrap) /*-{
|
||||
return new $wnd.google.maps.LatLng(lat, lng, noWrap);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* is equal?
|
||||
*
|
||||
* @param other
|
||||
*/
|
||||
public final native boolean equals(LatLng other) /*-{
|
||||
return this.equals(other);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get latitude
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public final double getLatitude() {
|
||||
return getLat();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the latitude in degrees.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
private final native double getLat() /*-{
|
||||
return this.lat();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the longitude in degrees.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public final double getLongitude() {
|
||||
return getLng();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the latitude in degrees.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
private final native double getLng() /*-{
|
||||
return this.lng();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Converts to string representation.
|
||||
*/
|
||||
public final native String getToString() /*-{
|
||||
return this.toString();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns a string of the form "lat,lng" for this LatLng. We round the lat/lng values to 6 decimal places by default.
|
||||
*
|
||||
* @param precision
|
||||
* @return String
|
||||
*/
|
||||
public final native String getToUrlValue(int precision) /*-{
|
||||
return this.toUrlValue(precision);
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
package com.google.gwt.maps.client.base;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180
|
||||
* degrees longitudinal meridian. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#LatLngBounds">LatLngBounds API
|
||||
* Doc</a>
|
||||
*/
|
||||
public class LatLngBounds extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180
|
||||
* degrees longitudinal meridian. use newInstance(...);
|
||||
*/
|
||||
protected LatLngBounds() {
|
||||
}
|
||||
|
||||
/**
|
||||
* creates A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the
|
||||
* 180 degrees longitudinal meridian.
|
||||
*
|
||||
* @param sw {@link LatLng}
|
||||
* @param ne {@link LatLng}
|
||||
*/
|
||||
public final static LatLngBounds newInstance(LatLng sw, LatLng ne) {
|
||||
return createJso(sw, ne).cast();
|
||||
}
|
||||
|
||||
private final static native JavaScriptObject createJso(LatLng sw, LatLng ne) /*-{
|
||||
return new $wnd.google.maps.LatLngBounds(sw, ne);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns true if the given lat/lng is in this bounds.
|
||||
*
|
||||
* @param latlng {@link LatLng}
|
||||
*/
|
||||
public final native boolean contains(LatLng latlng) /*-{
|
||||
return this.contains(latlng);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns true if this bounds approximately equals the given bounds.
|
||||
*
|
||||
* @param other {@link LatLngBounds}
|
||||
*/
|
||||
public final native boolean equals(LatLngBounds other) /*-{
|
||||
return this.equals(other);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Extends this bounds to contain the given point.
|
||||
*
|
||||
* @param point {@link LatLng}
|
||||
* @return {@link LatLngBounds}
|
||||
*/
|
||||
public final native LatLngBounds extend(LatLng point) /*-{
|
||||
return this.extend(point);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Computes the center of this LatLngBounds
|
||||
*
|
||||
* @return {@link LatLng}
|
||||
*/
|
||||
public final native LatLng getCenter() /*-{
|
||||
return this.getCenter();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the north-east corner of this bounds.
|
||||
*
|
||||
* @return {@link LatLng}
|
||||
*/
|
||||
public final native LatLng getNorthEast() /*-{
|
||||
return this.getNorthEast();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the south-west corner of this bounds.
|
||||
*
|
||||
* @return {@link LatLng}
|
||||
*/
|
||||
public final native LatLng getSouthWest() /*-{
|
||||
return this.getSouthWest();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns true if this bounds shares any points with this bounds.
|
||||
*
|
||||
* @param other {@link LatLngBounds}
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean intersects(LatLngBounds other) /*-{
|
||||
return this.intersects(other);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns if the bounds are empty.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean isEmpty() /*-{
|
||||
return this.isEmpty();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Converts the given map bounds to a lat/lng span.
|
||||
*
|
||||
* @return {@link LatLng}
|
||||
*/
|
||||
public final native LatLng toSpan() /*-{
|
||||
return this.toSpan();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Converts to string.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public final native String getToString() /*-{
|
||||
return this.toString();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the southwest
|
||||
* corner of the bounding box, while "hi" corresponds to the northeast corner of that box.
|
||||
*
|
||||
* @param precision
|
||||
* @return String
|
||||
*/
|
||||
public final native String toUrlValue(int precision) /*-{
|
||||
return this.toUrlValue(precision);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Extends this bounds to contain the union of this and the given bounds.
|
||||
*
|
||||
* @param other {@link LatLngBounds}
|
||||
* @return {@link LatLngBounds}
|
||||
*/
|
||||
public final native LatLngBounds union(LatLngBounds other) /*-{
|
||||
return this.union(other);
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.google.gwt.maps.client.base;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* A point on a two-dimensional plane. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#Point">Point API Doc</a>
|
||||
*/
|
||||
public class Point extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* A point on a two-dimensional plane. use newInstance();
|
||||
*/
|
||||
protected Point() {
|
||||
}
|
||||
|
||||
/**
|
||||
* creates A point on a two-dimensional plane.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
*/
|
||||
public final static Point newInstance(double x, double y) {
|
||||
return createJso(x, y).cast();
|
||||
}
|
||||
|
||||
private final static native JavaScriptObject createJso(double x, double y) /*-{
|
||||
return new $wnd.google.maps.Point(x, y);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Compares two Points
|
||||
*
|
||||
* @param other
|
||||
*/
|
||||
public final native boolean equals(Point other) /*-{
|
||||
return this.equals(other);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns a string representation of this Point.
|
||||
*/
|
||||
public final native String getToString() /*-{
|
||||
return this.toString();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get X coordinate
|
||||
*/
|
||||
public final native double getX() /*-{
|
||||
return this.x;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get Y coordinate
|
||||
*/
|
||||
public final native double getY() /*-{
|
||||
return this.y;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
package com.google.gwt.maps.client.base;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* Two-dimensional size, where width is the distance on the x-axis, and height is the distance on the y-axis. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#Size">Size API Doc</a>
|
||||
*/
|
||||
public class Size extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* creates Two-dimensional size, where width is the distance on the x-axis, and height is the distance on the y-axis.
|
||||
* use newInstance();
|
||||
*/
|
||||
protected Size() {
|
||||
}
|
||||
|
||||
/**
|
||||
* creates Two-dimensional size, where width is the distance on the x-axis, and height is the distance on the y-axis.
|
||||
*
|
||||
* @param width
|
||||
* @param height
|
||||
* @param widthUnit
|
||||
* @param heightUnit
|
||||
* @return {@link Size}
|
||||
*/
|
||||
public final static Size newInstance(double width, double height, String widthUnit, String heightUnit) {
|
||||
return createJso(width, height, widthUnit, heightUnit).cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* creates Two-dimensional size, where width is the distance on the x-axis, and height is the distance on the y-axis.
|
||||
*
|
||||
* @param width
|
||||
* @param height
|
||||
* @return {@link Size}
|
||||
*/
|
||||
public final static Size newInstance(double width, double height) {
|
||||
return createJso(width, height).cast();
|
||||
}
|
||||
|
||||
private final static native Size createJso(double width, double height, String widthUnit, String heightUnit) /*-{
|
||||
return new $wnd.google.maps.Size(width, height, widthUnit, heightUnit);
|
||||
}-*/;
|
||||
|
||||
private final static native Size createJso(double width, double height) /*-{
|
||||
return new $wnd.google.maps.Size(width, height);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Compares two Sizes.
|
||||
*
|
||||
* @param other
|
||||
* @return boolean
|
||||
*/
|
||||
public final native boolean equals(Size other) /*-{
|
||||
return this.equals(other);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns a string representation of this Size.
|
||||
*/
|
||||
public final native String getToString() /*-{
|
||||
return this.toString();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets The height along the y-axis, in pixels.
|
||||
*
|
||||
* @param height
|
||||
*/
|
||||
public final native void setHeight(double height) /*-{
|
||||
this.height = height;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets The height along the y-axis, in pixels.
|
||||
*/
|
||||
public final native double getHeight() /*-{
|
||||
return this.height;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* sets The width along the x-axis, in pixels.
|
||||
*
|
||||
* @param width
|
||||
*/
|
||||
public final native void setWidth(double width) /*-{
|
||||
this.width = width;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets The width along the x-axis, in pixels.
|
||||
*/
|
||||
public final native double getWidth() /*-{
|
||||
return this.width;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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%
|
||||
*/
|
||||
|
||||
/**
|
||||
* Identifiers used to specify the placement of controls on the map. Controls are positioned relative to other controls
|
||||
* in the same layout position. Controls that are added first are positioned closer to the edge of the map.<br>
|
||||
* <br>
|
||||
* <table border="1px" padding="0px">
|
||||
* <col width="33,3%"/><col width="33,3%"/><col width="33,3%"/> <thead><tbody> <tbody>
|
||||
* <tr>
|
||||
* <td>TL</td>
|
||||
* <td>TC</td>
|
||||
* <td>TR</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>LT</td>
|
||||
* <td></td>
|
||||
* <td>RT</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td> </td>
|
||||
* <td> </td>
|
||||
* <td> </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>LC</td>
|
||||
* <td></td>
|
||||
* <td>RC</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td> </td>
|
||||
* <td> </td>
|
||||
* <td> </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>LB</td>
|
||||
* <td></td>
|
||||
* <td>LB</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>BL</td>
|
||||
* <td>BC</td>
|
||||
* <td>BR</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* <br>
|
||||
* Elements in the top or bottom row flow towards the middle. Elements at the left or right sides flow downwards. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#ControlPosition">ControlPosition
|
||||
* API Doc</a>
|
||||
*/
|
||||
public enum ControlPosition {
|
||||
|
||||
/**
|
||||
* javascript constant numbers - reverse engineered BOTTOM_CENTER=11 BOTTOM_LEFT=10 BOTTOM_RIGHT=12 LEFT_BOTTOM=6
|
||||
* LEFT_CENTER=4 LEFT_TOP=5 RIGHT_BOTTOM=9 RIGHT_CENTER=8 RIGHT_TOP=7 TOP_CENTER=2 TOP_LEFT=1 TOP_RIGHT=3
|
||||
*/
|
||||
|
||||
/**
|
||||
* Elements are positioned in the center of the bottom row.
|
||||
*/
|
||||
BOTTOM_CENTER(11),
|
||||
|
||||
/**
|
||||
* Elements are positioned in the bottom left and flow towards the middle. Elements are positioned to the right of the
|
||||
* Google logo.
|
||||
*/
|
||||
BOTTOM_LEFT(10),
|
||||
|
||||
/**
|
||||
* Elements are positioned in the bottom right and flow towards the middle. Elements are positioned to the left of the
|
||||
* copyrights.
|
||||
*/
|
||||
BOTTOM_RIGHT(12),
|
||||
|
||||
/**
|
||||
* Elements are positioned on the left, above bottom-left elements, and flow upwards.
|
||||
*/
|
||||
LEFT_BOTTOM(6),
|
||||
|
||||
/**
|
||||
* Elements are positioned in the center of the left side.
|
||||
*/
|
||||
LEFT_CENTER(4),
|
||||
|
||||
/**
|
||||
* Elements are positioned on the left, below top-left elements, and flow downwards.
|
||||
*/
|
||||
LEFT_TOP(5),
|
||||
|
||||
/**
|
||||
* Elements are positioned on the right, above bottom-right elements, and flow upwards.
|
||||
*/
|
||||
RIGHT_BOTTOM(9),
|
||||
|
||||
/**
|
||||
* Elements are positioned in the center of the right side.
|
||||
*/
|
||||
RIGHT_CENTER(8),
|
||||
|
||||
/**
|
||||
* Elements are positioned on the right, below top-right elements, and flow downwards.
|
||||
*/
|
||||
RIGHT_TOP(7),
|
||||
|
||||
/**
|
||||
* Elements are positioned in the center of the top row.
|
||||
*/
|
||||
TOP_CENTER(2),
|
||||
|
||||
/**
|
||||
* Elements are positioned in the top left and flow towards the middle.
|
||||
*/
|
||||
TOP_LEFT(1),
|
||||
|
||||
/**
|
||||
* Elements are positioned in the top right and flow towards the middle.
|
||||
*/
|
||||
TOP_RIGHT(3);
|
||||
|
||||
/**
|
||||
* javascript constant value
|
||||
*/
|
||||
private int value;
|
||||
|
||||
/**
|
||||
* Elements in the top or bottom row flow towards the middle. Elements at the left or right sides flow downwards.
|
||||
*
|
||||
* @param value javascript constant value
|
||||
*/
|
||||
ControlPosition(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns enum name
|
||||
*/
|
||||
public String getName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
/**
|
||||
* returns javascript constant value
|
||||
*/
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return name() + "(" + value + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
* reconstruct from position from javascript constant value
|
||||
*
|
||||
* @param value javascript constant value
|
||||
*/
|
||||
public static ControlPosition fromValue(int value) {
|
||||
ControlPosition r = null;
|
||||
switch (value) {
|
||||
case 1:
|
||||
r = TOP_LEFT;
|
||||
break;
|
||||
case 2:
|
||||
r = TOP_CENTER;
|
||||
break;
|
||||
case 3:
|
||||
r = TOP_RIGHT;
|
||||
break;
|
||||
case 4:
|
||||
r = LEFT_CENTER;
|
||||
break;
|
||||
case 5:
|
||||
r = LEFT_TOP;
|
||||
break;
|
||||
case 6:
|
||||
r = LEFT_BOTTOM;
|
||||
break;
|
||||
case 7:
|
||||
r = RIGHT_TOP;
|
||||
break;
|
||||
case 8:
|
||||
r = RIGHT_CENTER;
|
||||
break;
|
||||
case 9:
|
||||
r = RIGHT_BOTTOM;
|
||||
break;
|
||||
case 10:
|
||||
r = BOTTOM_LEFT;
|
||||
break;
|
||||
case 11:
|
||||
r = BOTTOM_CENTER;
|
||||
break;
|
||||
case 12:
|
||||
r = BOTTOM_RIGHT;
|
||||
break;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.JsArrayString;
|
||||
import com.google.gwt.maps.client.MapTypeId;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the map type control. <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#MapTypeControlOptions"
|
||||
* >MapTypeControlOptions API Doc</a>
|
||||
*/
|
||||
public class MapTypeControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* new Instance of Options for the rendering of the map type control.
|
||||
*/
|
||||
public static MapTypeControlOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the rendering of the map type control. use newInstance();
|
||||
*/
|
||||
protected MapTypeControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* get IDs as {@link MapTypeId} object array
|
||||
*
|
||||
* @return MapTypeId[]
|
||||
*/
|
||||
public final MapTypeId[] getMapTypeIds() {
|
||||
JsArrayString jsarr = getMapTypeIdsJs();
|
||||
if (jsarr.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
MapTypeId[] r = new MapTypeId[jsarr.length()];
|
||||
for (int i = 0; i < jsarr.length(); i++) {
|
||||
String type = jsarr.get(i);
|
||||
r[i] = MapTypeId.fromValue(type);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* get IDs as {@link MapTypeId} object array
|
||||
*
|
||||
* @return String[]
|
||||
*/
|
||||
public final String[] getMapTypeIdsString() {
|
||||
JsArrayString jsarr = getMapTypeIdsJs();
|
||||
if (jsarr.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
String[] r = new String[jsarr.length()];
|
||||
for (int i = 0; i < jsarr.length(); i++) {
|
||||
r[i] = jsarr.get(i);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* get MapTypeIds native
|
||||
*
|
||||
* @return JsArrayString
|
||||
*/
|
||||
private final native JsArrayString getMapTypeIdsJs() /*-{
|
||||
return this.mapTypeIds;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set native IDs
|
||||
*
|
||||
* @param types String array for $wnd.google.maps.MapTypeId[type]
|
||||
*/
|
||||
private final native void setMapTypeIdsJs(JsArrayString types) /*-{
|
||||
this.mapTypeIds = new $wnd.Array();
|
||||
for ( var i = 0; i < types.length; i++) {
|
||||
this.mapTypeIds[i] = $wnd.google.maps.MapTypeId[types[i]];
|
||||
}
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set native user defined IDs
|
||||
*
|
||||
* @param types String array of user defined map types
|
||||
*/
|
||||
private final native void setMapTypeIdsStringJs(JsArrayString types) /*-{
|
||||
this.mapTypeIds = new $wnd.Array();
|
||||
for ( var i = 0; i < types.length; i++) {
|
||||
this.mapTypeIds[i] = types[i];
|
||||
}
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set IDs of map types to show in the control.
|
||||
*
|
||||
* @param mapTypeIds
|
||||
*/
|
||||
public final void setMapTypeIds(MapTypeId[] mapTypeIds) {
|
||||
JsArrayString result = JsArrayString.createArray().cast();
|
||||
for (int i = 0; i < mapTypeIds.length; i++) {
|
||||
result.set(i, mapTypeIds[i].value());
|
||||
}
|
||||
// TODO cannot access private method. Perhaps API was updated?
|
||||
// ArrayHelper.nativePatchConstructorForSafari(result);
|
||||
setMapTypeIdsJs(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* set user defined string ID of map types to show in the control.
|
||||
*
|
||||
* @param mapTypeIds
|
||||
*/
|
||||
public final void setMapTypeIds(String[] mapTypeIds) {
|
||||
JsArrayString result = JsArrayString.createArray().cast();
|
||||
for (int i = 0; i < mapTypeIds.length; i++) {
|
||||
result.set(i, mapTypeIds[i]);
|
||||
}
|
||||
setMapTypeIdsStringJs(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.ArrayHelper;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArray;
|
||||
import com.google.gwt.maps.client.maptypes.MapTypeStyleElementType;
|
||||
import com.google.gwt.maps.client.maptypes.MapTypeStyleFeatureType;
|
||||
import com.google.gwt.maps.client.maptypes.MapTypeStyler;
|
||||
|
||||
/**
|
||||
* The MapTypeStyle is a collection of selectors and stylers that define how the map should be styled. Selectors specify
|
||||
* what map elements should be affected and stylers specify how those elements should be modified. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyle">MapTypeStyle API
|
||||
* Doc</a>
|
||||
*/
|
||||
public class MapTypeStyle extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* The MapTypeStyle is a collection of selectors and stylers that define how the map should be styled. Selectors
|
||||
* specify what map elements should be affected and stylers specify how those elements should be modified. use
|
||||
* newInstance();
|
||||
*/
|
||||
protected MapTypeStyle() {
|
||||
}
|
||||
|
||||
/**
|
||||
* The MapTypeStyle is a collection of selectors and stylers that define how the map should be styled. Selectors
|
||||
* specify what map elements should be affected and stylers specify how those elements should be modified.
|
||||
*
|
||||
* @return {@link MapTypeStyle}
|
||||
*/
|
||||
public final static MapTypeStyle newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* set Selects the element type to which a styler should be applied. An element type distinguishes between the
|
||||
* different representations of a feature. Optional; if elementType is not specified, the value is assumed to be
|
||||
* 'all'.
|
||||
*
|
||||
* @param mapTypeStyleElementType {@link MapTypeStyleElementType}
|
||||
*/
|
||||
public final void setElementType(MapTypeStyleElementType mapTypeStyleElementType) {
|
||||
String type = mapTypeStyleElementType.value();
|
||||
setElementType(type);
|
||||
}
|
||||
|
||||
private final native void setElementType(String elementType) /*-{
|
||||
this.elementType = elementType;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get set Selects the element type to which a styler should be applied. An element type distinguishes between the
|
||||
* different representations of a feature. Optional; if elementType is not specified, the value is assumed to be
|
||||
* 'all'.
|
||||
*
|
||||
* @return {@link MapTypeStyleElementType}
|
||||
*/
|
||||
public final MapTypeStyleElementType getElementType() {
|
||||
return MapTypeStyleElementType.fromValue(getElementTypeJs());
|
||||
}
|
||||
|
||||
private final native String getElementTypeJs() /*-{
|
||||
return this.elementType;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set Selects the feature, or group of features, to which a styler should be applied. Optional; if featureType is not
|
||||
* specified, the value is assumed to be 'all'.
|
||||
*
|
||||
* @param mapTypeStyleFeatureType {@link MapTypeStyleFeatureType}
|
||||
*/
|
||||
public final void setFeatureType(MapTypeStyleFeatureType mapTypeStyleFeatureType) {
|
||||
setFeatureType(mapTypeStyleFeatureType.value());
|
||||
}
|
||||
|
||||
private final native void setFeatureType(String featureType) /*-{
|
||||
this.featureType = featureType;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get Selects the feature, or group of features, to which a styler should be applied. Optional; if featureType is not
|
||||
* specified, the value is assumed to be 'all'.
|
||||
*/
|
||||
public final MapTypeStyleFeatureType getFeatureType() {
|
||||
return MapTypeStyleFeatureType.fromValue(getFeatureTypeJs());
|
||||
}
|
||||
|
||||
private final native String getFeatureTypeJs() /*-{
|
||||
return this.featureType;
|
||||
}-*/;
|
||||
|
||||
public final void setStylers(MapTypeStyler[] stylers) {
|
||||
JsArray<MapTypeStyler> arr = ArrayHelper.toJsArray(stylers);
|
||||
setStylersJs(arr);
|
||||
}
|
||||
|
||||
private final native void setStylersJs(JsArray<MapTypeStyler> stylers) /*-{
|
||||
this.stylers = stylers;
|
||||
}-*/;
|
||||
|
||||
public final MapTypeStyler[] getStylers() {
|
||||
JsArray<MapTypeStyler> arr = getStylersJs();
|
||||
if (arr == null || arr.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
MapTypeStyler[] r = new MapTypeStyler[arr.length()];
|
||||
for (int i = 0; i < arr.length(); i++) {
|
||||
r[i] = arr.get(i);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
private final native JsArray<MapTypeStyler> getStylersJs() /*-{
|
||||
return this.stylers;
|
||||
}-*/;
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the Overview Map control <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#OverviewMapControlOptions">See
|
||||
* OverviewMapControlOptions API</a>
|
||||
*/
|
||||
public class OverviewMapControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* Options for the rendering of the Overview Map control. use newInstance();
|
||||
*/
|
||||
protected OverviewMapControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* creates a new instance for, Options for the rendering of the Overview Map control.
|
||||
*/
|
||||
public final static OverviewMapControlOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* sets Whether the control should display in opened mode or collapsed (minimized) mode. By default, the control is
|
||||
* closed.
|
||||
*
|
||||
* @param opened
|
||||
*/
|
||||
public final native void setOpened(boolean opened) /*-{
|
||||
this.opened = opened;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* gets Whether the control should display in opened mode or collapsed (minimized) mode. By default, the control is
|
||||
* closed.
|
||||
*/
|
||||
public final native boolean getOpened() /*-{
|
||||
return this.opened;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the pan control. <br>
|
||||
* <br>
|
||||
* See <a
|
||||
* href="https://developers.google.com/maps/documentation/javascript/reference#PanControlOptions">PanControlOptions API
|
||||
* Doc</a>
|
||||
*/
|
||||
public class PanControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* creates a new instance of, Options for the rendering of the pan control.
|
||||
*/
|
||||
public final static PanControlOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the rendering of the pan control. use newInstance
|
||||
*/
|
||||
protected PanControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the rotate control. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#RotateControlOptions">
|
||||
* RotateControlOptions API Doc</a>
|
||||
*/
|
||||
public class RotateControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* create a new instance of Options for the rendering of the rotate control.
|
||||
*/
|
||||
public final static RotateControlOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the rendering of the rotate control. use newInstance()
|
||||
*/
|
||||
protected RotateControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the scale control. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#ScaleControlOptions">
|
||||
* ScaleControlOptions API Doc</a>
|
||||
*/
|
||||
public class ScaleControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* Options for the rendering of the scale control.
|
||||
*/
|
||||
protected ScaleControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the rendering of the scale control.
|
||||
*
|
||||
* @return ScaleControlOptions
|
||||
*/
|
||||
public final static ScaleControlOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* set Style id. Used to select what style of scale control to display.
|
||||
*
|
||||
* @param style {@link ScaleControlStyle}
|
||||
*/
|
||||
public final void setStyle(ScaleControlStyle style) {
|
||||
setStyle(style.value());
|
||||
}
|
||||
|
||||
/**
|
||||
* set Style id. Used to select what style of scale control to display.
|
||||
*
|
||||
* @param style
|
||||
*/
|
||||
private final native void setStyle(String style) /*-{
|
||||
this.style = style;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* get Style id. Used to select what style of scale control to display.
|
||||
*
|
||||
* @return {@link ScaleControlStyle}
|
||||
*/
|
||||
public final ScaleControlStyle getStyle() {
|
||||
return ScaleControlStyle.fromValue(getStyleJs());
|
||||
}
|
||||
|
||||
/**
|
||||
* get Style id. Used to select what style of scale control to display.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
private final native String getStyleJs() /*-{
|
||||
return this.style;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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%
|
||||
*/
|
||||
|
||||
/**
|
||||
* Identifiers for scale control ids. <br>
|
||||
* <br>
|
||||
* See <a
|
||||
* href="https://developers.google.com/maps/documentation/javascript/reference#ScaleControlStyle">ScaleControlStyle API
|
||||
* Doc</a>
|
||||
*/
|
||||
public enum ScaleControlStyle {
|
||||
|
||||
/**
|
||||
* The standard scale control.
|
||||
*/
|
||||
DEFAULT;
|
||||
|
||||
/**
|
||||
* return the enum value as a String
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a String value to enum Type
|
||||
*
|
||||
* @param type
|
||||
* @return TYPE
|
||||
*/
|
||||
public static ScaleControlStyle fromValue(String type) {
|
||||
return valueOf(type.toUpperCase());
|
||||
}
|
||||
|
||||
/**
|
||||
* return the enum Type as a String
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return name();
|
||||
}
|
||||
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the Street View pegman control on the map. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#StreetViewControlOptions">
|
||||
* StreetViewControlOptions API Doc</a>
|
||||
*/
|
||||
public class StreetViewControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* creates Options for the rendering of the Street View pegman control on the map.
|
||||
*/
|
||||
public static StreetViewControlOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the rendering of the Street View pegman control on the map. use newInstance()
|
||||
*/
|
||||
protected StreetViewControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the zoom control. <br>
|
||||
* <br>
|
||||
* See <a
|
||||
* href="https://developers.google.com/maps/documentation/javascript/reference#ZoomControlOptions">ZoomControlOptions
|
||||
* API Doc</a>
|
||||
*/
|
||||
public class ZoomControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* creates Options for the rendering of the zoom control.
|
||||
*/
|
||||
public final static ZoomControlOptions newInstance() {
|
||||
return JavaScriptObject.createObject().cast();
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the rendering of the zoom control. use newInstance();
|
||||
*/
|
||||
protected ZoomControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
public final native int getStyleJs() /*-{
|
||||
return this.style;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @param position {@link ControlPosition}
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
private final native void setStyle(String type) /*-{
|
||||
this.style = $wnd.google.maps.ZoomControlStyle[type]
|
||||
}-*/;
|
||||
|
||||
/* gets Style id. Used to select what style of zoom control to display. public final ZoomControlStyle getStyle() {
|
||||
* return ZoomControlStyle.fromValue(getStyleJs()); } */
|
||||
|
||||
/**
|
||||
* sets Style id. Used to select what style of zoom control to display.
|
||||
*
|
||||
* @param zoomControlStyle
|
||||
*/
|
||||
public final void setStyle(ZoomControlStyle zoomControlStyle) {
|
||||
setStyle(zoomControlStyle.value());
|
||||
}
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.google.gwt.maps.client.controls;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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%
|
||||
*/
|
||||
|
||||
/**
|
||||
* Identifiers for the zoom control. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#ZoomControlStyle">ZoomControlStyle
|
||||
* API Doc</a>
|
||||
*/
|
||||
public enum ZoomControlStyle {
|
||||
|
||||
/**
|
||||
* The default zoom control. The control which DEFAULT maps to will vary according to map size and other factors. It
|
||||
* may change in future versions of the API.
|
||||
*/
|
||||
DEFAULT,
|
||||
|
||||
/**
|
||||
* The larger control, with the zoom slider in addition to +/- buttons.
|
||||
*/
|
||||
LARGE,
|
||||
|
||||
/**
|
||||
* A small control with buttons to zoom in and out.
|
||||
*/
|
||||
SMALL;
|
||||
|
||||
/**
|
||||
* return the enum value as a String
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a String value to enum Type
|
||||
*
|
||||
* @param type
|
||||
* @return TYPE
|
||||
*/
|
||||
public static ZoomControlStyle fromValue(String type) {
|
||||
return valueOf(type.toUpperCase());
|
||||
}
|
||||
|
||||
/**
|
||||
* return the enum Type as a String
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return name();
|
||||
}
|
||||
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.google.gwt.maps.client.drawinglib;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.ArrayHelper;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArrayString;
|
||||
import com.google.gwt.maps.client.controls.ControlPosition;
|
||||
|
||||
/**
|
||||
* Options for the rendering of the drawing control. <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#DrawingControlOptions"
|
||||
* >DrawingControlOptions API Doc</a>
|
||||
*/
|
||||
public class DrawingControlOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* use newInstance();
|
||||
*/
|
||||
protected DrawingControlOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the rendering of the drawing control.
|
||||
*/
|
||||
public static final DrawingControlOptions newInstance() {
|
||||
DrawingControlOptions obj = JavaScriptObject.createObject().cast();
|
||||
return setDefaults(obj);
|
||||
}
|
||||
|
||||
private static DrawingControlOptions setDefaults(DrawingControlOptions obj) {
|
||||
obj.setPosition(ControlPosition.TOP_LEFT);
|
||||
obj.setDrawingModes(OverlayType.MARKER, OverlayType.POLYLINE, OverlayType.RECTANGLE, OverlayType.CIRCLE,
|
||||
OverlayType.POLYGON);
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* The drawing modes to display in the drawing control, in the order in which they are to be displayed. The hand icon
|
||||
* (which corresponds to the null drawing mode) is always available and is not to be specified in this array. Defaults
|
||||
* to [MARKER, POLYLINE, RECTANGLE, CIRCLE, POLYGON]. hmmmm, this seems a bit overlay iterative
|
||||
*
|
||||
* @param overlayTypes
|
||||
*/
|
||||
public final void setDrawingModes(OverlayType... overlayTypes) {
|
||||
if (overlayTypes == null) {
|
||||
return;
|
||||
}
|
||||
String[] types = new String[overlayTypes.length];
|
||||
for (int i = 0; i < overlayTypes.length; i++) {
|
||||
types[i] = overlayTypes[i].value();
|
||||
}
|
||||
JsArrayString drawingModes = ArrayHelper.toJsArrayString(types);
|
||||
setDrawingModesImpl(drawingModes);
|
||||
}
|
||||
|
||||
private final native void setDrawingModesImpl(JsArrayString drawingModes) /*-{
|
||||
this.drawingModes = drawingModes;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The drawing modes to display in the drawing control, in the order in which they are to be displayed. The hand icon
|
||||
* (which corresponds to the null drawing mode) is always available and is not to be specified in this array. Defaults
|
||||
* to [MARKER, POLYLINE, RECTANGLE, CIRCLE, POLYGON].
|
||||
*/
|
||||
public final OverlayType[] getDrawingModes() {
|
||||
JsArrayString types = getDrawingModesImpl();
|
||||
if (types == null) {
|
||||
return null;
|
||||
}
|
||||
OverlayType[] r = new OverlayType[types.length()];
|
||||
for (int i = 0; i < types.length(); i++) {
|
||||
r[i] = OverlayType.fromValue(types.get(i));
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
private final native JsArrayString getDrawingModesImpl() /*-{
|
||||
return this.drawingModes;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @param position
|
||||
*/
|
||||
public final void setPosition(ControlPosition position) {
|
||||
setPositionImpl(position.value());
|
||||
}
|
||||
|
||||
private final native void setPositionImpl(int position) /*-{
|
||||
this.position = position;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
|
||||
*
|
||||
* @return 0 if value was never set
|
||||
*/
|
||||
public final ControlPosition getPosition() {
|
||||
return ControlPosition.fromValue(getPositionImpl());
|
||||
}
|
||||
|
||||
private final native int getPositionImpl() /*-{
|
||||
return this.position;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
package com.google.gwt.maps.client.drawinglib;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.maps.client.MapImpl;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
import com.google.gwt.maps.client.events.MapEventType;
|
||||
import com.google.gwt.maps.client.events.MapHandlerRegistration;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.OverlayCompleteEventFormatter;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.OverlayCompleteMapHandler;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.circle.CircleCompleteEventFormatter;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.circle.CircleCompleteMapHandler;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.marker.MarkerCompleteEventFormatter;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.marker.MarkerCompleteMapHandler;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.polygon.PolygonCompleteEventFormatter;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.polygon.PolygonCompleteMapHandler;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.polyline.PolylineCompleteEventFormatter;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.polyline.PolylineCompleteMapHandler;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.rectangle.RectangleCompleteEventFormatter;
|
||||
import com.google.gwt.maps.client.events.overlaycomplete.rectangle.RectangleCompleteMapHandler;
|
||||
import com.google.gwt.maps.client.mvc.MVCObject;
|
||||
|
||||
/**
|
||||
* Allows users to draw markers, polygons, polylines, rectangles, and circles on the map. The DrawingManager's drawing
|
||||
* mode defines the type of overlay that will be created by the user. Adds a control to the map, allowing the user to
|
||||
* switch drawing mode. This class extends MVCObject. <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#DrawingManager" >DrawingManager
|
||||
* API Doc</a>
|
||||
*/
|
||||
public class DrawingManager extends MVCObject<DrawingManager> {
|
||||
|
||||
/**
|
||||
* use newInstance();
|
||||
*/
|
||||
protected DrawingManager() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to
|
||||
* be drawn with a drawing control.
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
public static final DrawingManager newInstance(DrawingManagerOptions options) {
|
||||
return createJso(options).cast();
|
||||
}
|
||||
|
||||
private static native JavaScriptObject createJso(DrawingManagerOptions options) /*-{
|
||||
return new $wnd.google.maps.drawing.DrawingManager(options);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the DrawingManager's drawing mode.
|
||||
*/
|
||||
public final OverlayType getDrawingMode() {
|
||||
String type = getDrawingModeImpl();
|
||||
if (type == null) {
|
||||
return null;
|
||||
} else {
|
||||
return OverlayType.fromValue(type);
|
||||
}
|
||||
}
|
||||
|
||||
private final native String getDrawingModeImpl() /*-{
|
||||
return this.getDrawingMode();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Changes the DrawingManager's drawing mode, which defines the type of overlay to be added on the map. Accepted
|
||||
* values are MARKER, POLYGON, POLYLINE, RECTANGLE, CIRCLE, or null. A drawing mode of null means that the user can
|
||||
* interact with the map as normal, and clicks do not draw anything.
|
||||
*
|
||||
* @param drawingMode
|
||||
*/
|
||||
public final void setDrawingMode(OverlayType drawingMode) {
|
||||
String value = (drawingMode != null) ? drawingMode.value() : null;
|
||||
setDrawingModeImpl(value);
|
||||
}
|
||||
|
||||
private final native void setDrawingModeImpl(String drawingMode) /*-{
|
||||
this.setDrawingMode(drawingMode);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Attaches the DrawingManager object to the specified Map.
|
||||
*
|
||||
* @param mapWidget
|
||||
*/
|
||||
public final void setMap(MapWidget mapWidget) {
|
||||
MapImpl value = (mapWidget != null) ? mapWidget.getJso() : null;
|
||||
setMapImpl(value);
|
||||
}
|
||||
|
||||
private final native void setMapImpl(MapImpl map) /*-{
|
||||
this.setMap(map);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Returns the Map to which the DrawingManager is attached, which is the Map on which the overlays created will be
|
||||
* placed.
|
||||
*/
|
||||
public final MapWidget getMap() {
|
||||
return MapWidget.newInstance(getMapImpl());
|
||||
}
|
||||
|
||||
private final native MapImpl getMapImpl() /*-{
|
||||
return this.getMap();
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* This event is fired when the user has finished drawing a circle.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addCircleCompleteHandler(CircleCompleteMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandlerDrawing(this, MapEventType.CIRCLECOMPLETE, handler,
|
||||
new CircleCompleteEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user has finished drawing a marker.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addMarkerCompleteHandler(MarkerCompleteMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandlerDrawing(this, MapEventType.MARKERCOMPLETE, handler,
|
||||
new MarkerCompleteEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user has finished drawing an overlay of any type.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addOverlayCompleteHandler(OverlayCompleteMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandler(this, MapEventType.OVERLAYCOMPLETE, handler,
|
||||
new OverlayCompleteEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user has finished drawing a polygon.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addPolygonCompleteHandler(PolygonCompleteMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandlerDrawing(this, MapEventType.POLYGONCOMPLETE, handler,
|
||||
new PolygonCompleteEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user has finished drawing a polyline.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addPolylineCompleteHandler(PolylineCompleteMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandlerDrawing(this, MapEventType.POLYLINECOMPLETE, handler,
|
||||
new PolylineCompleteEventFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the user has finished drawing a rectangle.
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
public final HandlerRegistration addRectangleCompleteHandler(RectangleCompleteMapHandler handler) {
|
||||
return MapHandlerRegistration.addHandlerDrawing(this, MapEventType.RECTANGLECOMPLETE, handler,
|
||||
new RectangleCompleteEventFormatter());
|
||||
}
|
||||
|
||||
}
|
||||
+228
@@ -0,0 +1,228 @@
|
||||
package com.google.gwt.maps.client.drawinglib;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.MapImpl;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
import com.google.gwt.maps.client.overlays.CircleOptions;
|
||||
import com.google.gwt.maps.client.overlays.MarkerOptions;
|
||||
import com.google.gwt.maps.client.overlays.PolygonOptions;
|
||||
import com.google.gwt.maps.client.overlays.PolylineOptions;
|
||||
import com.google.gwt.maps.client.overlays.RectangleOptions;
|
||||
|
||||
/**
|
||||
* Options for the drawing manager. <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#DrawingManagerOptions"
|
||||
* >DrawingManagerOptions API Doc</a>
|
||||
*/
|
||||
public class DrawingManagerOptions extends JavaScriptObject {
|
||||
|
||||
/**
|
||||
* use newInstance();
|
||||
*/
|
||||
protected DrawingManagerOptions() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for the drawing manager.
|
||||
*/
|
||||
public static final DrawingManagerOptions newInstance() {
|
||||
DrawingManagerOptions obj = JavaScriptObject.createObject().cast();
|
||||
return setDefaults(obj);
|
||||
}
|
||||
|
||||
private static DrawingManagerOptions setDefaults(DrawingManagerOptions obj) {
|
||||
obj.setDrawingControl(true);
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options to apply to any new circles created with this DrawingManager. The center and radius properties are ignored,
|
||||
* and the map property of a new circle is always set to the DrawingManager's map.
|
||||
*
|
||||
* @param circleOptions
|
||||
*/
|
||||
public final native void setCircleOptions(CircleOptions circleOptions) /*-{
|
||||
this.circleOptions = circleOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new circles created with this DrawingManager. The center and radius properties are ignored,
|
||||
* and the map property of a new circle is always set to the DrawingManager's map.
|
||||
*/
|
||||
public final native CircleOptions getCircleOptions() /*-{
|
||||
return this.circleOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The enabled/disabled state of the drawing control. Defaults to true.
|
||||
*
|
||||
* @param drawingControl
|
||||
*/
|
||||
public final native void setDrawingControl(boolean drawingControl) /*-{
|
||||
this.drawingControl = drawingControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The enabled/disabled state of the drawing control. Defaults to true.
|
||||
*/
|
||||
public final native boolean getDrawingControl() /*-{
|
||||
return this.drawingControl;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The display options for the drawing control.
|
||||
*
|
||||
* @param drawingControlOptions
|
||||
*/
|
||||
public final native void setDrawingControlOptions(DrawingControlOptions drawingControlOptions) /*-{
|
||||
this.drawingControlOptions = drawingControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The display options for the drawing control.
|
||||
*/
|
||||
public final native DrawingControlOptions getDrawingControlOptions() /*-{
|
||||
return this.drawingControlOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The DrawingManager's drawing mode, which defines the type of overlay to be added on the map. Accepted values are
|
||||
* MARKER, POLYGON, POLYLINE, RECTANGLE, CIRCLE, or null. A drawing mode of null means that the user can interact with
|
||||
* the map as normal, and clicks do not draw anything.
|
||||
*
|
||||
* @param drawingMode
|
||||
*/
|
||||
public final void setDrawingMode(OverlayType drawingMode) {
|
||||
setDrawingModeImpl(drawingMode.value());
|
||||
}
|
||||
|
||||
/**
|
||||
* The DrawingManager's drawing mode, which defines the type of overlay to be added on the map. Accepted values are
|
||||
* MARKER, POLYGON, POLYLINE, RECTANGLE, CIRCLE, or null. A drawing mode of null means that the user can interact with
|
||||
* the map as normal, and clicks do not draw anything.
|
||||
*
|
||||
* @param drawingMode
|
||||
*/
|
||||
private native void setDrawingModeImpl(String drawingMode) /*-{
|
||||
this.drawingMode = drawingMode;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The Map to which the DrawingManager is attached, which is the Map on which the overlays created will be placed.
|
||||
*/
|
||||
public final MapWidget getMap() {
|
||||
return MapWidget.newInstance(getMapImpl());
|
||||
}
|
||||
|
||||
private final native MapImpl getMapImpl() /*-{
|
||||
return this.map;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* The Map to which the DrawingManager is attached, which is the Map on which the overlays created will be placed.
|
||||
*
|
||||
* @param mapWidget
|
||||
*/
|
||||
public final void setMap(MapWidget mapWidget) {
|
||||
MapImpl value = (mapWidget != null) ? mapWidget.getJso() : null;
|
||||
setMapImpl(value);
|
||||
}
|
||||
|
||||
private final native void setMapImpl(MapImpl map) /*-{
|
||||
this.map = map;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new markers created with this DrawingManager. The position property is ignored, and the map
|
||||
* property of a new marker is always set to the DrawingManager's map.
|
||||
*
|
||||
* @param markerOptions
|
||||
*/
|
||||
public final native void setMarkerOptions(MarkerOptions markerOptions) /*-{
|
||||
this.markerOptions = markerOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new markers created with this DrawingManager. The position property is ignored, and the map
|
||||
* property of a new marker is always set to the DrawingManager's map.
|
||||
*/
|
||||
public final native MarkerOptions getMarkerOptions() /*-{
|
||||
return this.markerOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new polygons created with this DrawingManager. The paths property is ignored, and the map
|
||||
* property of a new polygon is always set to the DrawingManager's map.
|
||||
*
|
||||
* @param polygonOptions
|
||||
*/
|
||||
public final native void setPolygonOptions(PolygonOptions polygonOptions) /*-{
|
||||
this.polygonOptions = polygonOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new polygons created with this DrawingManager. The paths property is ignored, and the map
|
||||
* property of a new polygon is always set to the DrawingManager's map.
|
||||
*/
|
||||
public final native PolygonOptions getPolygonOptions() /*-{
|
||||
return this.polygonOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new polylines created with this DrawingManager. The path property is ignored, and the map
|
||||
* property of a new polyline is always set to the DrawingManager's map.
|
||||
*
|
||||
* @param polylineOptions
|
||||
*/
|
||||
public final native void setPolylineOptions(PolylineOptions polylineOptions) /*-{
|
||||
this.polylineOptions = polylineOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new polylines created with this DrawingManager. The path property is ignored, and the map
|
||||
* property of a new polyline is always set to the DrawingManager's map.
|
||||
*/
|
||||
public final native PolylineOptions getPolylineOptions() /*-{
|
||||
return this.polylineOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new rectangles created with this DrawingManager. The bounds property is ignored, and the
|
||||
* map property of a new rectangle is always set to the DrawingManager's map.
|
||||
*
|
||||
* @param rectangleOptions
|
||||
*/
|
||||
public final native void setRectangleOptions(RectangleOptions rectangleOptions) /*-{
|
||||
this.rectangleOptions = rectangleOptions;
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Options to apply to any new rectangles created with this DrawingManager. The bounds property is ignored, and the
|
||||
* map property of a new rectangle is always set to the DrawingManager's map.
|
||||
*/
|
||||
public final native RectangleOptions getRectangleOptions() /*-{
|
||||
return this.rectangleOptions;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.google.gwt.maps.client.drawinglib;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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%
|
||||
*/
|
||||
|
||||
/**
|
||||
* The types of overlay that may be created by the DrawingManager. <br>
|
||||
* <br>
|
||||
* See <a href="https://developers.google.com/maps/documentation/javascript/reference#OverlayType">OverlayType API
|
||||
* Doc</a>
|
||||
*/
|
||||
public enum OverlayType {
|
||||
|
||||
/**
|
||||
* Specifies that the DrawingManager creates circles, and that the overlay given in the overlaycomplete event is a
|
||||
* circle.
|
||||
*/
|
||||
CIRCLE,
|
||||
|
||||
/**
|
||||
* Specifies that the DrawingManager creates markers, and that the overlay given in the overlaycomplete event is a
|
||||
* marker.
|
||||
*/
|
||||
MARKER,
|
||||
|
||||
/**
|
||||
* Specifies that the DrawingManager creates polygons, and that the overlay given in the overlaycomplete event is a
|
||||
* polygon.
|
||||
*/
|
||||
POLYGON,
|
||||
|
||||
/**
|
||||
* Specifies that the DrawingManager creates polylines, and that the overlay given in the overlaycomplete event is a
|
||||
* polyline.
|
||||
*/
|
||||
POLYLINE,
|
||||
|
||||
/**
|
||||
* Specifies that the DrawingManager creates rectangles, and that the overlay given in the overlaycomplete event is a
|
||||
* rectangle.
|
||||
*/
|
||||
RECTANGLE;
|
||||
|
||||
public String value() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
public static OverlayType fromValue(String type) {
|
||||
return valueOf(type.toUpperCase());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return name();
|
||||
}
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.google.gwt.maps.client.events;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
||||
/**
|
||||
* Inherit this into unique Map Event
|
||||
*
|
||||
* @param <H> {@link MapHandler}
|
||||
* @param <E> {@link MapEvent}
|
||||
*/
|
||||
public abstract class MapEvent<H extends MapHandler<E>, E> extends GwtEvent<H> {
|
||||
|
||||
/**
|
||||
* properties from the map event call back {@link com.google.gwt.ajaxloader.client.Properties}
|
||||
*/
|
||||
protected Properties properties;
|
||||
|
||||
/**
|
||||
* create a new map event
|
||||
*
|
||||
* @param properties
|
||||
*/
|
||||
public MapEvent(Properties properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the raw properties
|
||||
*
|
||||
* @return {@link com.google.gwt.ajaxloader.client.Properties}
|
||||
*/
|
||||
public Properties getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* implement in the event that inherits this
|
||||
*/
|
||||
@Override
|
||||
public abstract Type<H> getAssociatedType();
|
||||
|
||||
/**
|
||||
* implement in the event that inherits this
|
||||
*/
|
||||
@Override
|
||||
protected abstract void dispatch(H handler);
|
||||
|
||||
/**
|
||||
* get property object as json
|
||||
*
|
||||
* @param jso
|
||||
*/
|
||||
protected native String getAsJson(JavaScriptObject jso) /*-{
|
||||
return jso.toSource ? jso.toSource() : "NO SOURCE";
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.google.gwt.maps.client.events;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
|
||||
/**
|
||||
* interface createEvent in {@link MapHandlerRegistration} using generics
|
||||
*
|
||||
* @param <E>
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
public interface MapEventFormatter<E extends MapEvent> {
|
||||
|
||||
public E createEvent(Properties properties);
|
||||
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
package com.google.gwt.maps.client.events;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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%
|
||||
*/
|
||||
|
||||
/**
|
||||
* possible observable event types
|
||||
*
|
||||
* {@link MapHandlerRegistration} uses these events. (Also find trigger here too)
|
||||
*
|
||||
*/
|
||||
public enum MapEventType {
|
||||
|
||||
ANIMATION_CHANGED,
|
||||
|
||||
BOUNDS_CHANGED,
|
||||
|
||||
CENTER_CHANGED,
|
||||
|
||||
CHANNELNUMBER_CHANGED,
|
||||
|
||||
CIRCLECOMPLETE,
|
||||
|
||||
CLICK,
|
||||
|
||||
CLICKABLE_CHANGED,
|
||||
|
||||
CLOSECLICK,
|
||||
|
||||
CONTENT_CHANGED,
|
||||
|
||||
CURSOR_CHANGED,
|
||||
|
||||
DBLCLICK,
|
||||
|
||||
DEFAULTVIEWPORT_CHANGED,
|
||||
|
||||
DIRECTIONS_CHANGED,
|
||||
|
||||
DOMREADY,
|
||||
|
||||
DRAG,
|
||||
|
||||
DRAGEND,
|
||||
|
||||
DRAGGABLE_CHANGED,
|
||||
|
||||
DRAGSTART,
|
||||
|
||||
FLAT_CHANGED,
|
||||
|
||||
FORMAT_CHANGED,
|
||||
|
||||
HEADING_CHANGED,
|
||||
|
||||
ICON_CHANGED,
|
||||
|
||||
IDLE,
|
||||
|
||||
INSERT_AT,
|
||||
|
||||
LINKS_CHANGED,
|
||||
|
||||
MAP_CHANGED,
|
||||
|
||||
MAPTYPEID_CHANGED,
|
||||
|
||||
MARKERCOMPLETE,
|
||||
|
||||
MOUSEDOWN,
|
||||
|
||||
MOUSEMOVE,
|
||||
|
||||
MOUSEOUT,
|
||||
|
||||
MOUSEOVER,
|
||||
|
||||
MOUSEUP,
|
||||
|
||||
OVERLAYCOMPLETE,
|
||||
|
||||
PANO_CHANGED,
|
||||
|
||||
PLACE_CHANGED,
|
||||
|
||||
POLYGONCOMPLETE,
|
||||
|
||||
POLYLINECOMPLETE,
|
||||
|
||||
POSITION_CHANGED,
|
||||
|
||||
POV_CHANGED,
|
||||
|
||||
PROJECTION_CHANGED,
|
||||
|
||||
RADIUS_CHANGED,
|
||||
|
||||
RECTANGLECOMPLETE,
|
||||
|
||||
REMOVE_AT,
|
||||
|
||||
RESIZE,
|
||||
|
||||
RIGHTCLICK,
|
||||
|
||||
SET_AT,
|
||||
|
||||
SHADOW_CHANGED,
|
||||
|
||||
SHAPE_CHANGED,
|
||||
|
||||
TILESLOADED,
|
||||
|
||||
TITLE_CHANGED,
|
||||
|
||||
TILT_CHANGED,
|
||||
|
||||
VISIBLE_CHANGED,
|
||||
|
||||
ZINDEX_CHANGED,
|
||||
|
||||
ZOOM_CHANGED;
|
||||
|
||||
public String value() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
public static MapEventType fromValue(String type) {
|
||||
return valueOf(type.toUpperCase());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.google.gwt.maps.client.events;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.event.shared.EventHandler;
|
||||
|
||||
public interface MapHandler<E> extends EventHandler {
|
||||
|
||||
public void onEvent(E event);
|
||||
|
||||
}
|
||||
+260
@@ -0,0 +1,260 @@
|
||||
package com.google.gwt.maps.client.events;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.ArrayHelper;
|
||||
import com.google.gwt.ajaxloader.client.Properties;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArray;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
import com.google.gwt.maps.client.events.mapchange.MapChangeEventFormatter;
|
||||
|
||||
public class MapHandlerRegistration {
|
||||
|
||||
/**
|
||||
* event handler
|
||||
*
|
||||
* @param jso
|
||||
* @param eventType
|
||||
* @param handler
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
public static <E extends MapEvent> HandlerRegistration addHandler(JavaScriptObject jso, MapEventType eventType,
|
||||
MapHandler<E> handler, MapEventFormatter<E> formatter) {
|
||||
final JavaScriptObject listener = addHandlerImpl(jso, eventType.value(), handler, formatter);
|
||||
HandlerRegistration registration = new HandlerRegistration() {
|
||||
@Override
|
||||
public void removeHandler() {
|
||||
removeHandlerImpl(listener);
|
||||
}
|
||||
};
|
||||
return registration;
|
||||
}
|
||||
|
||||
/**
|
||||
* event handler for the mvc object
|
||||
*
|
||||
* @param jso
|
||||
* @param eventType
|
||||
* @param handler
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
public static <E extends MapEvent> HandlerRegistration addHandlerMvc(JavaScriptObject jso, MapEventType eventType,
|
||||
MapHandler<E> handler, MapEventFormatter<E> formatter) {
|
||||
final JavaScriptObject listener = addHandlerImplMvc(jso, eventType.value(), handler, formatter);
|
||||
HandlerRegistration registration = new HandlerRegistration() {
|
||||
@Override
|
||||
public void removeHandler() {
|
||||
removeHandlerImpl(listener);
|
||||
}
|
||||
};
|
||||
return registration;
|
||||
}
|
||||
|
||||
/**
|
||||
* event handler for the drawing overlay objects
|
||||
*
|
||||
* @param jso
|
||||
* @param eventType
|
||||
* @param handler
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
public static <E extends MapEvent> HandlerRegistration addHandlerDrawing(JavaScriptObject jso,
|
||||
MapEventType eventType, MapHandler<E> handler, MapEventFormatter<E> formatter) {
|
||||
|
||||
final JavaScriptObject listener = addHandlerImplDrawing(jso, eventType.value(), handler, formatter);
|
||||
HandlerRegistration registration = new HandlerRegistration() {
|
||||
@Override
|
||||
public void removeHandler() {
|
||||
removeHandlerImpl(listener);
|
||||
}
|
||||
};
|
||||
return registration;
|
||||
}
|
||||
|
||||
/**
|
||||
* process the callback and send it to the handler
|
||||
*
|
||||
* @param jso
|
||||
* @param eventName
|
||||
* @param handler
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
private static native <E extends MapEvent> JavaScriptObject addHandlerImpl(JavaScriptObject jso, String eventName,
|
||||
MapHandler<E> handler, MapEventFormatter<E> formatter) /*-{
|
||||
var callback = function(event) {
|
||||
$entry(@com.google.gwt.maps.client.events.MapHandlerRegistration::onCallback(Lcom/google/gwt/maps/client/events/MapHandler;Lcom/google/gwt/ajaxloader/client/Properties;Lcom/google/gwt/maps/client/events/MapEventFormatter;)(handler, event, formatter));
|
||||
};
|
||||
return $wnd.google.maps.event.addListener(jso, eventName, callback)
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* process the callback and send it to the handler
|
||||
*
|
||||
* @param jso
|
||||
* @param eventName
|
||||
* @param handler
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
private static native <E extends MapEvent> JavaScriptObject addHandlerImplMvc(JavaScriptObject jso, String eventName,
|
||||
MapHandler<E> handler, MapEventFormatter<E> formatter) /*-{
|
||||
var callback = function(event) {
|
||||
var eventCon = {
|
||||
index : event
|
||||
};
|
||||
$entry(@com.google.gwt.maps.client.events.MapHandlerRegistration::onCallback(Lcom/google/gwt/maps/client/events/MapHandler;Lcom/google/gwt/ajaxloader/client/Properties;Lcom/google/gwt/maps/client/events/MapEventFormatter;)(handler, eventCon, formatter));
|
||||
};
|
||||
return $wnd.google.maps.event.addListener(jso, eventName, callback)
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* drawing sends events partly with different signature or arguments.
|
||||
*
|
||||
* @param jso
|
||||
* @param eventName
|
||||
* @param handler
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
private static native <E extends MapEvent> JavaScriptObject addHandlerImplDrawing(JavaScriptObject jso,
|
||||
String eventName, MapHandler<E> handler, MapEventFormatter<E> formatter) /*-{
|
||||
var callback = function(event) {
|
||||
var eventCon = {
|
||||
overlay : event
|
||||
};
|
||||
$entry(@com.google.gwt.maps.client.events.MapHandlerRegistration::onCallback(Lcom/google/gwt/maps/client/events/MapHandler;Lcom/google/gwt/ajaxloader/client/Properties;Lcom/google/gwt/maps/client/events/MapEventFormatter;)(handler, eventCon, formatter));
|
||||
};
|
||||
return $wnd.google.maps.event.addListener(jso, eventName, callback)
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* HandlerRegistration call when finished
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
private static native void removeHandlerImpl(JavaScriptObject listener) /*-{
|
||||
$wnd.google.maps.event.removeListener(listener);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* process generic handler callback
|
||||
*
|
||||
* @param handler
|
||||
* @param properties
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
protected static <E extends MapEvent> void onCallback(final MapHandler<E> handler, final Properties properties,
|
||||
final MapEventFormatter<E> formatter) {
|
||||
try {
|
||||
formatEvent(handler, properties, formatter);
|
||||
} catch (Throwable x) {
|
||||
GWT.getUncaughtExceptionHandler().onUncaughtException(x);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* create a map event
|
||||
*
|
||||
* @param handler
|
||||
* @param properties
|
||||
* @param formatter
|
||||
*/
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
private static <E extends MapEvent> void formatEvent(MapHandler<E> handler, Properties properties,
|
||||
MapEventFormatter<E> formatter) {
|
||||
E event = formatter.createEvent(properties);
|
||||
handler.onEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers the given event. All arguments after eventName are passed as arguments to the listeners. <br>
|
||||
* <b>Note:</b> Use Marker in objects to click on.
|
||||
*
|
||||
* @param w
|
||||
* @param eventType
|
||||
* @param objects
|
||||
*/
|
||||
public static void trigger(MapWidget w, MapEventType eventType, JavaScriptObject... objects) {
|
||||
JsArray<JavaScriptObject> a = ArrayHelper.toJsArray(objects);
|
||||
triggerImpl(w, eventType.value(), a);
|
||||
}
|
||||
|
||||
private static native void triggerImpl(MapWidget w, String eventName, JsArray<JavaScriptObject> args) /*-{
|
||||
var jso = w.@com.google.gwt.maps.client.MapWidget::getJso()();
|
||||
$wnd.google.maps.event.trigger(jso, eventName, args);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Triggers the given event. All arguments after eventName are passed as arguments to the listeners. <br>
|
||||
* <b>Note:</b> Use Marker in objects to click on.
|
||||
*
|
||||
* @param w
|
||||
* @param eventType
|
||||
*/
|
||||
public static void trigger(MapWidget w, MapEventType eventType) {
|
||||
triggerImpl(w, eventType.value());
|
||||
}
|
||||
|
||||
private static native void triggerImpl(MapWidget w, String eventName) /*-{
|
||||
var jso = w.@com.google.gwt.maps.client.MapWidget::getJso()();
|
||||
$wnd.google.maps.event.trigger(jso, eventName);
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* experimental for the moment. I'm not satisfied as of yet with this strategy.
|
||||
*
|
||||
* Cross browser event handler registration. This listener is removed by calling removeListener(handle) for the handle
|
||||
* that is returned by this function.
|
||||
*
|
||||
* @param jso
|
||||
* @param type
|
||||
* @param handler
|
||||
* @param capture
|
||||
*/
|
||||
public static <E> void addDomListener(JavaScriptObject jso,
|
||||
com.google.gwt.event.dom.client.DomEvent.Type<ClickHandler> type, MapHandler<E> handler, boolean capture) {
|
||||
addDomListener(jso, type.getName(), handler, capture);
|
||||
}
|
||||
|
||||
private static native <E> void addDomListener(JavaScriptObject object, String eventName, MapHandler<?> handler,
|
||||
boolean capture) /*-{
|
||||
var callback = function(event) {
|
||||
@com.google.gwt.maps.client.events.MapHandlerRegistration::addDomListenerImpl(Lcom/google/gwt/ajaxloader/client/Properties;Lcom/google/gwt/maps/client/events/MapHandler;)(event, handler)
|
||||
};
|
||||
$wnd.google.maps.event.addDomListener(object, eventName, callback, capture);
|
||||
}-*/;
|
||||
|
||||
// is ugly, but is a cyclic generic type, so suppressed
|
||||
private static void addDomListenerImpl(Properties properties, MapHandler<MapEvent> handler) {
|
||||
MapChangeEventFormatter formatter = new MapChangeEventFormatter();
|
||||
handler.onEvent(formatter.createEvent(properties));
|
||||
}
|
||||
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.google.gwt.maps.client.events;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class MapPanel extends FlowPanel {
|
||||
|
||||
public MapPanel() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach() {
|
||||
super.onAttach();
|
||||
}
|
||||
|
||||
/**
|
||||
* todo only do this once, b/c other wise it probably won't act right adding it over and over
|
||||
*/
|
||||
@Override
|
||||
public void add(Widget child) {
|
||||
super.add(child);
|
||||
onAttach();
|
||||
RootPanel.detachOnWindowClose(this);
|
||||
}
|
||||
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.google.gwt.maps.client.events;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.ajaxloader.client.Properties.TypeException;
|
||||
import com.google.gwt.maps.client.base.LatLng;
|
||||
|
||||
/**
|
||||
* This object is returned from various mouse events on the map and overlays, and contains all the fields shown below. <br>
|
||||
* <br>
|
||||
* See <a href= "https://developers.google.com/maps/documentation/javascript/reference#MouseEvent" >MouseEvent API
|
||||
* Doc</a>
|
||||
*/
|
||||
public class MouseEvent {
|
||||
|
||||
/**
|
||||
* {@link LatLng}
|
||||
*/
|
||||
private LatLng latLng;
|
||||
|
||||
/**
|
||||
* Create a new MouseEvent from properties of the map event call back
|
||||
*
|
||||
* @param properties {@link com.google.gwt.ajaxloader.client.Properties}
|
||||
*/
|
||||
public MouseEvent(Properties properties) {
|
||||
parseProperties(properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the properties for {@link LatLng}
|
||||
*
|
||||
* @param properties
|
||||
*/
|
||||
private void parseProperties(Properties properties) {
|
||||
try {
|
||||
latLng = (LatLng) properties.getObject("latLng");
|
||||
} catch (TypeException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The latitude/longitude that was below the cursor when the event occurred.
|
||||
*
|
||||
* @return point of mouse event
|
||||
*/
|
||||
public final LatLng getLatLng() {
|
||||
return latLng;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents this event from propagating further.
|
||||
*/
|
||||
public final native void stop() /*-{
|
||||
this.stop();
|
||||
}-*/;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.animation;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class AnimationChangeEventFormatter implements MapEventFormatter<AnimationChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public AnimationChangeMapEvent createEvent(Properties properties) {
|
||||
return new AnimationChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.animation;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class AnimationChangeMapEvent extends MapEvent<AnimationChangeMapHandler, AnimationChangeMapEvent> {
|
||||
|
||||
public static Type<AnimationChangeMapHandler> TYPE = new Type<AnimationChangeMapHandler>();
|
||||
|
||||
public AnimationChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<AnimationChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(AnimationChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.animation;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface AnimationChangeMapHandler extends MapHandler<AnimationChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.bounds;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class BoundsChangeEventFormatter implements MapEventFormatter<BoundsChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public BoundsChangeMapEvent createEvent(Properties properties) {
|
||||
return new BoundsChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.bounds;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class BoundsChangeMapEvent extends MapEvent<BoundsChangeMapHandler, BoundsChangeMapEvent> {
|
||||
|
||||
public static Type<BoundsChangeMapHandler> TYPE = new Type<BoundsChangeMapHandler>();
|
||||
|
||||
public BoundsChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<BoundsChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(BoundsChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.bounds;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface BoundsChangeMapHandler extends MapHandler<BoundsChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.center;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class CenterChangeEventFormatter implements MapEventFormatter<CenterChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public CenterChangeMapEvent createEvent(Properties properties) {
|
||||
return new CenterChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.center;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class CenterChangeMapEvent extends MapEvent<CenterChangeMapHandler, CenterChangeMapEvent> {
|
||||
|
||||
public static Type<CenterChangeMapHandler> TYPE = new Type<CenterChangeMapHandler>();
|
||||
|
||||
public CenterChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<CenterChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(CenterChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.center;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface CenterChangeMapHandler extends MapHandler<CenterChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.channelnumber;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class ChannelNumberChangeEventFormatter implements MapEventFormatter<ChannelNumberChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public ChannelNumberChangeMapEvent createEvent(Properties properties) {
|
||||
return new ChannelNumberChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.channelnumber;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class ChannelNumberChangeMapEvent extends MapEvent<ChannelNumberChangeMapHandler, ChannelNumberChangeMapEvent> {
|
||||
|
||||
public static Type<ChannelNumberChangeMapHandler> TYPE = new Type<ChannelNumberChangeMapHandler>();
|
||||
|
||||
public ChannelNumberChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<ChannelNumberChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(ChannelNumberChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.channelnumber;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface ChannelNumberChangeMapHandler extends MapHandler<ChannelNumberChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.click;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class ClickEventFormatter implements MapEventFormatter<ClickMapEvent> {
|
||||
|
||||
@Override
|
||||
public ClickMapEvent createEvent(Properties properties) {
|
||||
return new ClickMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.google.gwt.maps.client.events.click;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
import com.google.gwt.maps.client.events.MouseEvent;
|
||||
|
||||
public class ClickMapEvent extends MapEvent<ClickMapHandler, ClickMapEvent> {
|
||||
|
||||
public static Type<ClickMapHandler> TYPE = new Type<ClickMapHandler>();
|
||||
|
||||
public ClickMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<ClickMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(ClickMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
public MouseEvent getMouseEvent() {
|
||||
return new MouseEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.click;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface ClickMapHandler extends MapHandler<ClickMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.clickable;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class ClickableChangeEventFormatter implements MapEventFormatter<ClickableChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public ClickableChangeMapEvent createEvent(Properties properties) {
|
||||
return new ClickableChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.clickable;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class ClickableChangeMapEvent extends MapEvent<ClickableChangeMapHandler, ClickableChangeMapEvent> {
|
||||
|
||||
public static Type<ClickableChangeMapHandler> TYPE = new Type<ClickableChangeMapHandler>();
|
||||
|
||||
public ClickableChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<ClickableChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(ClickableChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.clickable;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface ClickableChangeMapHandler extends MapHandler<ClickableChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.closeclick;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class CloseClickEventFormatter implements MapEventFormatter<CloseClickMapEvent> {
|
||||
|
||||
@Override
|
||||
public CloseClickMapEvent createEvent(Properties properties) {
|
||||
return new CloseClickMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.closeclick;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class CloseClickMapEvent extends MapEvent<CloseClickMapHandler, CloseClickMapEvent> {
|
||||
|
||||
public static Type<CloseClickMapHandler> TYPE = new Type<CloseClickMapHandler>();
|
||||
|
||||
public CloseClickMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<CloseClickMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(CloseClickMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.closeclick;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface CloseClickMapHandler extends MapHandler<CloseClickMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.content;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class ContentChangeEventFormatter implements MapEventFormatter<ContentChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public ContentChangeMapEvent createEvent(Properties properties) {
|
||||
return new ContentChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.content;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class ContentChangeMapEvent extends MapEvent<ContentChangeMapHandler, ContentChangeMapEvent> {
|
||||
|
||||
public static Type<ContentChangeMapHandler> TYPE = new Type<ContentChangeMapHandler>();
|
||||
|
||||
public ContentChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<ContentChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(ContentChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.content;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface ContentChangeMapHandler extends MapHandler<ContentChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.cursor;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class CursorChangeEventFormatter implements MapEventFormatter<CursorChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public CursorChangeMapEvent createEvent(Properties properties) {
|
||||
return new CursorChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.cursor;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class CursorChangeMapEvent extends MapEvent<CursorChangeMapHandler, CursorChangeMapEvent> {
|
||||
|
||||
public static Type<CursorChangeMapHandler> TYPE = new Type<CursorChangeMapHandler>();
|
||||
|
||||
public CursorChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<CursorChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(CursorChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.cursor;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface CursorChangeMapHandler extends MapHandler<CursorChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.dblclick;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class DblClickEventFormatter implements MapEventFormatter<DblClickMapEvent> {
|
||||
|
||||
@Override
|
||||
public DblClickMapEvent createEvent(Properties properties) {
|
||||
return new DblClickMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.google.gwt.maps.client.events.dblclick;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
import com.google.gwt.maps.client.events.MouseEvent;
|
||||
|
||||
public class DblClickMapEvent extends MapEvent<DblClickMapHandler, DblClickMapEvent> {
|
||||
|
||||
public static Type<DblClickMapHandler> TYPE = new Type<DblClickMapHandler>();
|
||||
|
||||
public DblClickMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<DblClickMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DblClickMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
public MouseEvent getMouseEvent() {
|
||||
return new MouseEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.dblclick;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface DblClickMapHandler extends MapHandler<DblClickMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.directions;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class DirectionsChangeEventFormatter implements MapEventFormatter<DirectionsChangeMapEvent> {
|
||||
|
||||
@Override
|
||||
public DirectionsChangeMapEvent createEvent(Properties properties) {
|
||||
return new DirectionsChangeMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.directions;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class DirectionsChangeMapEvent extends MapEvent<DirectionsChangeMapHandler, DirectionsChangeMapEvent> {
|
||||
|
||||
public static Type<DirectionsChangeMapHandler> TYPE = new Type<DirectionsChangeMapHandler>();
|
||||
|
||||
public DirectionsChangeMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<DirectionsChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DirectionsChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.directions;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface DirectionsChangeMapHandler extends MapHandler<DirectionsChangeMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.domready;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class DomReadyEventFormatter implements MapEventFormatter<DomReadyMapEvent> {
|
||||
|
||||
@Override
|
||||
public DomReadyMapEvent createEvent(Properties properties) {
|
||||
return new DomReadyMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.domready;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class DomReadyMapEvent extends MapEvent<DomReadyMapHandler, DomReadyMapEvent> {
|
||||
|
||||
public static Type<DomReadyMapHandler> TYPE = new Type<DomReadyMapHandler>();
|
||||
|
||||
public DomReadyMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<DomReadyMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DomReadyMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.domready;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface DomReadyMapHandler extends MapHandler<DomReadyMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.drag;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class DragEventFormatter implements MapEventFormatter<DragMapEvent> {
|
||||
|
||||
@Override
|
||||
public DragMapEvent createEvent(Properties properties) {
|
||||
return new DragMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.drag;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class DragMapEvent extends MapEvent<DragMapHandler, DragMapEvent> {
|
||||
|
||||
public static Type<DragMapHandler> TYPE = new Type<DragMapHandler>();
|
||||
|
||||
public DragMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<DragMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DragMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.drag;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface DragMapHandler extends MapHandler<DragMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.dragend;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class DragEndEventFormatter implements MapEventFormatter<DragEndMapEvent> {
|
||||
|
||||
@Override
|
||||
public DragEndMapEvent createEvent(Properties properties) {
|
||||
return new DragEndMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.dragend;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class DragEndMapEvent extends MapEvent<DragEndMapHandler, DragEndMapEvent> {
|
||||
|
||||
public static Type<DragEndMapHandler> TYPE = new Type<DragEndMapHandler>();
|
||||
|
||||
public DragEndMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<DragEndMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DragEndMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.dragend;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface DragEndMapHandler extends MapHandler<DragEndMapEvent> {
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.draggable;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class DraggableChangeEventFormatter implements MapEventFormatter<DraggableChangedMapEvent> {
|
||||
|
||||
@Override
|
||||
public DraggableChangedMapEvent createEvent(Properties properties) {
|
||||
return new DraggableChangedMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.gwt.maps.client.events.draggable;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.maps.client.events.MapHandler;
|
||||
|
||||
public interface DraggableChangeMapHandler extends MapHandler<DraggableChangedMapEvent> {
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.google.gwt.maps.client.events.draggable;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEvent;
|
||||
|
||||
public class DraggableChangedMapEvent extends MapEvent<DraggableChangeMapHandler, DraggableChangedMapEvent> {
|
||||
|
||||
public static Type<DraggableChangeMapHandler> TYPE = new Type<DraggableChangeMapHandler>();
|
||||
|
||||
public DraggableChangedMapEvent(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<DraggableChangeMapHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DraggableChangeMapHandler handler) {
|
||||
handler.onEvent(this);
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.google.gwt.maps.client.events.dragstart;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* GWT Maps API V3 - Core API
|
||||
* %%
|
||||
* Copyright (C) 2011 - 2012 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.ajaxloader.client.Properties;
|
||||
import com.google.gwt.maps.client.events.MapEventFormatter;
|
||||
|
||||
public class DragStartEventFormatter implements MapEventFormatter<DragStartMapEvent> {
|
||||
|
||||
@Override
|
||||
public DragStartMapEvent createEvent(Properties properties) {
|
||||
return new DragStartMapEvent(properties);
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 100 of 917 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user