How do I implement google maps yelp.com style? - javascript

I have multiple locations (20+ per page) that need to be mapped on a single map. I would like to click on a link for the location that is not dynamically generated (for SEO purposes) that would open the info window for the respective marker on the map.
Behavior should mimic http://maptheburg.com/ - but this map has the sidebar links dynamically generated.
Yelp.com is the only site I have seen so far that manages to implement the Google Maps API with unobtrusive JavaScript.

I'm not entirely sure what the yelp implementation is but if it's unobtrusive JavaScript mapping you're after then your only feasible option is to deliver a static image rather than an interactive map where JavaScript is unavailable.
A quick walk through of this technique can be found here
HTH.

Yelp.com has it's own JavaScript library which is interacting/using Google Map's JavaScript API for maps. You might want to start by peeking in there.
Might want to also check out PdMarker for advanced Google Maps markers.
If I remember right, Yelp took one of the open-source markers implementations and modified it for their own uses.

Related

How to give marker a z-index wild-googlemaps

Probably impossible without using an API, but I'm going to ask anyway because it would save me so much pain and tears.
Is there a way to give a googlemaps marker a z-index without using the API? I've got the plug-in called Wild-Googlemaps implemented on my wordpress site. And I've created a googlemaps div, with an overlaying div set to opacity:0.7 for styling purposes.
Now I've lost the ability to click the marker, so I need to somehow change its z-index.
Anyone had this problem or has any ideas? Much appreciated.
Thanks in advance.
You cannot do that without accessing API.
By default all markers are created as a part of a map canvas and you cannot access them (they don't belong to the DOM tree). You could do that after turning off optimized parameter passed during creation of the marker (take a look at
description of marker parameters), but this require access to API.

Displaying chucks of huge images live

I have a sort of setup like... google maps. It has nothing to do with maps but the mechanism seems to be similar.
I have an image ~300MB and the client can drag the picture around having different parts of it in view in the browser. I want to load only the specific parts of the image which the user is looking at, and unload the parts which are out of view (to save RAM).
I thought of breaking the image in 15X15px chunks and load the correct chunks each time but I can't seem to wrap my mind around which technique should I use to actually perform this task.
Any suggestions?
Google Maps breaks up their images (including streetview etc) into smaller chunks. I've seen a lot of people use their own images WITH the Google Maps technology to create their own maps of whatever (one, for example, is a fantasy world/web game I can remember)
Perhaps, instead of reinventing the wheel, inspect the other guys' wheel and see if you can use the same technology to create what you need. GTA for example: http://www.gta4.net/map/
This should get you started: https://developers.google.com/maps/
Google maps api: https://developers.google.com/maps/ seems to allow everything I need but it is clumsy and limited for the types of things I want to do.
It's like solving the problem backwards.. figuring out how to work with the map, and the hiding the map layer... which is... doing a lot of work for nothing.
With that, that seemed to be the best solution out there until I cam acroos this:
Panojs
http://www.dimin.net/software/panojs/
This seems to be super easy to use and quite flexible.
or Zoom.it which is based on SeaDragon which is also super easy to use!
http://www.zoom.it/
Cheers

Extension for Google Earth that allows freehand and draggable selection of placemarks

I have spent about 3 whole days searching for a Google Earth API extension that would enable users to perform selections of placemarks by either clicking multiple points, OR by drawing a polygon. I didn't budget or spec this functionality because I was confident that this is the type of thing that would be readily available for Google Earth. Turns out I was wrong.
At any rate, I am not asking anyone to write the code, I am hoping someone has come across a javascript library that enables this functionality.
As you have discovered GE plugin does not support drawing or dragging without writing some code yourself.
There is an extension library that I have found useful for draggable placemarks. Use makeDraggable().
Example here:
http://earth-api-utility-library.googlecode.com/svn/trunk/extensions/examples/draggable.html
Source here:
https://code.google.com/p/earth-api-utility-library/source/browse/trunk/extensions/src/edit/dragging.js
I believe you want to look at the second example: https://developers.google.com/earth/documentation/events#examples

Constructing a HTML View in GWT (Google App Engine) with Google Maps V2, Facebook Comments, etc - layout?

Hi Im new to GWT and Google App Engine. Im trying to layout which looks like the image. However, Im not sure whats the best way to achieve this.
There are several ways according to GWT documentation such as: UIBinder, Layout Panels (Im using this approach in the image).... etc.
However, my UI is not that complicated. I have a div with the navigation bar on top, a div with a map(Javascript, a div with Facebook comments(javascript), and a div with some functionality which I wrote for ratings etc.
Thus mostly this webpage invokes a lot of javascript and third party stuff.
Here is some code that accomplishes this
String header = "<div><h3>Navigation bar here</h3></div>";
String east = "<div><h3>Rating System here</h3></div>";
String south = "<div><h3>Facebook comments here</h3></div>";
dock.addNorth(new HTML(header), 75);
dock.addSouth(new HTML(south),50);
dock.addEast(new HTML(east), 300);
dock.add(map);
RootLayoutPanel.get().add(dock);
I tried entering some Javascript in that html string to be added to the map. However, it didnt show up on the view. Seems like the html only works if its text, is that caorrect?
Whats the best way to construct this in GWT?
Could someone please point me to some examples of code/ tutorials?
Thanks
I built a website like you project to do (link in my profile).
There is a jar file available for mapping maps v3 in gwt.
Here it is : http://code.google.com/p/gwt-google-apis/downloads/detail?name=gwt-maps-3.8.0-pre1.zip
Take care of GAE ... if your application must stay in "free", and you plan to make it available for others users, you will ran out of quota pretty fast :-(
(I gets 60% of instance time with only googlebots ...)
Anyway, just make an almost empty html, and build your panels from scratch.

Preventing Google Maps from downloading unnecessary images/sprites

I noticed that Google Maps API v3 downloads some unnecessary images/sprites even though I have all controls turned off and use a custom infoBox overlay.
Any way of avoding this?
Specifically, I'm talking about the png files imgs8, iw3 & undo_poly.. together they 'weigh in' at 20kB.
You really shouldn't be bothered about these little images/sprites as map itself takes up much more space, so these images practically doesn't affect the total download time.

Categories

Resources