creating an highlight image map - mapping

I am working on a project in which i have a database created using mysql and php. I want to advance it by connecting an image to it. every object in my database is going to be linked to a certain part of the image that will be highlighted.
I am not really sure how to do this.
As of right now, i have a search feature on my database that gives me the result.
I am willing to try any programming language that would make this easier.
My database has about maybe 1000 entries. They are all numbers that correspond to a certain location on my image.
My image is basically a map.

I'm not entirely sure what you are trying to do, but if you want to plot a graph you can use the HTML 5 canvas as some JavaScript. Or better yet, use tool that already exists like Google Charts. Maybe a scatter plot is what you're looking for?

Related

Connect Google Sheet into Photoshop

I am hardly finding a way to connect or live-import data from Google Sheet in Photoshop.
There are several way to edit or replace some text layers, or even upload the PSD file into online real time editors, or using Adobe API, but is not exactly what I am looking for or at least I am struggling with.
This is the scenario:
here my Photoshop Artboard
and here my Google Sheet
what I want to do is to connect each layer from artboards' Photoshop with a defined cell/position in Google Sheet in order to get a live update when sorting or updating those cells. The cells and columns could be more than 10.000 in what I want to do.
And perhaps.. the struggling things is that I want to keep this flow in the Adobe/Photoshop application.
Do you have anything that I need to check or have knowledge to clearify this situation?
Many thanks!
Yes, in principle...
Yes, it's possible to load in a .CSV into photoshop and modify layer data, such as text.
Doing it live? This post has more info.
"connect each layer from artboards' Photoshop with a defined
cell/position"
Have you created a Photoshop document with 10,000 layers? You haven't really explained what you will be doing with the Google Sheet, so I can't help you further.
Try a prototype with smaller data sizes first - see if you can get that to work.

Temporary tiles cache for Mapserver

I was searching on Google and StackOverflow to see if anyone have solution for my problem, but didn't found anyone with same problems.
So, currently I'm running Debian machine with Mapserver installed on it. The server also run webserver for displaying map data over the browser. The generation of map is dynamic, based on layers definition in database I built mapfile in PHP and based on that generated PHP the map is shown to user. The data is defined in database and as a SHP files (both combined in single mapfile).
It is fully dynamic, what I mean with that is that user can enable/disable any of layers or click inside polygon (select some points on map) it color the selection (generate new mapfile based on selection and re-generate tiles).
So the execution of all that code from selecting some area to coloring selected items somtimes take too much time for good user experience.
For solution I'd like to use some kind of temporary tiles cache, that can be used for single user, and to be able to delete it's content when user select some items on map or enable/disable one of the layers.
P.S. I already did all the optimizations provided from Mapserver documentation.
Thanks for any help.
It sounds to me like your problem is not going to be helped by server-side caching. If all of the tiles depend on user selections, then you're going to be generating a bunch of new tiles every time there's an interaction.
I've been using MapCache to solve a similar problem, where I am rendering a tileset in response to a user query. But I've broken up my tiles into multiple logical layers, and I do the compositing on the browser side. This lets me cache, server-side, the tiles for various queries, and sped up performance immensely. I did seed the cache down to zoom level 12, and I needed to use the BerkeleyDB cache type to keep from running out of inodes.
I'm using Leaflet.js for the browser-side rendering, but you should also consider OpenLayers.
After looking at the source code, I have some other ideas.
It looks like you're drawing each layer the same way each time. Is that right? That is, the style and predicate of a particular layer never change. Each user sees the image for that layer the same way, if they have selected the layer. But the combination of layers you show does change, based on OpenLayers control? If that's the case, you don't need per-user caching on the server. Instead, use per-layer caching, and let the user's browser figure out the client side caching.
A quick technique for finding slow layers is to turn them all of. Then reenable them one by one to find the culprit. Invoke Mapserver from the command line, and time the runs, for greater precision than you'll get by running it from your webserver.
You mentioned you're serving the images in Google 3857 while the layers are in Gauss-Kruger/EPSG 3912. Reprojecting this on the fly is expensive. Reprojecting the rasters on the fly is very expensive. If you can, you should reproject them ahead of time, and store them in 3857 (add an additional geometry column).
I don't know what a DOF file is--maybe Digital Obstacle File? Perhaps preload the DOF file into PostGIS too? That would eliminate the two pieces you think are problematic.
Take a look at the SQL queries that PostGIS is performing, and make sure those are using indexes
In any case, these individual layers should go into MapCache, in my opinion. Here is a video of a September 2014 talk by the MapCache project leader.

Adding many custom markers and many custom info windows in Google Maps SDK

