Jump to content
  • 0

Mapping: 'No results' brings up Lat 0, Long 0 map


jeffdillon
 Share

Question

In this searchable database -- http://www.signonsandiego.com/firemap/search.html -- when a user does a search that has no results, the results page shows \"No results,\" but the map defaults to Latitude 0, Longitude 0 -- just off the coast of Africa.

I have a default zoom level and home_position specified and when there are any matches the map defaults to them with no problem, it's just this \"no results\" outcome I can't figure out.

Here's my code:

Map it

Y
700
400
3

Y
9
[@field:streetnumber] [@field:streetname], [@field:City], CA [@field:Zip]

[@field:Notes]
92128

Thanks for any help.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I run into this issue with just about every datapage I have that uses a map. The only way around it I've found is to force the user to enter *something* that will produce a result. And about the only way to do that is to give them nothing but dropdown lists or list boxes that always produces a search criterion.

However, I would like to see either a better workaround or an enhancement to Caspio that would produce a default map based on my criteria along with the \"No results found\" message.

If anyone has any ideas, I am eager to hear them.

Link to comment
Share on other sites

  • 0

caspio's mapping protocol uses a javascript file that's referenced in the embed code: http://bridge.caspio.net/scripts/caspio_mashupsv4.js

You can change some of the parameters by creating your own version of this caspio_mashupsv4.js file. Put the new file on your web server with your other cgi or javascript files.

Within that file, look for the setCenter command. You can also change the default error warning message.

My experience has been limited to Google maps, so I'm not sure about yahoo maps, if you're using that.

Of course, presumably if you create your own mashups js file you will not be privy to any updates to the code that Caspio may decide to make (since your version will be separate from theirs).

Hope all that makes sense.

Richard

The Times-Picayune

I run into this issue with just about every datapage I have that uses a map. The only way around it I've found is to force the user to enter *something* that will produce a result. And about the only way to do that is to give them nothing but dropdown lists or list boxes that always produces a search criterion.

However, I would like to see either a better workaround or an enhancement to Caspio that would produce a default map based on my criteria along with the "No results found" message.

If anyone has any ideas, I am eager to hear them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...