Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizKindly log in to use this feature. We’ll take you to the login page automatically.
LoginGeneral Tech Bugs & Fixes 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
For anyone new to Mapscript or in a similar situation, I ended up having too much with extent and bounds and just needed to simplify to match my buildings.map file and this code gets it done in a map file with no TEMPLATE:
$map = new mapObj($map_path."buildings.map"); $layer = $map->getLayer(0); $status = $layer->open(); while ($shape = $layer->nextShape()) { echo $shape->index ."=>"; echo 'Type='.$shape->type.'
'; print_r($shape->values); } $layer->close();
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Kindly log in to use this feature. We’ll take you to the login page automatically.
LoginReady to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I'm trying to use/learn some PHP MapScript on a GDB file and cannot get anything from it.
The PHP below works great if I use countries.sqllite (via countries.map) file I have and shows me an array of countries both in a for and while loop.
However, when I switch and point to a buildings.gdb file (via buildings.map) I get an error of "msQueryByRect(): No matching record(s) found." for the first for loop and blank or no data for the while loop.
Both .map files just point to the one layer and show fine as WMS in OpenLayers and in QGIS.
I've been searching through PHP MapScript API stuff all afternoon (starting with https://mapserver.org/mapscript/php/phpmapscript.html) and found nothing to help me, and am asking if there is anything I missed or any special considerations I need to use MapScript a GDB file.