Comments (2)
I agree, It would be also a good time for using the annotation-based configuration feature of commons demo (FlowingCode/CommonsDemo@d5ec76b) which is available ein 3.1.0-SNAPSHOT
from googlemapsaddon.
My idea for improving this demo is:
- Create an AbstractGoogleMapsDemo class that extends from VerticalLayout and it's in charge to validate api key, so all different demo views extend from it.
Something like:
@StyleSheet("context://frontend/styles/google-maps/demo-styles.css")
public abstract class AbstractGoogleMapsDemo extends VerticalLayout {
public AbstractGoogleMapsDemo() {
this.setSizeFull();
String apiKey = System.getProperty("google.maps.api");
if (apiKey == null) {
add(
new H2(
"Api key is needded to run the demo, pass it using the following system property: '-Dgoogle.maps.api=<your-api-key>'"));
} else {
createGoogleMapsDemo(apiKey);
}
}
protected abstract void createGoogleMapsDemo(String apiKey);
}
-
Split the current GoogleMapsDemo into 3 different demos:
1 - BasicGoogleMapDemo: This will include de FlowingCode marker (not draggable), with the show coordinates & toggle info view buttons.
2 - AddMarkersDemo: This will include adding markers with the selection of colors.
3 - AddPolygonsDemo: This will include current add polygon example.
Note: Draggable markers demo showing drag end coordinates will be another demo that I will be adding when I can complete #40 .
-
Then, I will update the current GeolocationDemo to extend this new abstract class.
What do you think @javier-godoy, @mlopezFC ?
from googlemapsaddon.
Related Issues (20)
- Add support for adding lines besides polygons
- Add a custom renderer for markers clustering
- removeMarker when clustering enabled not working
- Add support for clustering with custom marker images HOT 2
- Setting of anchorpoint for Markers HOT 1
- Add the 'current location' button HOT 4
- Add support for controls API HOT 2
- 'My location' marker
- PolyLine, Polygon, not first Map usage
- "google.maps.Marker is deprecated" warning HOT 1
- Add API to hide POI (point of interest) HOT 4
- New map styling is coming soon to Google Maps Platform
- Support for Directions
- Documentation for setClusteringRenderer HOT 4
- CustomControl Buttons are rePostioned! cant have different positions of multiple buttons! HOT 8
- Add/remove custom controls dynamically HOT 3
- Full screen mode hides Dialogs HOT 4
- Screen Shot Feature
- setZoom write attribute but getZoom read property HOT 1
- Internally manage trackLocationId
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googlemapsaddon.