Centering, Display Issues (New to Forum)

40 views
Skip to first unread message

Brokenstick

unread,
Dec 10, 2011, 1:50:54 PM12/10/11
to google-map...@googlegroups.com

Hello . . .

I am trying to learn and have read through most of the relevant posts but nothing on point. (Please note thatthis is actually therapy for me, and not a for-profit venture).

The project can be viewed here: http://casels.com/i/

My purpose is to create an app for my friend's market, one item of which is to display a Google Map showing the "hybrid" view -- satellite with street names and the name of his business.

For Android phones I am using App Inventor; for the iPhone I am working on an HTML/Javascript/CSS based "app" - which is where the problems occur.

(1) The map does not center where I intended it to - I used Google "geocoding"(?)  to obtain the Latitude and Longitude; then tweaked it by moving the marker to get the coordinates for the center of the small red roof (visible in the Satellite view).  However, when loading it centers on the parking lot which is to the lower right of the red roof at the far end of the property. The label "Casel's Supermarket" is almost visible, but if the map is manually adjusted, the name disappears -- although every other business on the street and surrounding area remains.

(2) Also, intermittently the map only loads in a small corner of the screen (top left); refreshing the screen sometimes corrects this, but again, no label.

PLEASE, I have tried to apply the existing fixes, so kindly consider that my existing code may just have a mistake by me. I have attached the HTML file, together with four screenshots. I have found that learning by viewing examples is most helpful to me, but explanation is always welcome.

Thank you for your consideration -

Brokenstick
Margate,NJ/Aventura,FL



index.html
SC20111209-084527.png
SC20111209-103846.png
photo2.PNG
photo1.PNG

Chad Killingsworth

unread,
Dec 10, 2011, 5:36:24 PM12/10/11
to google-map...@googlegroups.com
For 1: This may actually be related to issue number 2. Fix it first.

For 2: When you change the visibility of the map, you need to trigger the map resize event:  http://code.google.com/apis/maps/documentation/javascript/reference.html#Map 

Also, I'm getting a couple of non-map related script errors on your page regarding jQuery and document.body.

Brokenstick

unread,
Dec 16, 2011, 1:44:36 PM12/16/11
to google-map...@googlegroups.com
Thank you very much for your suggestion.

I am going to check out your reference, and also the non-map related script errors; I think I might have too much going on there . Is there a way for me to replicate the error messages with a browser plugin?

Thank you again
Reply all
Reply to author
Forward
0 new messages