/** * Create an instance of {@link NetworkLink} * */ public static NetworkLink createNetworkLink() { return new NetworkLink(); }
private void encodeSequentialNetworkLink(Folder folder, String linkbase, int start, int maxFeatures, String id, String readableName) { NetworkLink nl = folder.createAndAddNetworkLink(); Link link = nl.createAndSetLink(); link.setHref(linkbase + "?startindex=" + start + "&maxfeatures=" + maxFeatures); nl.setDescription(readableName); nl.setId(id); }
/** * add a value to the networkLinkObjectExtension property collection * * @param networkLinkObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public NetworkLink addToNetworkLinkObjectExtension(final AbstractObject networkLinkObjectExtension) { this.getNetworkLinkObjectExtension().add(networkLinkObjectExtension); return this; }
MapLayerInfo layerInfo = layers.get(i); NetworkLink nl = container.createAndAddNetworkLink(); nl.setName(layerInfo.getName()); nl.setVisibility(true); nl.setOpen(true); if (latLongBoundingBox != null) { LookAt la = lookAtFactory.buildLookAt(latLongBoundingBox, lookAtOptions, false); nl.setAbstractView(la); Link url = nl.createAndSetUrl(); url.setHref(href); url.setViewRefreshMode(ViewRefreshMode.ON_STOP);
void encodeKMLLink(Folder container, Layer layer, String name, int drawOrder, Envelope box) { // copy the format options CaseInsensitiveMap fo = new CaseInsensitiveMap(new HashMap()); fo.putAll(mapContent.getRequest().getFormatOptions()); // we want to pass through format options except for superoverlay, we need to // turn it off so we get actual placemarks back, and not more links fo.remove("superoverlay"); // get the regionate mode String overlayMode = (String) fo.get("overlayMode"); if ("overview".equalsIgnoreCase(overlayMode)) { // overview mode, turn off regionation fo.remove("regionateBy"); } else { // specify regionateBy=auto if not specified if (!fo.containsKey("regionateBy")) { fo.put("regionateBy", "auto"); } } String foEncoded = WMSRequests.encodeFormatOptions(fo); // encode the link NetworkLink nl = container.createAndAddNetworkLink(); nl.setName(name); addRegion(nl, box, 128, -1); nl.setVisibility(true); Link link = nl.createAndSetLink(); String url = WMSRequests.getGetMapUrl(request, layer, 0, box, new String[] { "width", "256", "height", "256", "format_options", foEncoded, "superoverlay", "true"}); link.setHref(url); }
void addNetworkLink(Folder container, Envelope box, String name, Layer layer) { // check if we are going to get any feature from this layer String overlayMode = context.getSuperOverlayMode(); if (!"raster".equals(overlayMode) && layer instanceof FeatureLayer && !shouldDrawVectorLayer(layer, box)) { return; } NetworkLink nl = container.createAndAddNetworkLink(); nl.setName(name); addRegion(nl, box, 128, -1); Link link = nl.createAndSetLink(); String getMap = WMSRequests.getGetMapUrl(request, layer, 0, box, new String[] { "format", KMLMapOutputFormat.MIME_TYPE, "width", "256", "height", "256", "format", NetworkLinkMapOutputFormat.KML_MIME_TYPE }); link.setHref(getMap); LOGGER.fine("Network link " + name + ":" + getMap); link.setViewRefreshMode(ViewRefreshMode.ON_REGION); }
@Override public NetworkLink clone() { NetworkLink copy; copy = ((NetworkLink) super.clone()); copy.url = ((url == null)?null:((de.micromata.opengis.kml.v_2_2_0.Link) url.clone())); copy.link = ((link == null)?null:((de.micromata.opengis.kml.v_2_2_0.Link) link.clone())); copy.networkLinkSimpleExtension = new ArrayList<Object>((getNetworkLinkSimpleExtension().size())); for (Object iter: networkLinkSimpleExtension) { copy.networkLinkSimpleExtension.add(iter); } copy.networkLinkObjectExtension = new ArrayList<AbstractObject>((getNetworkLinkObjectExtension().size())); for (AbstractObject iter: networkLinkObjectExtension) { copy.networkLinkObjectExtension.add(iter.clone()); } return copy; }
/** * fluent setter * @see #setLink(Link) * * @param link * required parameter */ public NetworkLink withLink(final de.micromata.opengis.kml.v_2_2_0.Link link) { this.setLink(link); return this; }
/** * add a value to the networkLinkSimpleExtension property collection * * @param networkLinkSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public NetworkLink addToNetworkLinkSimpleExtension(final Object networkLinkSimpleExtension) { this.getNetworkLinkSimpleExtension().add(networkLinkSimpleExtension); return this; }
/** * fluent setter * @see #setFlyToView(Boolean) * * @param flyToView * required parameter */ public NetworkLink withFlyToView(final Boolean flyToView) { this.setFlyToView(flyToView); return this; }
public void encodeGWCLink(Document container, GetMapRequest request, MapLayerInfo layer) { NetworkLink nl = container.createAndAddNetworkLink(); String prefixedName = layer.getResource().prefixedName(); nl.setName("GWC-" + prefixedName); Link link = nl.createAndSetLink(); String type = layer.getType() == MapLayerInfo.TYPE_RASTER ? "png" : "kml"; String url = ResponseUtils.buildURL(request.getBaseUrl(), "gwc/service/kml/" + prefixedName + "." + type + ".kml", null, URLType.SERVICE); link.setHref(url); link.setViewRefreshMode(ViewRefreshMode.NEVER); }
@Override public NetworkLink clone() { NetworkLink copy; copy = ((NetworkLink) super.clone()); copy.url = ((url == null)?null:((de.micromata.opengis.kml.v_2_2_0.Link) url.clone())); copy.link = ((link == null)?null:((de.micromata.opengis.kml.v_2_2_0.Link) link.clone())); copy.networkLinkSimpleExtension = new ArrayList<Object>((getNetworkLinkSimpleExtension().size())); for (Object iter: networkLinkSimpleExtension) { copy.networkLinkSimpleExtension.add(iter); } copy.networkLinkObjectExtension = new ArrayList<AbstractObject>((getNetworkLinkObjectExtension().size())); for (AbstractObject iter: networkLinkObjectExtension) { copy.networkLinkObjectExtension.add(iter.clone()); } return copy; }
/** * fluent setter * @see #setLink(Link) * * @param link * required parameter */ public NetworkLink withLink(final de.micromata.opengis.kml.v_2_2_0.Link link) { this.setLink(link); return this; }
/** * add a value to the networkLinkSimpleExtension property collection * * @param networkLinkSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public NetworkLink addToNetworkLinkSimpleExtension(final Object networkLinkSimpleExtension) { this.getNetworkLinkSimpleExtension().add(networkLinkSimpleExtension); return this; }
/** * fluent setter * @see #setFlyToView(Boolean) * * @param flyToView * required parameter */ public NetworkLink withFlyToView(final Boolean flyToView) { this.setFlyToView(flyToView); return this; }
/** * Create an instance of {@link NetworkLink} * */ public static NetworkLink createNetworkLink() { return new NetworkLink(); }
/** * Creates a new instance of {@link de.micromata.opengis.kml.v_2_2_0.Link} and set it to link. * * This method is a short version for: * <code> * Link link = new Link(); * this.setLink(link); </code> * * */ public de.micromata.opengis.kml.v_2_2_0.Link createAndSetLink() { de.micromata.opengis.kml.v_2_2_0.Link newValue = new de.micromata.opengis.kml.v_2_2_0.Link(); this.setLink(newValue); return newValue; }
/** * add a value to the networkLinkObjectExtension property collection * * @param networkLinkObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public NetworkLink addToNetworkLinkObjectExtension(final AbstractObject networkLinkObjectExtension) { this.getNetworkLinkObjectExtension().add(networkLinkObjectExtension); return this; }
/** * Creates a new instance of {@link NetworkLink} and adds it to feature. * This method is a short version for: * <code> * NetworkLink networkLink = new NetworkLink(); * this.getFeature().add(networkLink); </code> * * */ public NetworkLink createAndAddNetworkLink() { NetworkLink newValue = new NetworkLink(); this.getFeature().add(newValue); return newValue; }
/** * Creates a new instance of {@link de.micromata.opengis.kml.v_2_2_0.Link} and set it to link. * * This method is a short version for: * <code> * Link link = new Link(); * this.setLink(link); </code> * * */ public de.micromata.opengis.kml.v_2_2_0.Link createAndSetLink() { de.micromata.opengis.kml.v_2_2_0.Link newValue = new de.micromata.opengis.kml.v_2_2_0.Link(); this.setLink(newValue); return newValue; }