Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
OpenLayers 3 Wrapper for Vaadin
Josef Karthauser: Hunting around on google, I came across the following reference to OpenLayers and OpenStreetMap:
http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example
var fromProj ection = new OpenLayers.Projection("EPSG:4326"); // transform from WGS 1984 var toProjection = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection var extent = new OpenLayers.Bounds(-1.32,51.71,-1.18,51.80).transform(fromProjection,toProjection); function init() { var options = {}; map = new OpenLayers.Map("Map", options); var newLayer = new OpenLayers.Layer.OSM( "New Layer", "URL_TO_TILES/${z}/${x}/${y}.png", {zoomOffset: 13, resolutions: [19.1092570678711,9.55462853393555,4.77731426696777,2.38865713348389]} ); map.addLayer(newLayer); map.setCenter(new OpenLayers.LonLat(-1.25,51.75).transform(fromProjection,toProjection), 0); // 0=relative zoom level } }
This suggests that there's a different approach, other than using EPSG4326; I'm not sure how to replicate that in OL3. Do I need to use an external library to do the conversion? Or, have I missed the LonLat interface in OL3?
That is exactly what the input projection should do. Transforms your center point from given input projection to the map projection. I'd suggest to find out the real coordinates and projections you are dealing with. What is the projection used by your map source?
-Matti
Josef Karthauser: Ok, it looks like it is working! My OL3 component was larger than the browser window and so the centre point wasn't where I was expecting it to be! Looks like setting the centre on the EPSG4326 view, as previously recommended, is working just fine.
I'm still struggling to work out how to get the OL3 component view box in Wgs84 coordinates though. Getting the centre is ok, but how do I transform that and the zoom parameter into pair of coordinates which express the size of the view port in the browser in map coords?
I want to do a database search for the view port box, and then populate the map component with features from that database search.
Sorry I'm being so needy - I'm still on a learning curve!
Many thanks for your help so far!
Cheers,
Joe
Maybe it would be more simple to just add viewChangeListener to your view and react to the extentChanged callback. That should give you the coordinates in your input projection format (EPSG426 aka wgs84)
Regards,
Matti
Matti Hosio:
Josef Karthauser: I'm still struggling to work out how to get the OL3 component view box in Wgs84 coordinates though. Getting the centre is ok, but how do I transform that and the zoom parameter into pair of coordinates which express the size of the view port in the browser in map coords?
Maybe it would be more simple to just add viewChangeListener to your view and react to the extentChanged callback. That should give you the coordinates in your input projection format (EPSG426 aka wgs84)
Regards,
Matti
Ahha. I thought that the extend was just to restrict the pan of the map. You're right! Listening to changes in the extent are returning exactly the coordinates that I'm looking for.
I also found that I could fit the view to a bounding box by using:
map.view.fitExtent(new OLExtent(new OLCoordinate(box.west, box.north), new OLCoordinate(box.east, box.south)))
Perfect.
Thanks Matti.
Next challenge. How do I go about sizing an OLMap component? Whatever I do I can't get it to do anything other than take the size according to the size of the browser window, rather than fit within the enclosing component.
Again, am I doing anything wrong here?
Layout applicationPanel = new VerticalSplitPanel();
applicationPanel.setSizeFull();
setContent(applicationPanel);
applicationPanel.firstComponent = new MyOLMap();
This sets up a split panel with the top and bottom taking 50% of the display each.
The map, in the top split, however, is not sized within the bounds of that split. When I drag the split panel separate it reveals that the map is actually full screen sized, and only the top half was showing.
I've tried paying around with setting the height and width on the OLMap object, but nothing appears to change the behaviour.
Is this a feature of OpenLayers? How do I go about making the map change aspect ratio as the containing component proportions change?
Thanks,
Joe
p.s. sorry for all the questions - I hope you're not getting bored of them!
Matti Hosio:
Matti Hosio:
Matti Hosio:
Anant Jagania: Hi Matti,
Current way of initializing map in OLMapConnector makes it hard for creating Map extension. This is due to client Map is created only when ConnectorHierarchy is changed. e.g. Adding some overlay like OverviewMap in the map extension. Map is not initialized (until ConnectorHierarchy is changed) and adding any control to Map fails. I suggest to initialize the client map during connector initialization.
@Connect(MapExtension.class) public class MapExtensionConnector extends AbstractExtensionConnector { @Override protected void extend(ServerConnector target) { OLMapConnector olMapConnector = (OLMapConnector)target; final MapWidget widget = olMapConnector.getWidget(); // Approach 1: Fails with Javascript errors of map being undefined Map map = widget.getMap(); map.addControl(OverviewMap.create(extent, URL, layer)); // Approach 2: No Javascript error but overviewmap shows nothing but DIV element, no map olMapConnector.addConnectorHierarchyChangeHandler(new ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler() { public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) { Map map = widget.getMap(); map.addControl(OverviewMap.create(extent, URL, layer)); } }); } }
Hello Anant,
The reason I defer the map initialization to connectionhierarchy change is that the state information is not available in the connector init. But I could add an initialization hook to the connector to make extending the wrapper a bit easier. I don't see directly why the Approach 2 would fail though.
-Matti
Does your overview map work if added to the map afterwards? I mean attaching the extension in response to a button click for instance?
-Matti
Anyway, I added the initalization hook. Feel free to try version 1.0.3 and check if that works for you.
Regards,
Matti
Thanks Matti,
New MapInitialize listener and approach 2 both adds the Overview map but its not loaded initially. Only when I collapse and uncollapse, it renders map in it. I haven't tried loading on Button click as I am creating only Javascript Overview map.
Matti Hosio:
Josef Karthauser:
If I want to change the view position manually after the map has been displayed, how do I do that?I've tried:
map.view.setCenter(new OLCoordinate((box.east + box.west) / 2.0, (box.north + box.south) / 2.0))
where my box coordinates are Wgs84, but the map doesn't scroll to the new centre when I do that. (I'm doing it in a different thread, so I don't know if that's a problem...) Is there something I need to call to get the client to sync with the server model?
The different thread is most likely the problem. In any Vaadin application, if you do any UI changes in a separate background thread, you should do the modifications inside UI.access and have push enabled.
I forgot to report that @Push and using UI.access did the trick perfectly. Thanks :).
Joe
Josef Karthauser: Next challenge. How do I go about sizing an OLMap component? Whatever I do I can't get it to do anything other than take the size according to the size of the browser window, rather than fit within the enclosing component.
Again, am I doing anything wrong here?
Layout applicationPanel = new VerticalSplitPanel(); applicationPanel.setSizeFull(); setContent(applicationPanel); applicationPanel.firstComponent = new MyOLMap();
Ok, sorry. It was a total school boy error. Although I was setting applicationPanel to fullSize, I wasn't setting 'this' to fullSize - hence the strange layout behaviour.
Works nicely now. Sorry for the noise.
Layout applicationPanel = new VerticalSplitPanel();
applicationPanel.setSizeFull();
setContent(applicationPanel);
[b]this.setFullSize();[/b]
applicationPanel.firstComponent = new MyOLMap();
applicationPalen.firstComponent.setFullSize();
Have I found an OLModifyInteraction bug, or is it a feature?
If I add some features, and then set one of them to have a modification interaction on it, when I add additional features they become editable, even though I didn't set an interaction. Is that to be expected?
vectorSource.addFeature(feature1)
vectorSource.addFeature(feature2)
map.addInteraction(new OLModifyInteraction(layer, new OLModifyInteractionOptions(), feature2))
vectorSource.addFeature(feature3)
After this, feature1 is no editable, but both feature2 and feature3 are editable. If I take a look at map.getInteractions() I don't see any additional interactions defined, only the one on feature2.
This is with open layers 1.0.2.
Is this a known issue, or an issue with open layers itself? Is there a workaround?
Thanks,
Joe
Josef Karthauser: Have I found an OLModifyInteraction bug, or is it a feature?
vectorSource.addFeature(feature1) vectorSource.addFeature(feature2) map.addInteraction(new OLModifyInteraction(layer, new OLModifyInteractionOptions(), feature2)) vectorSource.addFeature(feature3)
After this, feature1 is no editable, but both feature2 and feature3 are editable. If I take a look at map.getInteractions() I don't see any additional interactions defined, only the one on feature2.
Ahha! Found it. There is a bug, but it's ticked by _my_ bug. What I actually had was:
vectorSource.addFeature(feature1)
vectorSource.addFeature(feature2)
map.addInteraction(new OLModifyInteraction(layer, new OLModifyInteractionOptions(), feature2))
vectorSource.removeFeatureById(feature2.id)
vectorSource.addFeature(feature3)
i.e. I inadvertantly was removing my feature, for which there was an interaction defined. That's what caused the error.
It's interesting to understand what's going on here though. So, is probably a feature, not a bug, but I would have thought that the interaction ought to have been removed by the code when the feature was... that might be a good refinement to make.
Josef Karthauser:
Josef Karthauser: Have I found an OLModifyInteraction bug, or is it a feature?
vectorSource.addFeature(feature1) vectorSource.addFeature(feature2) map.addInteraction(new OLModifyInteraction(layer, new OLModifyInteractionOptions(), feature2)) vectorSource.addFeature(feature3)
After this, feature1 is no editable, but both feature2 and feature3 are editable. If I take a look at map.getInteractions() I don't see any additional interactions defined, only the one on feature2.
Ok, no, I was right the first time. There does appear to be a bug.
After the following interactions on a vector source:
vectorSource.addFeature(feature1)
vectorSource.addFeature(feature2)
map.addInteraction(new OLModifyInteraction(layer, new OLModifyInteractionOptions(), feature2))
vectorSource.addFeature(feature3)
I find that feature1 is not editable, and feature2 is editable. However, feature3 is _also_ editable.
Josef Karthauser: Ok, no, I was right the first time. There does appear to be a bug.
After the following interactions on a vector source:
vectorSource.addFeature(feature1) vectorSource.addFeature(feature2) map.addInteraction(new OLModifyInteraction(layer, new OLModifyInteractionOptions(), feature2)) vectorSource.addFeature(feature3)
I find that feature1 is not editable, and feature2 is editable. However, feature3 is _also_ editable.
Looks like a bug/feature in OLModifyInteractionConnector.java; it's when new features are added to the layer they are being added to the interaction, which is the wrong thing to do if the features were already restricted.
I'll post a fix on github.
Don't know if this is the right place to write this, but I noticed a bug in OLPoint. The methods getLongitude() and getLatitude() both return the point's x-coordinate. Fortunately I can work around this by just using getX() and getY(), but still it would need a fix...
Hi, I have a problem I cant figure out.
I have a SplitPanel (or a Vertical/HorizontalPanel) in which I add a Map and a Combobox. Everytime i type something in the combox the map "moves down" or the margin to the top gets bigger (there even appears a scroll bar next to the map).
Here is the buildLayout method of my View:
private void buildLayout() {
OLMap olMap = new OLMap();
OLSource olsource = new OLMapQuestSource(OLMapQuestLayerName.OSM);
OLTileLayer olTileLayer = new OLTileLayer(olsource);
olMap.addLayer(olTileLayer);
OLViewOptions options=new OLViewOptions();
OLView olview=new OLView(options);
olview.setZoom(1);
olview.setCenter(0, 0);
olMap.setView(olview);
VerticalSplitPanel splitPanel = new VerticalSplitPanel();
splitPanel.setFirstComponent(olMap);
splitPanel.setSecondComponent(new ComboBox("test"));
splitPanel.setSplitPosition(80,Unit.PERCENTAGE);
this.addComponent(splitPanel);
this.setSizeFull();
}
Maybe this is a common issue and is not related to v-ol.
I am using:
vaadin version: 7.5.10
v-ol3 verison: 1.0.3
and valo theme (if it matters).
Thanks in advance,
Andreas
Dear Matti
First, it's really a great Add-on!!! (We're currently using version 0.1.7 with Vaadin 7.5.5).
Now we're testing vaadin 7.6.1 and get the following exception (full stack trace is attached):
Error sending hierarchy change eventscom.google.gwt.event.shared.UmbrellaException:
Exception caught: (TypeError) : Cannot read property 'nullMethod' of null
I guess it's is because the Add-on is not compatible yet with vaadin 7.6.1??? (Or do you have an idea what the problem on "our" side could be?).
We're using:
- vaadin-client-7.6.1.jar
- v-ol3-1.0.3
- gwt-ol3-1.0.3
- ContextMenu-4.5.0
Kind regards,
Michael
Hello Michael,
Thank you for letting me know. Most likely a compatibility issue with 7.6. I'll have a look and address the issue in next version. Unfortunately I am very busy with some other projects at the moment so probably can not promise the next release before the end of this month. Is this a blocker for you?
Regards,
Matti
Thanks a lot for the fast response! If time permits it would be great otherwise we definitely have no problem to ship our product (on 5th Feb.) with vaadin 7.5!
Kind regards,
Michael
Hi, Matti!
You've done a great job, addon is really good. I'm interesting in one thing, could it be possible to use a static image like a map, I mean any static image, smth like here http://openlayers.org/en/v3.2.0/examples/static-image.html.
Thanks in advance.
Ievgen Anikushyn: Hi, Matti!
You've done a great job, addon is really good. I'm interesting in one thing, could it be possible to use a static image like a map, I mean any static image, smth like here http://openlayers.org/en/v3.2.0/examples/static-image.html.
Thanks in advance.
Hello Ievgen,
Thank you! Currently there is no support for static image source in the add-on. Also the supported projections are the ones that are supported by proj4js. So at the moment this is not possible with the add-on. On the other hand, there is nothing that would make it impossible to implement such features. I will add issues for adding support for those in github and try to address that in a future release. Can not promise any time schedule at this point, though.
Cheers,
Matti
Thanks for reply. Ok then, will looking forward for new features :) Good luck! :)
Hi all,
I've got a question regarding the OLFeature. I can set the shown text on the OLFeature via setStyle(...) function. My question: is there a way to hide/show the text?
UPDATE:
Sorry for the too general question. My goal is quite trivial: I just want to hide/show label depending on the map zoom.
I see only these solutions as more or less acceptable:
1) OLLayer allows to control its visability and I don't find good to create 2 OLFeatures: one for text, the other for drawing a marker and put them on different layers;
2) Create a wrapper around OLFeature and control text style by setting null or some value.
Please let me know if I've missed some point.
Thanks a lot,
Sergii
Matti Hosio: Hello Michael,
Thank you for letting me know. Most likely a compatibility issue with 7.6. I'll have a look and address the issue in next version. Unfortunately I am very busy with some other projects at the moment so probably can not promise the next release before the end of this month. Is this a blocker for you?
Regards,
Matti
Dear Matti
Everything works just fine after moving from Vaadin 7.6.1 to Vaadin 7.6.3 :)
Have a nice day,
Michael
Michael Hofmann:
Matti Hosio: Hello Michael,
Thank you for letting me know. Most likely a compatibility issue with 7.6. I'll have a look and address the issue in next version. Unfortunately I am very busy with some other projects at the moment so probably can not promise the next release before the end of this month. Is this a blocker for you?
Regards,
Matti
Dear Matti
Everything works just fine after moving from Vaadin 7.6.1 to Vaadin 7.6.3 :)Have a nice day,
Michael
Oh,
I like bugs that fix themselves. :) Thank you for reporting.
-Matti
Hello.
I 'm trying to implement the following open layer simple code, but I do not understand how to use the OLXYZSource (?) abstract class.
The problem is the call to the tail server.
I tried to extend the BasicMap class of demotestapp but I did not succeed.
the following javascript code works correctly.
Can anyone help me?
Thanks in advance
function InitMap(coordinates) {
var extent = ol.proj.transformExtent([coordinates[0].X,coordinates[0].Y,coordinates[2].X,coordinates[2].Y], 'EPSG:4326', 'EPSG:3857');
console.log("extent " + JSON.stringify(extent));
var openCycleMapLayer = new ol.layer.Tile({
source: new ol.source.XYZ({
url: 'http://my-server:8080/my-gui-tiles-server-war/tiles/test/{z}/{x}/{-y}.png8',
projection: 'EPSG:900913',
tileSize: '256'
})
});
var map = new ol.Map({
layers: [
openCycleMapLayer
],
target: 'mapAuto',
view: new ol.View({
maxZoom: 16,
minZoom: 12,
zoom: 12,
center: ol.extent.getCenter(extent),
projection: 'EPSG:900913',
enableRotation: false,
extent: extent
})
});
map.getView().fit(extent, map.getSize(), {padding: [0, 0, 0, 0]});
return map;
}
}
Hi,
public final class Projections {
public static final String EPSG4326="EPSG:4326"; // Geographic mercator (lat/lon)
public static final String EPSG3857="EPSG:3857"; // web or spherical mercator
}
We can't use Labmert 93 ? (EPSG:2154). I need to complete my project :(
Hello,
If your projection is supported by proj4js you can use that with a little bit of tweaking. See the list of demos in the test folder in vol3 github and find the example for proj4js
Regards,
Matti
.
Hi All,
I've got the same issue as @Luca Catoni, but with the Mapbox. I'm trying to implement Mapbox layer and shit I'm stuck and don't how to continue.
From here:
https://www.mapbox.com/help/mapbox-with-openlayers/#mapbox-studio-style-or-mapbox-style-url-1
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
tileSize: [512, 512],
url: 'https://api.mapbox.com/styles/v1/mapbox/streets-v8/tiles/{z}/{x}/{y}?access_token=<your access token here>'
})
})
],
target: 'map',
view: new ol.View({
center: [0, 0],
zoom: 2
})
});
I tried to implement OLXYZSource, XYZSource and OLXYZSourceConnector classes and I'm not sure if I did all correct at all.
//-----------------------------------------------------------------------
class OLMapboxSource extends OLXYZSource {
public OLMapboxSource() {
super();
}
@Override
protected OLXYZSourceState getState() {
return (OLXYZSourceState) super.getState();
}
@Override
protected OLXYZSourceState getState(boolean markAsDirty) {
return (OLXYZSourceState) super.getState(markAsDirty);
}
}
//-----------------------------------------------------------------------
class MapboxSource extends XYZSource {
public MapboxSource() {
}
public static final native MapboxSource create() /*-{
return new $wnd.ol.source.XYZ({url: 'https://api.mapbox.com/styles/v1/mapbox/streets-v8/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoiZmVsaXhoYWNrbCIsImEiOiJjaW5yYmV2NmswMGd0d2RrbHhqNDBxa3d2In0.ve-xOdyBZyxTZd-aM5S_hQ'});
}-*/;
}
//-----------------------------------------------------------------------
@Connect(OLMapboxSource.class)
class OLMapboxSourceConnector extends OLXYZSourceConnector {
@Override
public OLXYZSourceState getState() {
return (OLXYZSourceState) super.getState();
}
@Override
protected Source createSource() {
return MapboxSource.create();
}
}
//-----------------------------------------------------------------------
Could you please have a look or give me a hint. @Matti Hosio hint about proj4js was not clear how to apply it.
Thanks a lot.
Best regards,
Sergii Zaiets
Hi, I am trying to use OL3 with Vaadin 7.6.5.
However, when I try to include a map in a view, I get a JavaScript exception in the browser:
ConsoleLogHandler.java:69 Mon May 09 14:00:15 GMT+200 2016 com.vaadin.client.communication.MessageHandler
SEVERE: Error sending hierarchy change eventscom.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) : Cannot read property 'clear_54_g$' of undefined
at Unknown.fillInStackTrace_0_g$(com.example.MyAppWidgetset-0.js@3:8443)
at Unknown.Throwable_3_g$(com.example.MyAppWidgetset-0.js@8:8398)
at Unknown.Exception_3_g$(com.example.MyAppWidgetset-0.js@18:8541)
at Unknown.RuntimeException_3_g$(com.example.MyAppWidgetset-0.js@18:8582)
at Unknown.UmbrellaException_3_g$(com.example.MyAppWidgetset-0.js@25:35514)
at Unknown.UmbrellaException_5_g$(com.example.MyAppWidgetset-0.js@26:35575)
at Unknown.fireEvent_1_g$(com.example.MyAppWidgetset-0.js@13:35106)
at Unknown.fireEvent_10_g$(com.example.MyAppWidgetset-0.js@30:74969)
at Unknown.sendHierarchyChangeEvents_0_g$(com.example.MyAppWidgetset-0.js@39:86285)
at Unknown.execute_35_g$(com.example.MyAppWidgetset-0.js@8:86075)
at Unknown.runWhenDependenciesLoaded_0_g$(com.example.MyAppWidgetset-0.js@12:71213)
at Unknown.handleJSON_0_g$(com.example.MyAppWidgetset-0.js@3:85729)
at Unknown.execute_34_g$(com.example.MyAppWidgetset-0.js@23:85905)
at Unknown.executeWhenCSSLoaded_0_g$(com.example.MyAppWidgetset-0.js@12:71818)
at Unknown.handleMessage_0_g$(com.example.MyAppWidgetset-0.js@27:85744)
at Unknown.start_3_g$(com.example.MyAppWidgetset-0.js@35:72271)
at Unknown.execute_22_g$(com.example.MyAppWidgetset-0.js@10:71526)
at Unknown.$executeScheduled_0_g$(com.example.MyAppWidgetset-0.js@40:11720)
at Unknown.runScheduledTasks_0_g$(com.example.MyAppWidgetset-0.js@9:11442)
at Unknown.flushPostEventPumpCommands_0_g$(com.example.MyAppWidgetset-0.js@5:11534)
at Unknown.execute_5_g$(com.example.MyAppWidgetset-0.js@22:11673)
at Unknown.execute_4_g$(com.example.MyAppWidgetset-0.js@19:11410)
at Unknown.apply_0_g$(com.example.MyAppWidgetset-0.js@28:10905)
at Unknown.entry0_0_g$(com.example.MyAppWidgetset-0.js@16:10961)
at Unknown.anonymous(com.example.MyAppWidgetset-0.js@14:10941)
at Unknown.callback_0_g$(com.example.MyAppWidgetset-0.js@45:11461)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'clear_54_g$' of undefined
at Unknown.fireMapInitialized_0_g$(com.example.MyAppWidgetset-0.js@36:205010)
at Unknown.onConnectorHierarchyChange_18_g$(com.example.MyAppWidgetset-0.js@8:205129)
at Unknown.dispatch_100_g$(com.example.MyAppWidgetset-0.js@16:73501)
at Unknown.dispatch_99_g$(com.example.MyAppWidgetset-0.js@8:73497)
at Unknown.dispatch_0_g$(com.example.MyAppWidgetset-0.js@8:32213)
at Unknown.dispatchEvent_2_g$(com.example.MyAppWidgetset-0.js@14:34978)
at Unknown.doFire_0_g$(com.example.MyAppWidgetset-0.js@9:35222)
at Unknown.fireEvent_2_g$(com.example.MyAppWidgetset-0.js@8:35295)
at Unknown.fireEvent_1_g$(com.example.MyAppWidgetset-0.js@24:35100)
at Unknown.fireEvent_10_g$(com.example.MyAppWidgetset-0.js@30:74969)
This is basically how I added the Map to the view:
VerticalLayout mapTab = new VerticalLayout();
// create map instance
OLMap map = new OLMap();
// add layer to map
OLMapQuestSource mapSource = new OLMapQuestSource(OLMapQuestLayerName.OSM);
OLTileLayer layer = new OLTileLayer(mapSource);
map.addLayer(layer);
mapTab.addComponent(map);
I don't have much experience with Vaadin yet, if there is anything else I could do to debug, please let me know.
Thanks!
HI @Dominic Lerbs,
I think you forgot to create and set a view.
Just replace you code in line 4:
OLMap map = new OLMap();
with this code:
OLMap map = new OLMap();
map.setView(createView());
map.setSizeFull();
private OLView createView() {
OLViewOptions options = new OLViewOptions();
options.setInputProjection(Projections.EPSG4326);
options.setMapProjection(Projections.EPSG3857);
OLView view = new OLView(options);
view.setZoom(1);
view.setCenter(0, 0);
return view;
}
That should be enough.
Regards,
Sergii Zaiets
Hi Sergii,
thank you, this worked!
Is there some manual describing how to use this addon or is it basically the openLayers documentation which I should consult?
Hello Dominic,
No manual yet. You should consult the OpenLayers documentation and find the corresponding classes in the wrapper. The api naming should be quite close to the one in the OpenLayers. Additionally you could check the demos in
https://github.com/VOL3/v-ol3/tree/master/v-ol3/src/test/java/org/vaadin/addon/vol3/demoandtestapp.
Regards,
Matti
Matti Hosio: Hello Dominic,
No manual yet. You should consult the OpenLayers documentation and find the corresponding classes in the wrapper. The api naming should be quite close to the one in the OpenLayers. Additionally you could check the demos in
https://github.com/VOL3/v-ol3/tree/master/v-ol3/src/test/java/org/vaadin/addon/vol3/demoandtestapp.Regards,
Matti
Hi Matti, will have a look, thanks for the reply!
Hi,
has anyone experience with WFS (Web Feature Services)? How to use vol3 to import a WFS? I did not find any example in the v-ol3-master project. An example would be very helpful.
Here an Open Data WFS: http://sg.geodatenzentrum.de/wfs_vg1000
Regards, Wolf
Wolf Michna: Hi,
has anyone experience with WFS (Web Feature Services)? How to use vol3 to import a WFS? I did not find any example in the v-ol3-master project. An example would be very helpful.
Here an Open Data WFS: http://sg.geodatenzentrum.de/wfs_vg1000
Regards, Wolf
Hello Wolf,
Not very straightforward at the moment (same goes with the other static feature sources such as KML, GeoJSON, ...) but I am working on it. Basic read-only support will be added soon. Thanks for the link btw. will use that in example code :)
-Matti
Hi Matti,
thank you very much for your quick response! Sounds good. Two things are important for me: simple visualization and selection (selection sets) with access to feature attributes. Read-only is fine.
The WFS http://sg.geodatenzentrum.de/wfs_vg1000 (http://sg.geodatenzentrum.de/wfs_vg1000?request=GetCapabilities&service=WFS) contains administrative areas. The feature type vg1000:vg1000_lan contains only 16 multipolygon objects - may be good for testing.
Best regards, Wolf
Hello,
I need to order the layers I display on the map. I see openlayer now support z-index ordering. How can I use z-index ordering with the vaadin wrapper org.vaadin.addon.v-ol3 1.1 ?
Thank you :)
I'm moving from 1.0.3 to 1.1 and vaadin 7.6.4 to 7.6.6.
Now I cant' get it to compile and am getting this error:
java.lang.UnsatisfiedLinkError: com.google.gwt.core.client.JavaScriptObject.toStringSimple(Lcom/google/gwt/core/client/JavaScriptObject;)Ljava/lang/String;
at com.google.gwt.core.client.JavaScriptObject.toString(JavaScriptObject.java:171)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at
view.MapWidgetView.createTileSource(MapWidgetView.groovy:113)
which is just trying to do:
new BingSource()
Any idea what gives?
Cheers.
Ok, so it's 'BingSource.create()' not 'new BingSource()', but it' still failing.
I don't think it's the widgetsets - everything else works ok; but I can't initialise the bing maps.
Hi!
I'm using your add-on in my project. And now the map is not showing up. There is a message from MapQuest: "As it July 11, 2016, direct tile access has been discontinued".