I use react-leaflet to display WMS Layer
<WMSTileLayer url="http://localhost:8080/geoserver/cite/wms?service=WMS" {...mapprops2} ></WMSTileLayer>
I use geoserver url to get the data, but how exactly should I pass user click(lat,long or X and Y) to this link and fetch data?
http://localhost:8080/geoserver/cite/wms?service=WMS&version=1.1.0&request=GetFeatureInfo&layers=cite%3Acar&QUERY_LAYERS=cite%3Acar&bbox=-3.2503604888916%2C51.4469833374023%2C-3.16548633575439%2C51.5405578613281&width=696&height=768&srs=EPSG%3A4326&format=application/json&INFO_FORMAT=application/json&FEATURE_COUNT=50&X=50&Y=50&STYLES=&WIDTH=101&HEIGHT=101
How do I add pop up using getFeatureInfo based on user click on this layer?
Is there something like latLngToLayerPoint in react-leaflet too?
You can add a new WFS for your tooltip positions. Add an overlay layer top of the WMS Tile Layer in react-leaflet.
Use latLngToContainerPoint in react leaflet
Related
I am trying to add markers in a map using mapbox gl. I checked mapbox gl example but they have set of default icons predefined in there style. I want to add my custom markers and their styling. And I would be able add a click or hover event over the marker too.
Or can we add custom markers like we add in leaflet. just with the code and defining everything in the code.
I am integrating mapbox gl with react js (server side rendering). I am being stuck at showing the markers on the map.
Did anyone try this before? Thanks.
Mapbox Custom Marker
I even tried this example but could not work for me.
With Custom Image Marker
I want to create an application on Facebook and I will host it on our server to be used from Facebook Canvas.
I was thinking of creating the web app with Angular.JS but one of my friends told me that my web app must be drawn inside a <canvas> html tag or I will not have the full functionality of Facebook integration.
So this is my question, do I have to draw my elements inside a <canvas>? or I can use other html tags with some basic animation?
No, you do NOT need to use HTML5 Canvas. There are "Canvas Apps", but there is no relation to HTML5 Canvas. Please check out the docs for more information: https://developers.facebook.com/docs
There are only a few things that are not possible without a Canvas App. For example, you can only use Notifications with a Canvas App, or you can only use invitable_friends in a gane with Canvas implementation. DonĀ“t worry about those before reading the docs.
I use Ext 4.2.1 and GeoExt2 for building mapviewer app. I defined a WmsCapabilitiesLayerStore
in grid to adding layers to map. It works but some wms layers adding base layer. Normally when user clicks the layer in the grid, selected layer will be added to overlay layers.
What is the reason of this?
Is there are a ExtJS component, which allows to
display an OpenStreetMap map in an ExtJS application,
display markers on certain positions on the map and
react to user's clicks on certain positions on the map
?
No.
There's only an extension for GMap: Ext.ux.GMapPanel and GMap Example
Both GMap and OSM have their own API. You can just wrap them into containers such as panels, windows, etc. If you wanna handle OSM and GMap events, use their API.
Not a core component of Ext JS but what about GeoExt, which extends Ext JS? It integrates OpenLayers, which provides all the map service and user interface controls to do all the hard map work.
I am creating a web application on maps, using open source maps. I have to create a polygon overlay which can be dragged anywhere on the map. I checked Leaflet API for this but I couldn't find any. Any help is appreciated. thanks.
I'm doing the same thing. But having some problems while draging. Look into the wrapper L.Draggable in the source, this is used for dragging any element in leaflet