I am really just looking for the best way to accomplish this. I've seen the code how to do these individually, but is there a away to do it for say, 100 points? Or do i need to set the custom image and custom info for every point I create?
Also, is there a backend, say SQLite, that i could incorporate the help accomplish more efficiently?
The app I'm building could have 1000's of points, and I REALLY wouldn't want to code everyone of those...but i would!
Thanks
Consider using Google Fusion Tables - they support 100,000 points per layer and 5 layers, for 500,000 points altogether. You access them via an SQL-type language that runs on Google's servers - exactly where your data will be when you upload it and that makes them very fast.
The infowindows are programmable too.
You load your CSV into a Fusion Table (like an Excel spreadsheet) in your Google drive and get a key to that table and you then use the key in your Javascript.
I created the following website with Fusion Tables and I don't have a clue about Javascript! See Skyscan website here. I won't mind if you click View Page Source :-) By the way, if you click on Modern Collections on that page, you are actually turning on/off 25,000 markers and it is almost instantaneous. There is also Marker Clustering available which lets you de-clutter maps with massive numbers of markers and automagically replace them with a single "fatter" marker.
There is a good tutorial here.

How to store openstreetmap data locally on an iphone

I'm working on a project for college and I'm having great difficulty with part of it.
Simply put, I am looking to do the following 5 things:
download the open street map data for my city
store that data locally on the phone's harddrive.
view that data in my iOS application as a map
place markers on the map.
draw paths along roads between those paths.
I have been working on this particular part of the project for a number of weeks and I'm getting nowhere with it. I haven't even been able to figure out how to store the map on the phone let alone view the map data. I've tried using the "Route-Me" library but cannot get it working (although it seems to be one of the best libraries for using openstreetmap data so I am looking to learn how to use it). I feel pretty goddamned defeated.
If anyone has accomplished any of the tasks I am trying to do could you please link me to tutorials/guides/videos that you have used.
I'm not looking for people to give me code or do the work for me, I want to learn how to do this, but if anyone can point me in the right direction of sites that I could learn off I would be very grateful.
Any advice or feedback would be much appreciated
Here's how I ended up solving the problem.
Since Tilemill doesn't natively read .osm/.o5m/.pbf files I used Osmosis to convert a .osm file into .shp files.
I then created a new project in Tilemill and added the particular .shp files I wanted as layers to the new project. It takes a little bit of tinkering to get the map to look like you want it to but it's very similar to css and pretty easy to pick up as you go.
Once I had the map looking the way I wanted it I exported it as a .mbtiles file. This takes a long time to make and the files can be very large depending on how detailed the tiles are. I did one map of Ireland with zoom levels between 7-14 inclusive and I did one map of just Dublin city with zoom levels of 11-17 inclusive. Even though the map of just the city of Dublin had much less tiles, they were both ~200MB in size.
I then found this tutorial online which explains how to store the .mbtiles file in you application and how to read it: http://martinsikora.com/creating-mbtiles-db-for-ios-mapbox-from-hi-res-map-image
Here are a few other links that I found useful:
http://www.kindle-maps.com/blog/using-tilemill-with-openstreetmap-data.html
http://mapbox.com/developers/mbtiles/
http://mapbox.com/mapbox-ios-sdk/api/
http://mapbox.com/developers/api/#static_api
http://support.mapbox.com/discussions
I hope this is useful to someone
I would suggest trying the MapBox iOS SDK. It is actually forked from the Route-Me library and will allow you to accomplish everything on your list.
A key point to remember is that you have another step in between downloading the OSM data and storing it locally on the iOS device, that is, generating the map tiles and storing them in some sort of database.
Here is an example iOS app using the MapBox SDK that has both online and offline map sources and is a good place to start.

How to draw and save rectangles into a rails application?

I am trying to build an application that allows the user to set pre-defined regions over a map background. Rather than specifying X,Y coordinates I want them to be able to draw the regions on top of the map and then hit save. I then want to record those shapes to the database so I can present them again later on.
I have been looking at tutorials such as this one:
http://www.html5canvastutorials.com/labs/html5-canvas-drag-and-drop-resize-and-invert-images/
How would I go about starting to create this kind of functionality? Where should I look? I understand it is a large question and perhaps a little too broad but a list of options to consider would be an amazing answer.
If anyone has any tips on where I can get started it would be much appreciated.
That's a job for javascript. Ruby and HTML cannot do this alone. Basically in your javascript code you will have to listen for some events that trigger your save action(the user resizes the image or drags it away), then collect the data that you want to save(image position & size I guess) and then send this to the backend via an AJAX request. Then you can store it in the db.

Resources