Export openlayers current map view to PDF with JsPDF - export

I built a map using OpenLayers with different type of data, WMS layer, image Layers. How can i export just the "current map view"? When I want to export PDF in the example, the map view will zoom out.
https://openlayers.org/en/latest/examples/export-pdf.html

Related

is it possible to export react developed dashboard as png or svg and share via mail

I am looking for solution is it possible to export reactjs dashboard content as PNG or SVG and share via mail with share button.
How to put a share button on the react.js page. Clicking on the share button will open mail for sharing the current Dom as PNG or SVG
https://i.stack.imgur.com/JpxGQ.png

How to add pop up to WMS Layer in react- leaflet

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

React Native Maps LocalTile with fallback to native map provider tiles

I'm using react native maps with the <LocalTile /> component to render custom maps in a react-native app.
This is all good and it's working but the tiles I'm using just cover a limited area and what I'm wondering is; is there a way to make react-native-maps fallback to use the native provider tiles when tiles defined with pathTemplate are not available? This seems only to be an issue on iOS because Android renders the google maps tiles behind the local tiles - this is the behaviour I'd like for iOS with apple maps as well.
Essentially I want to be able to render the custom map tiles that I have, and then have it fallback to the standard map for everything else.
const pathTemplate = `${RNFS.DocumentDirectoryPath}/map-tiles/{z}/{x}/{y}.png`;
......
<MapView>
<LocalTile pathTemplate={pathTemplate} tileSize={256} />
</MapView>
Currently on iOS it just renders empty space with labels where the local tile set is not covered.
edge of local map tiles region

insert pdf file into mobile app development

I have a pdf file of a map of the building and I want to attach this map into the app. How can I do it? I try to convert the pdf file into the URL and use action event in the button but it didn't work. I also screenshot the map and attach the picture into the button but it is too large and I can't zoom in the detail in the map. Do you have any idea about this?
You can use an image an then place it with an ImageViewer. That allows pinch to zoom on the device so you can see the finer details.

Map component for ExtJS

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.

Resources