I'm trying to make a draggable map and fixed marker in MAF JDeveloper, but I can't align the marker to the middle of the map and make the marker get coordinates of this position by clicking the marker.
Here's the sample code:
<?xml version="1.0" encoding="UTF-8" ?>
<amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"
xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt">
<amx:panelPage id="pp1">
<amx:panelStretchLayout id="psl2">
<amx:facet name="center">
<dvtm:geographicMap id="geomp1">
<dvtm:pointDataLayer id="pdl1"/>
</dvtm:geographicMap>
</amx:facet>
</amx:panelStretchLayout>
<amx:flexLayout id="fl1">
<dvtm:pointLocation id="pl1">
<dvtm:marker id="mrk1"/>
</dvtm:pointLocation>
</amx:flexLayout>
</amx:panelPage>
</amx:view>
EDIT
I have done the get coordinates part by using MapInputListener but sadly this fires a lot of triggers on the map not just tapping it
can anyone provide me a better way or how to limit the events to just hold&tap
Related
I have the grid shapefile that contains properties of the Polygon Grid.I imported into GeoServer and created the grid layer.And for the style of the layer, I created SLD File with LabelPlacement contains Anchor X and Y position for the label to display in the middle of the polygon.It's working fine.
The following is the SLD style:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a Named Layer is the basic building block of an SLD document -->
<NamedLayer>
<Name>default_polygon</Name>
<UserStyle>
<!-- Styles can have names, titles and abstracts -->
<Title>Default Polygon</Title>
<Abstract>A sample style that draws a polygon</Abstract>
<!-- FeatureTypeStyles describe how to render different features -->
<!-- A FeatureTypeStyle for rendering polygons -->
<FeatureTypeStyle>
<Rule>
<Name>rule1</Name>
<Title>Gray Polygon with Black Outline</Title>
<Abstract>A polygon with a gray fill and a 1 pixel black outline</Abstract>
<PolygonSymbolizer>
<Stroke>
<CssParameter name="stroke">#0000FF</CssParameter>
<CssParameter name="stroke-width">1.5</CssParameter>
</Stroke>
</PolygonSymbolizer>
<TextSymbolizer>
<Label>
0<ogc:PropertyName>TWP</ogc:PropertyName>-0<ogc:PropertyName>RGE</ogc:PropertyName>W<ogc:PropertyName>M</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Times New Roman</CssParameter>
<CssParameter name="font-style">Normal</CssParameter>
<CssParameter name="font-size">14</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.5</AnchorPointX>
<AnchorPointY>0.5</AnchorPointY>
</AnchorPoint>
</PointPlacement>
</LabelPlacement>
<!--
<Displacement>
<DisplacementX>25</DisplacementX>
<DisplacementY>0</DisplacementY>
</Displacement>
-->
<Fill>
<CssParameter name="fill">#0000FF</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
And getting output is:
But how to assign the Label Horizontal and Vertical only for Outer Boundary of the Grid from layer properties.I want Label like the following image:
I tried label Displacement and AnchorPoint.Don't know how to create(Horizontal and Vertical Label).
Please, any help.
This is hard (and possibly impossible), GeoServer will try (by default) to label each feature at it's centre (or at the geometry you specify) so you first need to design a filter that will force it to only label features at the edge of the map. You will probably want to make use of the predefined variable wms_bbox which gives you the location of the outside of the map.
Next you will need to calculate the position of the label which will be some sort of intersection between the feature you are labelling and the wms bounding box. Here you will need to determine if you are at the top, bottom, left or right edge and adjust the label location accordingly. For this you have a range of functions available. I suspect you will need if_then_else and the env function to get the bounding box variable from above combined with the spatial functions to determine where you are, and finally the geometric functions to create the new geometry.
There was a discussion on the geoserver-user's mailing list a while ago and this question on gis.stackexchange.com that are related but I don't think either of them reached a good conclusion.
please take a look at my measurement-plugin for Leaflet: Leaflet.PolylineMeasure
You can view the plugin's javascript code on my Github site.
It's working perfect on desktop browsers.
Even on touch devices it's possible to draw the measure points and end a line by clicking onto the last point (or switching the measure button off). But it's not possible to move the points afterwords and correct their position on the map. I tried using parallel event definitions of mouse events and touch events, but the moving on touch devices doesn't work
self._map.on ('mousemove touchmove', function (e2) {
Does anybody has an idea what to change?
In Shetchfab.com you can add a 3d background environment for your 3d objects.
Im making this page where i show an .x3d object in a tag frame using x3dom.
<x3d height='500px'>
<scene id="mainScene">
<Inline id="inlineBox" nameSpaceName="dcm" url="juicecarton.x3d" />
</scene>
</x3d>
How do i add a background like Sketchfab with the rotating environment ?
Can someone help me out with this?
The rotating background is often called a "cubemap" (although that name can be used for both, the kind of texture and the way it is being used / visualized in 3D).
In X3DOM, you should be able to use a background like this (inside the Scene element):
<Background id='back1'
backUrl='"./ocean_3_back.jpg"' bottomUrl='"./ocean_3_bottom.jpg"'
frontUrl='"./ocean_3_front.jpg"' leftUrl='"./ocean_3_left.jpg"'
rightUrl='"./ocean_3_right.jpg"' topUrl='"./ocean_3_top.jpg"'>
</Background>
There's also an X3DOM node for integrating such texture maps to obtain a reflecting material, it's called "ComposedCubeMapTexture":
https://doc.x3dom.org/author/CubeMapTexturing/ComposedCubeMapTexture.html
I didn't find a live online example, but it should be straightforward to get one working - here's some code:
https://github.com/x3dom/x3dom/blob/master/test/regression-suite/test/cases/cubemap/cubemap.html
Result should look like this:
http://testing.x3dom.org/test/reference/cubemap_0.png
I've had my share of "what the f%$#" Xamarin forms errors. But this one tops the cake. I've spent about 3 hours now trying to figure out why this page only gets set to 504 height, and nothing I do seems to fix it. Literally have a empty page like so:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:XamarinMobile.Controls;assembly=XamarinMobile"
xmlns:local="clr-namespace:XamarinMobile.Classes;assembly=XamarinMobile"
xmlns:converters="clr-namespace:XamarinMobile.Converters;assembly=XamarinMobile"
xmlns:viewModels="clr-namespace:XamarinMobile.ViewModels;assembly=XamarinMobile"
xmlns:customRenderers="clr-namespace:XamarinMobile.CustomRenderers;assembly=XamarinMobile"
x:Class="XamarinMobile.CommentsPage">
<Label Text="Test"></Label>
</ContentPage>
And I get this result:
Literally it's identical to other pages that don't have this problem. Any insights? Any way to force it to be a minimum height of screen height? So annoying.
You could manually set the height of a layout to match the screen.
App.ScreenWidth = (int)UIScreen.MainScreen.Bounds.Width;
App.ScreenHeight = (int)UIScreen.MainScreen.Bounds.Height;
Then set a relative or stacklayout to height / width to the results. I think you would be better off taking a look at https://developer.xamarin.com/guides/xamarin-forms/user-interface/layouts/ and using perhaps a stacklout layout with vertical option set to fill. I would expect that to match screen height.
So the issue seemed to be that I wasn't calling a method I needed to call.
NavigationPage.SetHasNavigationBar
https://developer.xamarin.com/api/member/Xamarin.Forms.NavigationPage.SetHasNavigationBar/p/Xamarin.Forms.BindableObject/System.Boolean/
The behavior of this is odd. It 'allocates' space for a navigation bar if you don't specify it at all. You'd think it'd default to false, but seems like it defaults to true. Setting it false fixed the issue:
Xamarin.Forms.NavigationPage.SetHasNavigationBar(this, false);
I have a simple question: in Xamarin Forms is possible to set a image to fill the background of the page?
This is my ContentPage:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Facedoor"
x:Class="Facedoor.LoginPage"
BackgroundImage="pattern-background.png">
The image is a small texture, and I would like to fill the background to repeat it. Is possible?