How can I know which projection code a layer is using?

I've found on OpenLayer's quickstart how to transform a projection from one to another. However, that isn't very clear on another tutorials. I'm not used to those specific projection codes, neither which layer uses which. By default, when no projection is specified in the options passed to the ol.View constructor, the view projection is Web Mercator (whose EPSG code is EPSG:3857). You can do map.getView().getProjection() to get the view projection. And you call getCode on the returned projection object to get its code. I would like to know how could I implement a function to be able to drag a feature from the map and put it outside into a slot and retrieve all the information relative to this feature? To help you to understand my request let me explain you my use case: I want a map with different features which are corresponding to a meeting with a customer for example in precise location. I would like to be able to take this feature and put it in a calendar to automatically save this meeting with all the informations about the customer (location, name of the customer,description). I have this piece of code to show a marker in a map, i am using openlayers ( an opensource javascript library to load, display and render maps from multiple sources on web pages), but the popup is too big I'm trying to create several layers for OpenLayers. I loop through the array and assign values for each values in using typename: 'Test:' + item.ServiceName. The problem is when the OpenLayer calls the function it grabs the last assigned value of item.ServiceName which is always 'Test_Layer_3' so Test_Layer_1 and Test_Layer_2 are not used. I'm developing a Java desktop application to display an interactive map using HTML5, JavaScript and OpenLayers. Requirements are, Because of this two-way communication requirement, an embedded browser was the easiest solution. So I tried JavaFX first, I loaded the map tiles which are stored in local file system using file protocol and rendered onto HTML canvas using ol.source.XYZ. JavaScript functions were executed using executeScript method in WebEngine, and Java methods were executed from JavaScript using a JSObject. The problem was, HTML rendering was terrible in JavaFX. I was unable to get any output of my SVG image when using any of the ol.source.Vector and ol.format.Feature instances. I was able to get output when using the ImageStatic layer, but this uses/generates(?) a static image so the advantages of SVG are gone. I already tried the trick with setting the Content-type: to image/svg+xml but this did not help me at all. I following code how to draw the polyline along path of the map, know for the point present in the map will just give the straight line how to get along the path of the lanes Source.

Яндекс.Метрика Рейтинг Free Web Counter
page counter
Last Modified: April 22, 2016 @ 2:11 am