For a project we are wishing to use use openlayers. I know how to plot points and have a popup bubble. However since there is going to be quite a lot of points plotted on the map for the UK. What i am wanting to do is send the central point of the viewable area and in the backend send a layer update of all the points in the current viewable area. In openlayers is there anyway of doing this?
Yes. You can either use a WMS server to serve maps as images, or use the BBOX Strategy to only get the content within the viewport.
Related
I would like to recreate bent country labels according to the area of the country.
In d3 (or SVG) I can construct a polyline and then use a textpath to have text along it. Example: https://www.w3.org/TR/SVG2/images/text/text-path-startoffset.svg
Is it possible in Cesium to do something similar?
In Leaflet it is implemented like that: http://makinacorpus.github.io/Leaflet.TextPath/
There's no native support for that in the current version of Cesium. It may be mentioned on a wishlist or on a roadmap somewhere, but there are no short-term plans that I know of to add it to Cesium.
Even so, you may be able to find a workaround. For example, SVGs can be used as texturemap image sources in Cesium, so you could possibly use D3 to produce curved text on-the-fly and load the results into a Cesium billboard image or even a Cesium Globe inlay image. It would probably take some experimenting to figure out how to actually wire this up and how well it would work.
I'm currently trying to implement a virtual desktop (browser) viewer for my phone using chrome's API where captureVisibleTab() is used with mutationObservers to listen to changes in the DOM, and these changes are then transmitted via websockets. To display this, I'm attempting to create a simple rectangle and with the browser feed displayed through textures, however, I'm struggling to find documentation within three.js that will dynamically interpret and display new pictures as textures, and I realize that needsUpdate flag will need to be set to true. So I was wondering if anyone had any suggestions on how to approach this? Do I need to perhaps use loaders?
Could you assign the image data to a canvas and use that as a texture?
Something like Is it possible to use a 2d canvas as a texture for a cube?
I am working on a mobile-friendly geolocation web app for backpackers. I already use D3 for data vis and Leaflet to navigate Google Maps (and other map layers). My app has features for offline use, such as saving coords to localstorage then uploading them when an internet connection is found.
I'm currently considering using d3 to plot GPS coordinates onto an svg map projection, effectively allowing me to have an offline world map which can display the users approximate location. Here are 2 demo's I've found which use GPS coords:
http://www.kgryte.com/gists/d3/maps/places/
http://dwtkns.com/pointplotter/
My question is: Would it be possible to integrate something like the d3 globe in the first link with Leaflet as a Layer?
My reason for this is I would use the SVG map as a backup for offline use, but I'd like to get Leaflet to handle markers, marker popups, zooming etc. I would get both solutions working off the same dataset for marker locations and content, so it's 'just' a case of swapping out the map.
Are there any demos/plugins for something like this? Is Leaflet only for tile-based maps?
I'm developing Windows Phone application using Bing maps, background tasks and live tiles. I'd like to show current neighborhood on a live tile (piece of a map). Is it somehow possible to show part of a map on a tile?
I guess instantiating Map object in background task and rendering part of the map as image won't fit into memory requirements.
Maybe there is a web service for returning map image for target coordinates, zoom and image size?
There is indeed a way to do this through the Virtual Earth service. You can read more about it here.
To summarize, you can get a square tile for a specific location just like this:
http://tiles.virtualearth.net/api/GetMap.ashx?c=39.213413,-98.699930&w=800&h=800&b=r,stl.h,device.mobile,mkt.en-US&z=15&logo=no&da=n
I'm looking into making a jigsaw game using html5 canvas and JavaScript. I have the images(pieces) in place, and they are draggable, but I'd like the pieces to act like they are on a grid so that when you click and hold while dragging an image it can only be placed on certain tiles within the 3x3 grid.
A similar question was asked on Stack before but the only response pointed to a drupal module and I'm not using drupal. I found one more similar solution online that uses Asp.net but I'm hoping to solve this all on the front-end, and if I have to use some server-side code I only know PHP.
The renderGrid function for canvas it seems, just draws a grid, but doesn't make it functional for snapping objects to certain places.
Does anyone have clues on how to do this?
Use divide/floor down math when setting coordinates. E.g. to space x for each 24 pixels:
var gridx = Math.floor(x/24)*24;