Is it possible to overlay an icon on top of a geometry object in Open Street Map? - eclipse

I was wondering if it was possible to overlay an icon marker over a geometry object in Open Street Maps. I am using gwt-openlayers which is a java wrapped version of the open layers api with an Open Street Map tile server in Eclipse. If anyone has any knowledge about this I'd greatly appreciate it.
Thanks,
Matt

You can if these geometric objects are points by using the externalGraphic property which is a URL of the image.
If you need to overlay them on top of a polygon just create an ImageOverlay on top of the center of the polygon.

I have it figured out. I am just making two different layers, one for the markers and one for the geometry figures. I am overlaying the markers over the geometry figures by adding the markers to the top of the layer list.

Related

Leaflet: Raster Grid on map with different colors

I am new to Leaflet and I want to create a raster and add it to my map. The raster is inside inside a polygon, which means I have many polygons (squares). Currently, I am adding just squares, but this makes everything very slow. It should look like this:
.
I also want to display a popup when hovering over a square with some information related to the square.
What I just tried:
I tried to use the GridLayer class for this but it seems I can mask it so that it just shows only specific squares.
There a various plugins but I do not really understand what they are doing
Has anyone an idea how this can be implemented?
Thank you

overlay data over water but below land surface: Mapbox-gl.js

I want to overlay my data-layer on top of the water but below the land surface.
But the problem is that there is basically no "ground" layer on mapbox layers. There are different layers like 'water', 'roads' etc layered on top of a background which is basically 'land'
I have been able to use 'roads' on top on my data which gives the following images. but is there a way to visualize my data only on 'water' and not on 'land'?
For more information. data is in geojson format. I have used movelayer() funtion of mapbox and checked by moving my datalayer below each layer of map.getStyle().layers one by one.
Also, can this be done in different styles available in mapbox?
To do what you're trying to achieve, you'll have to find another tileset of land polygons to use as a mask. There isn't a way to dynamically clip a layer to within the polygons of another layer, for instance.

Can leaflet show dynamic arrows aimed at offscreen points of interest?

Using leaflet mobile maps, you can easily get "lost" if you zoom in too far or pan in the wrong direction, so I'd like to display some kind of dynamic hint arrows(?) around the edge of the map which point to those offscreen markers. Something like the illustration below which I stumbled on here while trying to find a solution.
You would probably be interested in Leaflet EdgeMarker plugin (demo):
[…] allows you to indicate Markers, Circles and CircleMarkers that are outside of the current view by displaying [a chosen icon (like an arrow)] at the edges of the map.

Mapbox gl repeat marker

I try to repeat a marker at the same coordinates when I am moving the map to infinity, in the same way that layers.
example : https://www.mapbox.com/mapbox-gl-js/example/geojson-polygon/
Has anyone found how to do that please?
If it's not possible, conversely is it possible to not repeat layers when you moving the map ?
Thank you
The Link example you provided is not using Markers to render the shaded area. It is using a feature, in this case a polygon, included in a layer (a layer can have many features).
In MapBox the rendered map is made up of any number of layers (including the tile data) which is rendered whenever you scroll or drag to a particular area of the map. For example as you keep dragging to the right in the map it will just keep rendering in the relevant layers and tiles.
The Marker functionality has a different purpose which is as a one off selected point which is useful for a user click or hover interaction.

Leafleftjs - OpenstreetMap : Bring road names on top of Overlay layers

I am new to OpenstreetMap and Leafletjs. I am trying to implement a map displaying journey time information on motorways (also called highways in some part of the world) by using different colors to show road congestion and the problem I'm facing is, once the map tiles are rendered, it comes with all information, like town/city names, road names etc.
On the basis of road information that I receive, I create road colorings in an overlay that sits on top of the tile layer. The problem is, once that happens, the road colorings cover the road names that appear on the tile layer. The problem can be seen in the image displayed below.
Is there a way, I could extract the road names so that I could put it in a layer above the road coloring layer so that road names appear on top of road colorings.
Thanks for any sort of help, Looking forward to some replies.
Thanks
In theory, you could create two sets of tiles: one with the road lines, another with the shields (labels). Render the shields tiles with a transparent background. Then hack Leaflet around to have a second tile layer above the overlay layer.
However... that's a whole bunch of hassle for a fairly simple problem. So: why not render the road numbers alongside the roads, rather than on top of them? That way, your overlay line won't obscure the numbers. Here's an example of a style that does this (disclaimer: my site!).
Assuming you're using Mapnik to render your tiles, you'll want to use TextSymbolizer rather than ShieldSymbolizer. Customising the style is (of course) much easier if you're using TileMill rather than pure Mapnik XML.
As you say, the roadnames (here ref icon symbolizers) are part of the OSM raster map tiles and can't changed easily.
So the easiest solution would be to switch to a mapstyle without labels.
Another idea would be to add more alpha to your cusom GPS track, so it get's more 'hollow' and fits better in the mapstyle. But the default OSM style isn't good for adding informations on top, as this basemap is already to detailed. Maybe it makes sense to use another one:
http://wiki.openstreetmap.org/wiki/Featured_tiles