I know how to display a base layer map in django admin, openlayers or osm.
I would like to display also my own wms layer.
I went in my .../dist-packages/django/contrib/gis/admin to find options.py and in .../dist-packages/django/contrib/gis/templates/gis/admin to find the openlayers.js.
I manage to replace the basic layer with my wms layer but not both at the time.
Any idea how to do that?
Thanks.
Related
I am trying to gave offline access to my app. I am using ArcGis runtime 100 sdk. while implementing the same I found
//instantiate offline map task
self.offlineMapTask = AGSOfflineMapTask(portalItem: self.portalItem)
this code of line to start with. But when i did some research then found that we can use LayerUrls in place of PortalItem.
How should i replace it with layer url
To create an Offline Map Task, you can pass in a Map or a Portal Item that points at a Web Map.
You can use Layer URLs when creating Feature Layers (e.g. to add to a Map's operational layers).
I think you may be conflating Web Maps with Feature Layers.
By the way, for future questions: you could consider asking in the iOS Runtime SDK forum?
I have requirement that is, I have to show GeoJson data (java script file) as a layer in Google maps either using Native or Web view. I have checked few forums, as per they said, it is possible only for Android to load java script for loading data layer in Google maps.
So, my requirement is, I want to show some java script which contains geojson data as layer and then after that, I have to draw a route or path from start point to end point in map(like user started walking from 1 place to other place around 1 to 10 kms like footsteps).
I seen in Google maps forum, only Android and Web possible this kind requirement.
And I have checked MapBox library too, I am not sure whether it will help to my requirement. But, my preference is Google Maps.
Anyone can suggest me how to achieve this?
How do you capture an image of a user generated map, like one created using Leaflet.js?
Here is my example:
I have a website that generates a map.
I want to save an image of that map
e.g. when the user shares their profile, the preview image is of their map.
I know facebook, Strava, and most other services show images of a user map in their news feeds instead of showing interactive maps.
The problem
The map is generated client side, so grabbing an image of the map serverside isn't possible
Possible Solution
Once a map is generated, use PhantomJS to capture a screenshot of the map, and crop out the rest of the website.
Question
Since this is such a common thing to do, is anyone aware of a better or more standard way of grabbing these screenshots? I've seen things like the mapbox static API, but that doesn't capture the custom pins and line features on my maps.
I'm using rails for the back end.
You can make your map to be able to read the url params and set its state from it. When the user changes something on the map, the map's state is saved as url parameters and then send it/store it on the server for PhantomJS to generate it.
E.g.
&coords=123.123,10.123,54.54,45.11&zoom_level=5&....
I have a rails website where people can create custom maps using Leaflet JS. When they share those maps, I want the preview image to be an image of that map.
Right now, when a users map updates, I cache the GeoJSON that defines their map look. When I cache that GeoJSON, I would also like to grab an image of their map and save it to S3 so I can use it when they share their map.
The problem is, all the plugins I've found are designed for the user to capture their own image. Since leaflet runs in the browser, is there an easy way to capture this image, or do I need to setup a server hosted version of Leaflet?
I have an OpenStreetMap server that uses TileCache to serve tiles. The tiles are generated with Mapnik. I have configured the Mapnik XML stylesheet and I can generate an image with the OSM Mapnik tool 'generate_image.py'. That image is correct and looks good.
My TileCache server will serve tiles from my OSM layer; however, all I get are tiles with the background/water blue. I get no land forms, I get no street data. Can anybody help with this?
TileCache Config:
[osm]
type=Mapnik
mapfile=/var/maps/bin/mapnik/osm.xml
spherical_mercator=true
I am using OpenLayers to show the map. I am using a TMS layer to call the TileCache server. Like I said, I get tiles returned, they are just nothing but blue.
This is likely happening because tilecache runs as the apache user (various names) which has different privileges than your normal unix user for which you used to test tile generation with TileLite and generate_image.py.
See http://dbsgeo.com/foss4g2010/html/troubleshooting.html#trouble-postgres-connection for advice, but know this is simply a postgres issue and it is up to you to decide how to configure and your necessary security needs.