Package com.volantis.mcs.protocols.widgets.attributes

Examples of com.volantis.mcs.protocols.widgets.attributes.MapLocationMarkerAttributes


       
        if(!isWidgetSupported(protocol)) {
            return;
        }
       
        MapLocationMarkerAttributes attr = (MapLocationMarkerAttributes)attributes;
        double lng = attr.getLongitude();
        double lat = attr.getLatitude();
        String src = attr.getSrc();
        int minZoom = attr.getMinZoom();
        int maxZoom = attr.getMaxZoom();
       
        GoogleCalculator calc = GoogleCalculatorExtended.getInstance();
        GPoint gPoint = calc.fromLatLngToPixel(new GLatLng(lat, lng), 0);
        GImage gImage = calc.fromGPixelToGImage(gPoint);
       
        StringBuffer textBuffer = new StringBuffer();
       
        textBuffer.append(
                createJavaScriptWidgetRegistrationOpening(
                        attr.getId()))
                .append("new Widget.MapLocationMarker(")
                .append(createJavaScriptString(attr.getId()))
                .append(", {")
                .append("lng: ").append(gImage.getImgX()).append(", ")
                .append("lat: ").append(gImage.getImgY()).append(", ")
                .append("src: ").append(createJavaScriptString(src)).append(", ")
                .append("minZoom: ").append(minZoom).append(", ")
                .append("maxZoom: ").append(maxZoom)
                .append("})")
                .append(createJavaScriptWidgetRegistrationClosure());
       
        addCreatedWidgetId(attr.getId());
        writeJavaScript(textBuffer.toString());

    }
View Full Code Here


     */
    public void mergeMapLocationMarkerAttributes(
            List mapLocationMarkerAttributes) throws ProtocolException {
        Iterator i = mapLocationMarkerAttributes.iterator();
        while (i.hasNext()){
            MapLocationMarkerAttributes m = (MapLocationMarkerAttributes)i.next();
            addMapLocatorMarkerId(m.getId());
        }
    }
View Full Code Here

        // Initialise superclass.
        super(WidgetElements.MAP_LOCATION_MARKER, context);

        // Create an instance of MapLocationMarker attributes.
        // It'll be initialised later in initialiseAttributes() method.
        protocolAttributes = new MapLocationMarkerAttributes();
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.attributes.MapLocationMarkerAttributes

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.