Package org.wicketstuff.openlayers3.component

Examples of org.wicketstuff.openlayers3.component.MarkerPopover


        // create our map
        map = new DefaultOpenLayersMap("map",

                // create the model for our map
                Model.of(new Map(

                        // list of layers
                        Arrays.<Layer>asList(

                                // a new tile layer with the map of the world
View Full Code Here


    @Override
    protected void onConfigure() {
        super.onConfigure();

        Map map = getModelObject();
        map.setTarget(getMarkupId());

        if (map.getLayers() != null) {

            for (Layer layer : map.getLayers()) {

                if (layer instanceof Vector) {

                    final Vector vectorLayer = (Vector) layer;
View Full Code Here

     * @return String with the rendered Javascript
     */
    public String renderBeforeConstructorJs() {

        StringBuilder builder = new StringBuilder();
        Map map = getModelObject();

        if (map != null) {

            for (Layer layer : map.getLayers()) {

                // create vector data sources before the map
                if (layer.getSource() != null && layer.getSource() instanceof VectorSource) {

                    VectorSource vectorSource = (VectorSource) layer.getSource();
View Full Code Here

        // create and add our marker
        add(map = new DefaultOpenLayersMap("map",

                // create the model for our map
                Model.of(new Map(

                        // list of layers
                        Arrays.<Layer>asList(

                                // a new tile layer with the map of the world
View Full Code Here

     * @return String with the rendered Javascript
     */
    public String renderAfterConstructorJs() {

        StringBuilder builder = new StringBuilder();
        Map map = getModelObject();

        // handle additional map building code
        if (map.getLayers() != null) {

            for (Layer layer : map.getLayers()) {

                if (layer.getSource() != null && layer.getSource() instanceof VectorSource) {

                    VectorSource vectorSource = (VectorSource) layer.getSource();

                    if (vectorSource.getFeatures() != null) {
                        for (Feature feature : vectorSource.getFeatures()) {
                            builder.append(feature.renderAfterConstructorJs());
                        }
                    }
                }

                // create vector data sources for clusters before the map
                if (layer.getSource() != null && layer.getSource() instanceof Cluster) {

                    Cluster source = (Cluster) layer.getSource();

                    // add a listener to reload our cluster data
                    if(source.getSource() instanceof ServerVector) {

                        builder.append(map.getJsId() + ".getView().on('propertychange', function(event) {");
                        builder.append(renderClusterLoaderJs(map, layer));
                        builder.append("});");
                    }

                    // kick off an initial cluster load
View Full Code Here

     *
     * @return String of rendered Javascript
     */
    public String renderJs() {

  Map map = getModelObject();

        StringBuilder builder = new StringBuilder();
        builder.append(renderBeforeConstructorJs() + "\n\n");
        builder.append(map.getJsId() + " = new " + map.getJsType() + "(");
        builder.append(map.renderJs());
        builder.append(");\n\n");
        builder.append(renderAfterConstructorJs());
        return builder.toString();
    }
View Full Code Here

                                        // position of the overlay relative to the point
                                        Overlay.Positioning.BottomCenter)),

                        // view for this map
                        new View(

                                // center the map on Miles' office
                                longLat,

                                // zoom level for the view
View Full Code Here

                                        // position of the overlay relative to the point
                                        Overlay.Positioning.BottomCenter)),

                        // view for this map
                        new View(

                                // coordinate of Miles' office
                                new LongLat(-72.638382, 42.313181, "EPSG:4326").transform(View.DEFAULT_PROJECTION),

                                // zoom level for the view
View Full Code Here

                                                // options for the layer
                                                ImmutableMap.of("LAYERS", "bluemarble", "VERSION", "1.1.1")))),

                        // view for this map
                        new View(new Coordinate(0, 0), 2)))));
    }
View Full Code Here

                                        // a new web map service tile layer
                                        new Osm())),

                        // view for this map
                        new View(

                                // coordinate of Miles' office
                                new LongLat(-72.638429, 42.313229, "EPSG:4326").transform(View.DEFAULT_PROJECTION),

                                // zoom level for the view
View Full Code Here

TOP

Related Classes of org.wicketstuff.openlayers3.component.MarkerPopover

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.