Customer interactive vector map - javascript

I'm sure this isn't going to be straight forward, however..I have a custom vector map of the UK and it's an animated map. It shows different locations all over the country and I need to be able to allow the user to click on a certain location on the map. So the user will get a pop up about the location they've selected. Something like this - http://jqvmap.com/ However like i said the map has charactertures on it.
I'm wondering how simple it would be to change the co-ordinates in the Javascript to locate the positions on the map. Is there a tool I can get so it tells you your current co-ords on hover to help?
Any suggestions would be much appreciated! It needs to work on all major browsers including IE 8/9 (7 if possible).
Thanks,
Josh

I've found something that seems to have done the trick - http://www.outsharked.com/imagemapster/default.aspx?demos.html#frog
I've implemeted the code onto my page and it's worked. I've managed to get the co-ordinates from the web developer tool bar.
However, I'd like to implement a zoom in feature, where you can zoom and move around the image as if you were using google maps. So you can scroll with the house. My worry is will that lose the co-ordinates on the image? As I still want users to be able to click on the locations on the map.

Related

HTML5 Javascript - Using Lat/Lon on a map without actually drawing a map

I need to use Longitude and Latitude coordinates on a map that will be loaded in by an external program, and I need to be able to draw things on this map and be able to zoom in and out. Thing is, I cannot draw this map, and I need to be able to interact with both the map elements and with what I'm drawing.
I tried using Google, and found that I was able to control either my canvas or the map, but not both at the same time. Plus, I could not draw things properly on top of Google's map (I'm using Easel.js).
If anyone has any sources or advice, it will be much appreciated.
OK I figured this out with help from my web dev friend. He suggested I use Google Maps, and even though I have that whole "layering" issue (with all my events being captured in the canvas and not trickling down to the 'map-canvas' div), I should go and set up events that capture things like zoom and drag, and pipe them along to my Google Map, and the result is prefect for what I am looking for.
So now I have my Easel.js canvas on top of my Google map, and I just have to set up lat/lng positions for my objects when I want them to be part of the map!
Thanks for the help, everyone!

Drawing polygons on Google Maps

I was drawing polygons using Polygon Creator Class on Google Maps. As you see this tool is not easy to use. For example, it's impossible to add new polygon or edit some of them after getting result code.
In following link when you zoom in between polygons you will see gaps that I want to remove. To recreate the issue please open following link and zoom in between polygons:
http://jsbin.com/bovogaqowu/1/edit?js,output
Now question is, how to remove gap between these polygons ? In this case I can't use the tool that I used to create this map.
And which tool is better to use in this situation ?
Thank for your time
I would suggest you using the Google's official tool for drawing, editing, locatiing and even finding driving directions for the markers you have placed on the maps. You can always save these edited maps and retrieve them later when you need them.
Please click the following link and get started!!
Even I tried drawing some polygons side by side and there were no gaps :)
Hope this would help!!

How to overlay Longitude & latitude markers on JPG map?

I need to be able to show markers (polygons) on a few maps that are JPG's that are various zoom level looks at same thing.
I would normally use google maps for this, but I cannot rely on the mobile device having access to the internet when needed, thus need to use a locally stored set of JPG's and overlay the items on it, preferably with some sort of interaction such as click/touch for more detail popup/modal.
Has anybody made anything similar to this that uses the GEO location but not the internet of a mobile device, and locally stored long/lat details? Can you give me any pointers?
Use CATiledLayer for displaying and overlaying marks.Here is a nice tutorial
Here

highlight building google maps v3

Im trying to highlight specific building within a map using the google maps v3 api. I was wondering if anyone had any idea how to do this. I've been looking through google api documentation and come across nothing at the moment.
For example: http://goo.gl/maps/GyrDB - This is a map of a section manhattan, as you can see the 3d building. Im trying to highlight specific ones on hover.
Thanks :D
If you have information about where the building is, then you can use a Polygon to highlight it. If you don't have information about where the building is, then you are probably out of luck. The Google Maps API doesn't have any way of interacting with the map at that level.
Now, I suppose that one thing you could do is:
download the Google Maps tile,
find the point in the image that the user clicked on,
do a flood fill of that point with some awful colour,
set to clear all the pixels which are not the colour,
overlay that image on top of your map
You would also need to be clever about buildings which lie in more than one tile.
HOWEVER, this might run you afoul of the Terms of Use. I know that they disallow modifying the artwork; I am not sure if this would count as modifying the artwork; you'd need to look carefully at the TOU and maybe ask a lawyer. Or ask Google. (Don't ask me, I am not a lawyer.)
In many countries, every building is a cadastral parcel and there Web Map Service (WMS) layers showing them, provided for free by state bodies.
Using these layers, you can get building polygon coordinates. For ex: https://snag.gy/WtU7ZT.jpg

JS library for image dragging, scrolling and zooming + markers on pictures like google maps

I'm looking for a google maps like js library just for a image. The features i need are simple: Drag, Scroll, Zoom and most important are markers (eventually vectors). But instead of a map I want to have one picture in the background.
Description of what the library should do: Think as it would be a map-similar situation. In this web app I want to have a image (e.g. a treasure map, map of a building) like the tiles in google maps. The image should be moveable and zoomable. Overlayed over the pictures should be markers. Markers can be as simple as letters (a,b,c), symbols, pointers, div elements... The markers are fixed to the image, positioned relative to its size (zoom) and position like on google maps. drag n drop support is needed for user interaction. While editing the resource a user may drop a new marker onto the map or move/delete an existing one. If the user is not in the editing mode the markers may funktion as tooltips or links. Also if clicking an link outside the "image", the image should scroll to the right position, to show the searched result on the "image"-map. The App should also work on mobile devices.
Has anyone already seen such a tool or is interessted in helping to develop it?
Regards Manuel
How about openlayers?
It has a similar interface to google maps but allows you to customize the tiles/map and markers and doesn't rely on google's servers.
You can use custom layers with Google Maps - so you could replace the entire map with your own tiles (image). Simple example is here: http://code.google.com/apis/maps/documentation/javascript/examples/groundoverlay-simple.html or something more complicated http://mapwow.com/

Categories

Resources